[FreeBSD] high cpu load

Discussions about using non Windows and Linux guests such as FreeBSD, DOS, OS/2, OpenBSD, etc.

[FreeBSD] high cpu load

Postby virtualhuman » 30. Aug 2016, 15:58

Hey there,

I've got a pfSense 2.3.2 64bit (FreeBSD) guest running on my Linux host (Fedora 23 64bit) and I've noticed a considerable amount of cpu usage on the host by the VirtualBox process.

Apparently, the VirtualBox process uses about 26-30% cpu, rather constantly. But if I ssh into the pfSense guest, cpu usage there is about 2-5%.

Interestingly, I run a lot of other virtual guests, running a range of operating systems (WinXP, Win7, Win10, Linux CentOS 6, Linux CentOS 7, and others, most are 64bit and two are 32bit) and they all run 2-5% cpu usage at idle. So pfSense is the only FreeBSD operating system that I have and it is the only one with high cpu usage problems.

Anyone knows what could be wrong? is there some incompatibility with FreeBSD?

Any help would be appreciated. Thank you!
Posts: 22
Joined: 22. Jan 2013, 22:11

Re: [FreeBSD] high cpu load *SOLVED*

Postby virtualhuman » 9. Nov 2016, 00:22

Mystery solved! Apparently there is some incompatibility between virtualbox and the way the freebsd kernel does interrupt polling.

The solution is to add the following line to the /boot/loader.conf

Code: Select all   Expand viewCollapse view

Now cpu usage of the VM process is around 2% (when the freebsd guest is idle), instead of 26-30% cpu usage.
Posts: 22
Joined: 22. Jan 2013, 22:11

Re: [FreeBSD] high cpu load *SOLVED*

Postby NothingCtrl » 2. Mar 2017, 08:32

Thanks you!
Last edited by socratis on 2. Mar 2017, 08:51, edited 1 time in total.
Reason: Removed unnecessary verbatim quote of the whole previous message.
Posts: 1
Joined: 2. Mar 2017, 08:29

Re: [FreeBSD] high cpu load

Postby michaln » 7. Mar 2017, 17:20

That's not "incompatibilty". That's the guest OS wasting CPU time by using an unreasonably high interrupt rate.

To give an analogy, if you check your watch 100 times an hour, you'll spend a lot more time doing it than when you check the watch 5 times an hour. That's just how it is, and if you consider the amount of time spent checking the time a problem, the only thing you can do about it is to check the watch less frequently.
Oracle Corporation
Posts: 2841
Joined: 19. Dec 2007, 15:45
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Any and all

Re: [FreeBSD] high cpu load

Postby N0YB » 19. Sep 2017, 02:47

Ran into high host CPU usage with a Linux or BSD guest a couple years ago. Turned out to be processor settings. Setting processors to number host has (2) and execution cap to 100% solve it in my case.
Posts: 27
Joined: 20. Sep 2012, 18:55

Return to Other Guests

Who is online

Users browsing this forum: No registered users and 3 guests