6 Replies Latest reply on Jan 24, 2012 4:41 AM by Observer7

    FreeBSD high CPU utilization

    Bentman78 Novice

      I have installed some FreeBSD VM's and I keep seeing high CPU utilization.  By high I mean 22-25 percent constantly.  My linux and even windows VM's are in the 5-6 percent rage at the most.  Even when it's idle.  Anyone know why this keeps happening?

        • 1. Re: FreeBSD high CPU utilization
          RDPetruska Guru
          User ModeratorsvExpert

          Have you installed the VMware Tools in your guests?

          Have you looked through the Guest OS Installation Guide for tips for FreeBSD guests?

          • 2. Re: FreeBSD high CPU utilization
            Bentman78 Novice

            yeah, vmware tools is installed.  Probably should have stated that. 


            Haven't seen anything in the guest installation guides, perhaps I missed it.

            • 3. Re: FreeBSD high CPU utilization
              ZippySLC Enthusiast

              Have you run top on your FreeBSD box to see if there is a process running there that is hogging up CPU?

              • 4. Re: FreeBSD high CPU utilization
                Bentman78 Novice

                there isn't really anything running that would constitute it eating up the CPU.  Even when it's idle, it's still high.


                Should I have installed vmware tools from the ports collection?

                • 5. Re: FreeBSD high CPU utilization
                  Bentman78 Novice

                  with running top I only see the vmware guest daemon using any CPU at all, and it's less than 1%.  It seems like vmware server is reserving 25% CPU for the FreeBSD machine and not the others.  This wouldn't be an issue other than the fact if I have three FreeBSD VM's running I will be eating up 75% of my CPU.


                  Here is the "top" from the host box

                  Tasks:  67 total,   1 running,  66 sleeping,   0 stopped,   0 zombie

                  Cpu(s):  7.6%us, 91.7%sy,  0.0%ni,  0.0%id,  0.0%wa,  0.3%hi,  0.3%si,  0.0%st

                  Mem:   1003176k total,   990052k used,    13124k free,    42496k buffers

                  Swap:  1951736k total,    18176k used,  1933560k free,   787500k cached


                    PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND

                  11972 root       5 -10  221m 149m 142m S 80.8 15.3 362:19.32 vmware-vmx

                  11640 root       5 -10  377m 245m 237m S 12.3 25.0 129:06.38 vmware-vmx

                  8257 root       5 -10  376m 133m 128m S  3.3 13.6 798:08.50 vmware-vmx

                  6757 root       0 -20     0    0    0 S  3.0  0.0 183:08.02 vmware-rtc

                  4389 root      15   0 20752 9396 2708 S  0.3  0.9  71:40.62 vmware-serverd




                  PID 11972 is the PID for the FreeBSD VM.  At this moment I am compiling something on the machine, but it's always high.    As you can see the VM's with PID's 11460 and 8257 are pretty low, even though their idle.  Even with FreeBSD idle it's still eating 25%. 


                  Anyone else experiencing this?

                  • 6. Re: FreeBSD high CPU utilization
                    Observer7 Lurker

                    Installed FreeBSD in a VM and realized one of the host cpu core was at 100% when the FreeBSD VM is supposedly idle.


                    Took me awhile to find a solution, here is the answer for those looking to keep the host cpu utilization at 0% when the FreeBSD VM is idle (applies to Freebsd 7/8/9):


                    Add in /boot/loader.conf:

                    # Disable CPU frequency/voltage throttling control
                    # Disable local APIC timers (FreeBSD 8+)
                    # Reduce interrupt rate (at the cost of slightly increases response time)
                    # Saves 128 interrupts per second per core at the cost of reduced scheduling precision


                    Add in /etc/rc.conf:
                    # Turn off all CPU core clocks on idle
                    # Disable background fsck at boot