VirtualBox

Ticket #5501 (closed defect: fixed)

Opened 4 years ago

Last modified 3 years ago

Karmic as host x64 very slow with SMP

Reported by: Perryg Owned by:
Priority: major Component: guest smp
Version: VirtualBox 3.0.10 Keywords: All x64 Guests
Cc: Guest type: other
Host type: Linux

Description

I have tried 3 times to either upgrade or clean install Ubuntu 9.10 x64 then install VirtualBox 3.0.10 and any Windows guest or Debian guest. The install goes fine and shows no complaints except the VM's are extremely slow. Switching to one processor helps but it is still a lot slower then running 3.0.10 on Ubuntu 9.04 x64. I figure is has something to do with their new kernel but can not find any information on what to do to fix this. Is this an issue that you are aware of and if so what do I need to to to help get this fixed? I am back to Ubuntu 9.04 now but can install 9.10 again if need be. It is just such a hassle since this is the primary OS, I wanted to see what you said before I went down that road again.

PS I am now at 3.1.0B but the problem was in 3.0.10 just to let you know. It works exactly the same in either

Attachments

Windows-Vista-2009-11-06-15-51-45.log Download (52.5 KB) - added by Perryg 4 years ago.
Log file of x64 guest
Win 7-2009-11-18-21-42-32.log Download (38.6 KB) - added by Perryg 4 years ago.
Win 7 log file
Win 7-2009-11-19-10-46-39.log Download (58.7 KB) - added by Perryg 4 years ago.
Latest log file
VBox-WinXP-JeRa.log Download (57.5 KB) - added by JeRa 4 years ago.
VB log of SMP WinXP (32-bit) on Kubuntu 8.10 (64-bit)
timer-r0drv-linux.c Download (29.9 KB) - added by frank 4 years ago.
testcase (hrtimers enabled)
thread-r0drv-linux.c Download (6.4 KB) - added by aeichner 4 years ago.
hrtimers
semeventmulti-r0drv-linux.c Download (8.2 KB) - added by aeichner 4 years ago.
hrtimers
semevent-r0drv-linux.c Download (7.9 KB) - added by aeichner 4 years ago.
hrtimers
Vista-Freeze.jpg Download (70.8 KB) - added by Perryg 4 years ago.
Vista-freeze.jpg
Vista-121809.jpg Download (70.3 KB) - added by Perryg 4 years ago.
Working Vista
Windows 7-64bit.png Download (222.6 KB) - added by linyunfeng 4 years ago.
Windows 7 with smp support. CPU performance is good
VBox.log Download (55.6 KB) - added by hansb 4 years ago.
VBox.log.1 Download (56.0 KB) - added by hansb 4 years ago.
VBox.log.2 Download (55.1 KB) - added by hansb 4 years ago.
VBox.log.3 Download (54.9 KB) - added by hansb 4 years ago.
VBox.log.2.1 Download (55.2 KB) - added by hansb 4 years ago.

Change History

Changed 4 years ago by Perryg

Log file of x64 guest

Changed 4 years ago by Perryg

Win 7 log file

comment:1 Changed 4 years ago by Perryg

Update: I just installed Ubuntu 9.10(dual boot) VirtualBox 3.0.12 and SMP still does not work. Turning it off allows it to boot faster but still sluggish. NO GA installed on the first test run. Will report back tomorrow if GA helps but I rather doubt it. Attaching new log

comment:2 Changed 4 years ago by f.hoefling

I can confirm the same issue, as many others too:  http://ubuntu-virginia.ubuntuforums.org/showthread.php?t=1323670  http://forums.virtualbox.org/viewtopic.php?f=7&t=23978

I have Ubuntu Karmic (64bit, 2.6.31 kernel) as host, running Windows XP (32 bit) via VirtualBox 3.0.12 including Guest Additions. Windows is almost not useable, but ran smooth with Ubuntu Jaunty (2.6.28 kernel).

comment:3 Changed 4 years ago by frank

So far I was not able to reproduce such a case. Tested with a Karmic/64-bit on a Pentium D (2 x 3GHz) as well as on a Core 2 Duo. Didn't saw any performance difference to Jaunty so far.

comment:4 Changed 4 years ago by Perryg

Good morning Frank,

It is more prevalent in a Windows guest with Ubuntu 9.10 host. Linux guests work better (for me) but Windows guests are all but unusable. Selecting 1 processor you can use them but they are extremely slow. I am leaning to the Kernel or QT but I can not tell for sure. It appears that something is very different in the 9.10 full x64 version then it is in the 9.04. I also noticed that the Host and guest CPU stays maxed out If more than 1 CPU is selected. Even with it off the CPU never falls below 40% even when idle.

I have tried a clean install of 9.10, and upgrading from 9.04 but the results are exactly the same.

comment:5 Changed 4 years ago by frank

Actually I didn't wrote which guest I used, did I ;-) Tested with an SMP Jaunty guest as well as with a WinXP guest (1 guest processor only) so far. More tests will follow.

If the guest CPU is busy then there should be any guest application which is pegging the CPU.

comment:6 Changed 4 years ago by Perryg

Understood, You may want to try with Vista or Win 7. Sorry! These are the ones that I am testing with at the moment. I can install XPpro x64 in a little while and see, but from past experience Xp does not hammer the processor near as hard as Vista or Win 7. To see the real problem you will need to select 2 CPUs in the guest settings. Performance falls to near zero in that scenario.

comment:7 Changed 4 years ago by f.hoefling

As suggested in the forums (see above link), I've installed the "real-time" kernel for the host (linux-image-2.6.31-9-rt), which speeds the Windows guests significantly. The system, however, becomes pretty unstable and I won't continue this path. (E.g., adding a webcam to the guest resulted in a hanging guest with severe issues in the host too.)

Changed 4 years ago by Perryg

Latest log file

comment:8 Changed 4 years ago by Perryg

Frank, Update: I have been able to install the proper GAs 3.0.12 in VBox 3.0.12 Running on Karmic x64 and seems to be working as it should. (2)CPUs and such. I think the problem is with 3.0.10. Win 7 x64 is rocking between 0% 5% when idle now. Host is (Karmic) and is running at 22% fairly constant.

Starting and stopping the guest still takes a long time but once running it seems to settle down. While starting it appears that everything it loaded down as indicated by the CPU meter being maxed out and the start sound being choppy and distorted. I will let you know what else I find. I am attaching the latest log file as well.

@ f.hoefling, I am using the generic Kernel. Not sure about using the RT kernel as this could produce results that increase the processor usage of the host when virtualizing but not sure.

comment:9 Changed 4 years ago by hansb

Virtualbox with WinXP16 definitely unusably slow on Karmic Koala 64 generic kernel. 3.0.12 with GA used. With realtime kernel it speeds up for a while, then crashes :-)

comment:10 Changed 4 years ago by hansb

And, oh yes, I did select 2 CPUs for the VM. Need them there :-)

comment:11 Changed 4 years ago by frank

  1. What is WinXP16? A special flavor of Windows XP?
  2. How many cores does your host CPU have?
  3. Did you do the same test with Ubuntu 9.04 and was the performance better?
  4. Where is the VBox.log file of such a crashing session?

comment:12 Changed 4 years ago by hansb

WinXP16, haha, oops, was supposed to stand for the current standard *32bit* version of XP. I got it wrong. Sorry.

So its WinXP 32bit.

How many cores does your host CPU have?

Two. It's a Lenovo W500 system.

Did you do the same test with Ubuntu 9.04 and was the performance better?

No, but this 'performance' is utterly ridiculous. Last time I tried this was with 8.10 (Intrepid Ibex), which doesn't count because Virtualbox didn't support SMP back then.

Looks like I have to try Windows 7.

comment:13 Changed 4 years ago by f.hoefling

It seems that hansb describes exactly the same problems I have, see my post from 2009-11-19 13:19:14

WinXP (32bit) is not usable anymore on Ubuntu Karmic (generic, 2.6.31, 64-bit), but it ran flawlessly on Jaunty.

comment:14 Changed 4 years ago by f.hoefling

Note added:

I've selected 2 CPU cores out of the 4 available on my AMD Phenom II. I've tried with a single CPU and no virtualisation too - which seems to be even slower. (It takes about 2-3 minutes after entering the password until the desktop has started.)

comment:15 Changed 4 years ago by hansb

Ok. Tried Windows 7 64bit guest. Seems to run better than XP.

Guest Additions (installed as admin) seem to work, except:

  • audio is not working (Windows 7 reports no audio device installed), and
  • graphics acceleration does appear to work. Windows appears to use the Sun video driver etc., but the display (drawing windows) appears to be rather slow and sluggish.

Thanks Hans

comment:16 Changed 4 years ago by nextbgates95

Vista is extremely slow as well. Switching to rt kernel is no help.

comment:17 Changed 4 years ago by Perryg

You know without posting your Log Files it is not going to help. Just saying it is not right leads to no better understanding on what the problem really is. Please post the log files

comment:18 Changed 4 years ago by nextbgates95

I don't have log files right now. I just purged everything. I'll post them once I get it installed again.

comment:19 follow-up: ↓ 20 Changed 4 years ago by christer.holmer

I updated 64-bit 9.04 to 9.10. Virtual Box 3.0.12 running 32-bit Win XP is unusable. Currently running 6 out of 8 vCPUs (Intel i7 860). Will try 1 vCPU.

comment:20 in reply to: ↑ 19 Changed 4 years ago by christer.holmer

Replying to christer.holmer:

I updated 64-bit 9.04 to 9.10. Virtual Box 3.0.12 running 32-bit Win XP is unusable. Currently running 6 out of 8 vCPUs (Intel i7 860). Will try 1 vCPU.

1 vCPU is responsive, but still not what I desire.

comment:21 Changed 4 years ago by frank

It seems the main reason for the slowness on Karmic is that the Ubuntu guys decreased the host timer frequency from 250Hz (Jaunty) to 100Hz (Karmic). A lower host timer frequency makes it more difficult for VirtualBox to get the guest time right. Perhaps we can tune this a bit more but not for 3.1.0.

comment:22 follow-up: ↓ 37 Changed 4 years ago by christer.holmer

I found this kernel bug report:  https://bugs.launchpad.net/ubuntu/+bug/459628 while reading a VMWare discussion about a similar problem for VMWare Workstation on 9.10:  http://communities.vmware.com/thread/239982?start=0&tstart=0

comment:23 Changed 4 years ago by Perryg

Thanks Frank, I had a bad feeling it was going to be something like this. I will wait until you have further word. I have also contacted Ubuntu to see if there is anything I/we can do in the mean time.

comment:24 Changed 4 years ago by Perryg

Just to let you know the issue is still there in the final release of 3.1.0. I have noticed that this is starting to effect the Linux flavors more as we add fix things. Karmic x64 2 CPUs struggles and 1 cpu is having difficulties too, just not as bad as Windows guests of course.

I don't suppose you know of anything that I can do to the host or the guest to help this until you have time to look at it? Right now using a guest in the Karmic host is almost painful.

comment:25 Changed 4 years ago by frank

I made the experience that this does not apply to all SMP guests on Karmic, I tested some Linux guests which are almost fine.

comment:26 Changed 4 years ago by Technologov

Guest SMP support is never a "blocker" bug, it must be reduced to "major".

-Technologov

comment:27 Changed 4 years ago by mpaja

Recompiling Karmic kernel and setting the timer frequency to 250Hz cured this for me. I'm on amd64 Karmic (Kubuntu 9.10) host, AMD 7750 CPU, WinXP SMP guest.

For kernel compilation  http://tinyurl.com/yb7pp5a instructions worked well.

comment:28 Changed 4 years ago by rykasimba

I am having this issue as well. XP is much slower than Window 2003. With 1 cpu both are manageable, but with 2 CPUs both grind to a halt

comment:29 Changed 4 years ago by decourl

I was also able to resolve the issue with Karmic amd64 slow Windows guest performance with SMP by recompiling the Karmic kernel with a timer frequency of 250Hz. Personally I found this guide to be easier to follow:  http://www.howtoforge.com/roll_a_kernel_debian_ubuntu_way

comment:30 Changed 4 years ago by Perryg

I too did an experimental build setting the host_freq_timmer @ 250Hz and it does fix the lag if using a single processor (sound is still an issue). Multiple processors are still sluggish but improved about 50%.

Plus you need to consider the down side of a custom kernel. You loose all support from Ubuntu when you do this. You can't even file a bug report (as stated by Ubuntu) because they will throw out all reports from a custom kernel.

Anyway I am still working on this and hopefully I can find the rest of problems.

Disclaimer: I do not actually need this. I am doing the research for the experience and to let you know that there is a problem. Also unless you want to have additional problems double check the last entries in the make xconfig and make sure that you take off the KVM support. It was enabled by default and I already know it has issues with VirtualBox. Yes I made this mistake on the first build :-)

Changed 4 years ago by JeRa

VB log of SMP WinXP (32-bit) on Kubuntu 8.10 (64-bit)

comment:31 Changed 4 years ago by JeRa

I'm having the same problem with guest Windows XP (32-bit) so I attached my log. Is the default ubuntu kernel config host_freq_timer just plain bad or is it a VB bug?

comment:32 Changed 4 years ago by Perryg

I have tried the kernel release v2.6.32-020632-generic from the Ubuntu Kernel PPA and it does seem to help a lot without compiling yourself see link  http://kernel.ubuntu.com/~kernel-ppa/mainline/v2.6.32/

According to the change log they did some work with the CPU time and other related areas that improved the speed.

I did re-compile the 2.6.31-16-generic x86_64 with the host timer freq set at 250Hz and while it did work better it did not work as well as the latest release from the PPA.

The sound is still garbled with 2.6.32 and this may be due to the fact that the KTF is still set to 100Hz but I have not gotten that far into the new kernel yet.

Also it is important that you remember that you will need to recompile VBox for the new kernel so you will need both the linux-headers all and the one that is specific to your build. If you have special video drivers they will need to be recompiled as well.

comment:33 in reply to: ↑ description Changed 4 years ago by fwmmaya

Setting the timer frequency to 250Hz worked for me as well. Just for the records, karmic i386 comes by default with 250Hz and, guess what, exhibits no problem at all.

comment:34 Changed 4 years ago by terroreek

Hi Folks,

I had this issue as well the realtime kernel did solve the issue for me, I did try to re-compile a custom kernel from the ubuntu source with a 250Hz timer that did help but did not solve the problem like the realtime kernel. However that being said there was a new 2.6.31-16 generic kernel image that was available for download and now both generic and realtime kernels run virtualbox perfectly.

Anyone having this problem should update.

comment:35 follow-up: ↓ 36 Changed 4 years ago by terroreek

Ok apparently I am too tired to type but the latest generic kernel resolved the slow perfomance on Karmic x64 with smp.

comment:36 in reply to: ↑ 35 ; follow-up: ↓ 39 Changed 4 years ago by JeRa

Replying to terroreek:

Ok apparently I am too tired to type but the latest generic kernel resolved the slow perfomance on Karmic x64 with smp.

I updated to linux-image-2.6.31-16-generic (v2.6.31-16.53) but haven't seen any improvement in SMP performance.

comment:37 in reply to: ↑ 22 Changed 4 years ago by Peter P.

Please see also:  https://bugs.launchpad.net/ubuntu/+source/linux/+bug/479440
Consider selecting "This bug affects me too" at that launchpad page!

comment:38 Changed 4 years ago by guim

The bug is still present with 2.6.31-17-generix kernel.

comment:39 in reply to: ↑ 36 Changed 4 years ago by christer.holmer

Replying to JeRa:

Replying to terroreek:

Ok apparently I am too tired to type but the latest generic kernel resolved the slow perfomance on Karmic x64 with smp.

I updated to linux-image-2.6.31-16-generic (v2.6.31-16.53) but haven't seen any improvement in SMP performance.

Kernel 2.6.31-16-generic is still 100 Hz

$ diff config-2.6.28-11-generic config-2.6.31-16-generic |grep CONFIG_HZ=|more

CONFIG_HZ=100

< CONFIG_HZ=250

comment:40 Changed 4 years ago by terroreek

Well when I was having issues, I custom complied a kernel from source and changed the frequency from 100HZ to 250HZ and that did not solve the problem for me at all. That being said, looking at the link provided to the bug report I did not change the Preempt value to PREEMPT=Y. I then installed the realtime kernel and that seemed to resolve my problem. VirtualBox was unusable until I installed the realtime kernel.

Several days later the 2.6.31-16.53 kernel was available for download, I grabbed it and installed. Booted into the kernel and checked to see if the updated Kernel fixed Virtualbox performance, and it was indeed back to normal for me on the generic kernel. perryg also reported changing the timer frequency to 250HZ did not resolve the issue either for him. I thought I would post that the updated kernel resolved the issues for me, until that point all my VM's (linux and windows) were unusable.

comment:41 Changed 4 years ago by f.hoefling

It seems that the kernel update to 2.6.31-16.53 resolved the problem for me too. Interaction with the VM is smooth again.

The only issue is that the machine sometimes resets itself during the Windows startup procedure. But this should go to another ticket.

comment:42 Changed 4 years ago by mrbmason

I just updated from 9.04 64bit to 9.10 64bit. I had vbox 3.0.12 and my 32bit Vista enterprise image was running slow as all of you have reported here. I upgraded to vbox 3.1.0 r55467 and things are still running slowly. I have a Core2 Duo P8700 2.53Ghz box and my Vista image is configured to use 2 CPU's. My host kernel is 2.6.31-16.53 generic. I tried the real time kernel and them image crashes hard just after image boot up with vbox 3.1.0. When I hade 3.0.12 and the real time kernel, I could boot, but it would crash when I started running unit tests in my MS 2005 development studio in the image. I don't want to custom build my kernel but will if I have too. Has anyone else had any success with the latest kernel?

comment:43 Changed 4 years ago by mrbmason

Dropping the number of CPU's in my image to 1 makes it at least usable. Still slower than 9.04.

Changed 4 years ago by frank

testcase (hrtimers enabled)

comment:44 Changed 4 years ago by frank

Please could you replace the file /usr/src/vboxdrv-3.1.0/r0drv/linux/timer-r0drv-linux.c with  this one (make sure to backup the original file), recompile your host kernel drivers (/etc/init.d/vboxdrv setup) and check if this somehow improves the behavior? The file I posted uses kernel high-resolution timers instead of the standard kernel timers.

Feedback appreciated!

comment:45 Changed 4 years ago by Perryg

@frank,

I tested this on a few kernels and the results are below:

Using Vista Business 64 SMP on 2 cpu as test since it is by far the worst. Also tried this with 3D/2D installed and working and without. It does not seem to make a difference with these drivers either way, so I think we can exclude them as a problem.

2.6.31.6-generic, seems to help stability but is very slow. Almost 1/3 of the proper speed. ( resembles throttling )

2.6.32-020632 (latest pre-compiled kernel from PPA) Works better, but is lacking in speed. Still better stability with your patch.

2.6.32-custom (250Hz KTF, Preempt=Y) seems to be the trick. Fast and so far no kernel panic (100% cpu) with your patch.

None of the above can have the legacy AC'97 drivers as this throws the kernel into a panic, or sound is unusable when it does load. I have installed the latest driver from reltek but those still show as 32 bit sound.

I will test this on XPpro x86_64, and several other OSes later today and let you know what I find, but these as I say do work better anyway (except 9.10 which seems to be plagued with problems at this point) Funny thing is 10.04 actually works better and it has just hit alpha. Go figure.

comment:46 Changed 4 years ago by frank

Thanks Perry! So on 2.6.31.6-generic VBox with my patch is actually slower than with the default module?

Throws the kernel into panic -- guest kernel or host kernel? Note that 3.1.2 will contain some stability fixes for SMP guests.

comment:47 Changed 4 years ago by Perryg

Frank, I would not say it is slower at all but close to the same speed maybe a touch faster it is hard to tell. It does appear to be a little more stable to me though.

The actual guest locks up and the 100% CPU is the Host. It almost always locks up before a total boot when it locks. I have seen the guest meters a few times and the CPU meter is close to max when it locks, but everything just freezes. The host is still functional albeit really slow when this happens so it would appear to me it is all due to the guest/VBox. I will try to see what is consuming this cpu time a little better so we can know what is hogging it later today.

Let me know what else you would like to test and I will be more than happy to do so.

comment:48 Changed 4 years ago by frank

Ok, and the lock ups were introduced by my patch or did you observe them before? Sorry if you already mentioned that.

And another question: Do we know the exact package number of the kernel package which started this slow behavior? My problem is that I can reproduce the problem only partly. Using a Core 2 Duo here with Ubuntu Karmic / AMD64 with a Windows 7 / x64 guest. The guest is slower with guest 2 CPUs but not that slower than reported by others.

comment:49 Changed 4 years ago by Perryg

Lockups were before your patch. Fewer lockups with your patch. Problem first started with the default 9.10 Kernel (2.6.31-14-generic) and were not present in any 9.04 kernel (Linux kernel 2.6.28)

I am using an Intel Core 2 vPro  http://www.intel.com/products/vpro/index.htm

You can really see the problem with 9.10 default as host and Vista business as guest. Win 7 not so bad. Seems the harder you press it the slower it goes.

What I find interesting is that by compiling the Host kernel to use 250Hz KTF and PREEMPT=Y and your patch. It is as fast as native using 2 cpu. CPU idle is <=5% (Truly amazing!) I myself don't have a problem with this but it could really mess with the general user. Oh and another thing from what I am seeing what works for some does not work for others. I find this really strange.

I will let you know about XPpro and a few others later today.

comment:50 Changed 4 years ago by Perryg

XPpro 64 bit 2 cpu: start to logon screen in seconds. Patch installed in both tests. CPU Freq. locked at performance (2.4Ghz). Guest OS is detecting the proper Freq, memory, and all passed drivers/parameters in both tests.

default 2.6.31-generic =47 seconds
Custom 2.6.32-30 build =15 seconds

Exactly 3 times difference as I had observed visually.

As far as I can tell it is defiantly a Host problem. VirtualBox appears to handle what it can but with the host not being responsive there is just so much you can do IMHO. But I have been wrong once in my life if I remember correctly.

Changed 4 years ago by aeichner

hrtimers

Changed 4 years ago by aeichner

hrtimers

Changed 4 years ago by aeichner

hrtimers

comment:51 Changed 4 years ago by aeichner

Perry can you replace the new attached files with ones in /usr/src/vboxdrv-3.1.0/r0drv/linux/, recompile the modules and test if it improves anything please? Thank you!

comment:52 Changed 4 years ago by Perryg

Good evening aeichner,

Renamed original files placed the new ones from you in the proper location. I was booted in the 2.6.31-generic kernel. Ran /etc/init.d/vboxdrv setup. Finished compiling and started VBox. Results below:

XPpro boot time 60 seconds to logon screen
Vista boot time 4 1/2 minutes to logon screen

Appears to be slower and is also slower in the OS after boot. But just like the file that frank sent it did not freeze up so let me know what else you need.

Changed 4 years ago by Perryg

Vista-freeze.jpg

comment:53 Changed 4 years ago by Perryg

I also tested this with my custom kernel and it too is a little slower:

XPpro = 20 seconds to logon was 15 seconds before the latest files.
Vista = 30 seconds to logon was 20 seconds before the latest files.

I also had another lock up They are random and this was the first one today. Vista should not CPU usage but the host was showing 194% cpu on virtualbox. (startvm)

Attaching Vista-freeze.jpg

comment:54 Changed 4 years ago by frank

Thanks Perry for your help. Actually the real cause for this problem is still not known. We need to gather more statistics but we have to release 3.1.2 right now. Hopefully we find the fix for VBox 3.1.4.

comment:55 Changed 4 years ago by Perryg

Not a problem frank. I have it under control. Just others are struggling with it and it appears I can be of assistance. :-)

comment:56 Changed 4 years ago by Perryg

Well I have been experimenting again.
Seems the latest kernel 2.6.32-02063201-generic has the problem fixed.

Strange thing is the KTF is still set to 100Hz, and Preemption model=PREEMPT_VOLUNTARY

You can see it here. Maybe it will give you a clue as to what needs to be done.  http://kernel.ubuntu.com/~kernel-ppa/mainline/v2.6.32/BUILD.LOG

I wonder what I am missing. I can make this work on the older kernels by adjusting the KTF and setting PREEMPT to true, but for the life of me I can't see anything else that may be wrong.

Changed 4 years ago by Perryg

Working Vista

comment:57 Changed 4 years ago by linyunfeng

Follow Perryg's suggestion: I have upgrade my kernel to PPA 2.6.32 version and install the virtualbox to 3.1.2.

I could use my windows 7 enterprise on 64bit karmic with dual core smp support perfectly.

The performance is really good! I could finally do real development work in vm now.

Thanks for the information!

Changed 4 years ago by linyunfeng

Windows 7 with smp support. CPU performance is good

comment:58 Changed 4 years ago by oetiker

I have tried all the tricks (24 GB ram host with 8 cores and 64bit 2.6.32.2 kernel, preempt, 250 Hz, timer-patch) to no avail, windows 2k8(R2)64bit guests keep behaving oddly. Booting is not much of a problem, but as soon as the system comes under a tiny bit of load performance becomes abysmal ... otherwise well behaved processes like explorer.exe suddenly use 100% cpu while browsing the file tree. Even the taskmanager itself uses up to 30% cpu ...

I have now downgraded to 3.0.12 and things seem to work more reasonably.

cheers tobi

comment:59 Changed 4 years ago by hj

Same trouble: host kernel 2.6.31.17 64 bit, twin dual opteron (285) slugish or very slow or hickups in performance in guest

virtualbox 3.0.12 and 3.1...; KTF = 250.

new function in virtualbox?? using something new in the kernel?? The big question: can i switch it off?

comment:60 Changed 4 years ago by Perryg

@hj,

Did you read the entire work log? The only thing that you can do AFAIK is posted 3 up from yours, unless you recompile the kernel as stated above or set the processors to (1).

comment:61 Changed 4 years ago by hj

solution,

very weird but it does work!

delete you machine in virtualbox create a new one and connect your existing virtual harddisk.

speed machine is back!

my suggestion that some old variable from the previous versions of virtualbox is messing with the setup in the new virtualbox.

greetings

comment:62 follow-up: ↓ 64 Changed 4 years ago by hj

found on another forum: update processor in system properties in the host. works also? I updated in all guests the virtualbox device

comment:63 Changed 4 years ago by hj

read guest instead of host.

comment:64 in reply to: ↑ 62 Changed 4 years ago by oetiker

Replying to hj:

found on another forum: update processor in system properties in the guest. works also? I updated in all guests the virtualbox device

What do you mean by updating the processor ?

cheers

comment:65 Changed 4 years ago by terroreek

The problem with perryg's method is as far as I can tell is a kernel for lucid nor karmic, and there isn't a repo that one adds so you can stay up to date on security updates.

comment:66 Changed 4 years ago by Perryg

I feel some explanation is in order. First the kernel is a kernel. The one that Ubuntu 9.10 uses is borked when it comes to SMP as stated above. I have been seeing some of the same in Fedora hosts that are using a close facsimile as well.

The security issues are usually not within the kernel but the supporting files and programs. Even so these kernels are released around every 2 to 4 weeks and I am currently using 2.6.32-02063202-generic on my main system and running 2.6.33-020633rc3-generic in a test machine. All of these work flawlessly in VirtualBox. Even though they still have the KTF=100 and PREEMPT=V.

I think the entire point is that the kernel that Ubuntu 9.10 uses is the main problem. If this were a VirtualBox problem then it surely would not work with the kernels that I am presently using.

Another thing to realize is Most of the development effort is being poured into the next release (10.04) and I see no one working on the issues at hand as far as fixing the SMP issues in Virtualized systems from Ubuntu.

Anyway the choice is always yours. I use the new kernel with no side effects and have multi-processors and my CPU idles at 1-2%. This makes me happy. Also I do not see any of the loading issues that other are reporting. I rarely see the CPU meter above 60% for most tasks and have the CPU of the host set to on demand.

comment:67 follow-up: ↓ 68 Changed 4 years ago by hj

Reply to oetiker ,

some folks using windows (i do..) as guests are updating or re-install some system settings in the guests.

for example the virtualbox driver, acpi driver, processor driver etc.

It seems logical: I lost in all my virtual guests the multiprocessor setup. ( i do not have amd-v).

Did someone try the same: using the virtual disks and create a new guest setup?

comment:68 in reply to: ↑ 67 Changed 4 years ago by oetiker

Replying to hj:

Reply to oetiker ,

some folks using windows (i do..) as guests are updating or re-install some system settings in the guests.

for example the virtualbox driver, acpi driver, processor driver etc.

It seems logical: I lost in all my virtual guests the multiprocessor setup. ( i do not have amd-v).

Did someone try the same: using the virtual disks and create a new guest setup?

I did when moving back down from 3.1 to 3.0.12 ... no joy ... I moved back to vmware server for now the system is about twice as fast ... :-( hope virtual box gets this fixed ... see  http://tobi.oetiker.ch/test/virtualbox_vs_vmware.png (red is vbox 3.0.12 and green in vmware server 1.0.8, same guest, same host)

comment:69 follow-up: ↓ 70 Changed 4 years ago by rawj

I can confirm what Perryg has stated above. On my system (Ubuntu 9.10 x64, AMD Phenom II 940, 8 GB RAM, VBox 3.1.2) switching to the x64 kernel 2.6.32-02063203-generic fixes the SMP slowness problems I was having in my various guests. Two or more processors in the virtual guest (Win 7 x64, Win XP x32 and Karmic x64) work fine with none of the slowness of the 2.6.31 series of kernels native to Ubuntu Karmic.

comment:70 in reply to: ↑ 69 Changed 4 years ago by mlaker

Like rawj and Perryg, I saw a substantial speed-up in multi-core VMs when I upgraded the host system to amd64 kernel 2.6.32-020632. There was no need to upgrade the kernel in the guest. However, on the host, dkms couldn't compile fglrx (the module for my ATI graphics card) under the new kernel. As a result, once I'd rebooted the host, screen updates were horribly slow in both host and guest. On the host, /var/lib/dkms/fglrx/8.660/build/make.log contained this text:

/var/lib/dkms/fglrx/8.660/build/2.6.x/kcl_io.c: In function ‘KCL_IO_FASYNC_Terminate’:
/var/lib/dkms/fglrx/8.660/build/2.6.x/kcl_io.c:122: error: ‘SIGIO’ undeclared (first use in this function)
/var/lib/dkms/fglrx/8.660/build/2.6.x/kcl_io.c:122: error: (Each undeclared identifier is reported only once
/var/lib/dkms/fglrx/8.660/build/2.6.x/kcl_io.c:122: error: for each function it appears in.)

The cause was a missing #include-directive. It was easily remedied. As root, on the host, I edited /usr/src/fglrx-8660/kcl_io.c. I scrolled down by a page or two, and found the #include directives. Just after the line that included asm/io.h, I added the following line:

#include <asm/signal.h>

Having saved the file, I ran the following commands:

sudo dkms build -m fglrx -v 8.660
sudo dkms install -m fglrx -v 8.660

I then rebooted the host. (There may be some clever way to avoid the reboot, but I don't know it.)

I now have a fast, multi-core VM and fast screen updates on the host.

comment:71 follow-up: ↓ 72 Changed 4 years ago by Perryg

@mlaker, I am curious to know if you installed the kernel-headers for the Linux image. Both generic and the AMD64? I run an nvidia video card with special drivers and since I had the headers it recompiled that mod for me. Glad to see you are again having a fast system with VirtualBox.

comment:72 in reply to: ↑ 71 Changed 4 years ago by mlaker

Replying to Perryg:

@mlaker, I am curious to know if you installed the kernel-headers for the Linux image. Both generic and the AMD64?

Yes, I installed them both at the outset. I still had to edit the fglrx code before it would compile.

I run an nvidia video card with special drivers and since I had the headers it recompiled that mod for me.

nVidia cards don't use fglrx: it's a driver for ATI cards. Therefore, your system wouldn't be affected by a bug in fglrx. It's possible that you don't even have the fglrx package installed.

Glad to see you are again having a fast system with VirtualBox.

Indeed. Many thanks to the team at Sun for an excellent product.

comment:73 Changed 4 years ago by Fausto Falcone

VB is running perfectly on my system now.
I am using release candidate of 2.6.33 (.deb package from ppa). See  http://www.virtualbox.org/changeset/25591
The version 2.6.32 generates a bad video (something like a strong flicker).
Thanks

comment:74 Changed 4 years ago by etdub

Same problem here; WinXP (i386) was terribly sluggish and slow under a x86_64 karmic host (using vbox 3.1.2). I use this VM for daily development work and it has been a frustrating experience. I upgraded to kernel 2.6.32-02063204-generic ( http://kernel.ubuntu.com/~kernel-ppa/mainline/v2.6.32.4/), the VM runs fast and snappy now. No bad side effects noticed for the moment.

Thanks to everyone here involved in finding the fix!

comment:75 Changed 4 years ago by tgall

I am using a Vista guest with 4 cores, and in the Windows taskmgr.exe all four cores have 100% usage at idle. On my Ubuntu host VirtualBox is is usually between 200-250 %CPU with the guest at idle (each processor is at about 50% on the host, which is plenty for GNOME/Linux). Obviously, this is unusable. Strangely, when I upgraded to 2.6.32-02063204-generic, the problem did not improve. I have even tried downgrading to 2.6.28-11.

When I reduce the guest to 1 CPU the both taskmgr and GNOME's System Monitor show only 50% usage of a CPU, but response times seem to be much better. Letters I type into notepad show up immediately instead of 20seconds later, but the system is still not useable. So while I can now run FreeCell (a simple cardgame), it runs to slowly for me to accurately place the mouse.

Are there other known problems with Karmic whose ticket you can refer me to?

comment:76 Changed 4 years ago by Perryg

@tgall, What version of VirtualBox are you using? It sounds like you are using an older version that did have some problems with high CPU usage. I have not see this in any version since 3.0.8 or .10 Plus it really does no good if you do not attach the VBox Log File with your report.

comment:77 Changed 4 years ago by hansb

Hi folks! Unfortunately nothing works here. Need to set up a Virtualbox W2k guest machine to run some legacy apps. However, whatever I do, as the guest machine starts CPU usage of the host goes to 100% and stays there. Guest is idle with CPU usage of 0-2%. 2CPU VTx host and 2CPU VM, tried all kinds of enabling and disabling hardware (USB, Network, Sound, different RAM sizes (512MB-3GB), etc. Guest additions installed. Virtualbox 3.1.2.r56127. No difference in behavior between Kernels 2.6.31.17-generic and 2.6.32.02063205-generic. I'll upload the log files. Right now I'm out of ideas and would appreciate any help. Thank you very much!!

comment:78 Changed 4 years ago by hansb

The host is x64 and the guest (Win2k) 32bit.

Changed 4 years ago by hansb

Changed 4 years ago by hansb

Changed 4 years ago by hansb

Changed 4 years ago by hansb

comment:79 Changed 4 years ago by hansb

Just for the heck of it I copied the drive (.vdi) of the W2k machine over to my Windows 7 machine (same CPU), which has also the same version of Virtualbox installed. Created a new Windows 2000 machine, linked the drive to the machine, and ... voilá! Same behavior. Guest is ok with about 0-5% CPU usage, host is practically down with 100% CPU usage on both CPU's while the VM is running. So, this does not have anything to do with the Karmic host. It's all about Virtualbox and a Windows 2000 SMP guest. This is a plain vanilla fresh Windows 2000 install (Service Pack 4 and guest additions). Log file follows. I understand that this is off topic now here in this thread. I am just posting it for completeness and would appreciate to hear from the team before creating a new ticket (maybe it already exists, search wasn't available just now). Thanks!

Changed 4 years ago by hansb

comment:80 Changed 4 years ago by cp1

Thanks everyone -- I had the same problem here and upgraded the kernel as suggested, and now it works fine. For those who don't know how to upgrade the kernel:

  1. go to the link above,  http://kernel.ubuntu.com/~kernel-ppa/mainline and pick one.
  2. Download 3 files: (replace xxxx with the version number)
    1. linux-headers-xxxx-_xxxx_all.deb
    2. linux-headers-xxxx-generic_xxxx_i386.deb (if 32-bit) -or- linux-headers-xxxx-generic_xxxx_amd64.deb (if 64-bit)
    3. linux-image-xxxx-generic_xxxx_i386.deb -or- linux-image-xxxx-generic_xxxx_amd64.deb
  1. run sudo dpkg -i on the files in the order a, b, c

comment:81 Changed 4 years ago by christer.holmer

Hi!

Problem solved for me as well by installing the way cp1 described.

However, I had to uninstall NVidia Driver and VirtualBox before installing new Kernel. Had some problem with the kernel modules. In addition, I had to download VirtualBox .deb and install manually with dpkg, since 'apt-get install virtualbox-3.1' failed.

comment:82 Changed 4 years ago by frank

An interesting test would be probably to pin the CPU freq profile to performance when using the 2.6.31 kernel. Sometimes I have the feeling that on Ubuntu, the CPU frequency daemon decreases the CPU frequency too often.

comment:83 Changed 4 years ago by Perryg

I had already tried that myself. and it actually made no difference for me.

Actually the only thing that did was to choose a single CPU with the 2.6.31 kernel, or replace it with a self compiled (with the above configuration changes), or bite the bullet and move on to the 2.6.32 kernel which does not have this problem. It is a lot more noticeable on a core 2 duo

comment:84 Changed 4 years ago by frank

Thanks Perry. The problem is that on my system it is very difficult to reproduce the problem. And by comparing the two configurations (2.6.31-something and 2.6.32-something) of Ubuntu I cannot spot any important change which could lead to the observed behavior. The only difference worth mentioning is CONFIG_TREE_RCU (2.6.32) and CONFIG_TREE_CLASSIC (2.6.31) but this shouldn't make the difference.

comment:85 follow-up: ↓ 86 Changed 4 years ago by Perryg

I totally understand. The Ubuntu team can't figure it out either. I guess the cause may be moot at this point since it can be fixed by using the 2.6.32 kernel. Lucid is due out this month and most people will simply upgrade.

One of life's little mysteries.

comment:86 in reply to: ↑ 85 Changed 4 years ago by benster21

I had the same problem : An up-to-date Ubuntu 9.10 and the latest VirtualBox installation, until yesterday. I did the upgrade to Ubuntu 10.04 and without changing anything to my VirtualBox configurations, it now works like a charm.

I am pretty sure that I have still the same linux-header version number (kernel version), passing from my ubuntu 9.10 to 10.04. I did not wrote down the previous one but like I said, I am pretty sure that it is the same one.

comment:87 Changed 4 years ago by mlaker

Ubuntu 9.10 uses kernel 2.6.31; Ubuntu 10.4 uses kernel 2.6.32. (I have both running in parallel in VMs, and so it's easy for me to check. The ability to try out a new release before committing to it is the main reason I do almost everything inside VMs.)

To make Ubuntu 9.10 into a well-behaved VB guest when multiple cores are exposed to it, you can install kernel .32 from the PPA on to the guest -- but I don't think we've proved conclusively whether the difference is some change between stock .31 and .32 kernels or the different way in which Ubuntu's .31 kernel and the PPA's .32 kernel were compiled. Since other distros seem not to have the same problem, my gut feeling is that it's the latter.

comment:88 Changed 4 years ago by frank

  • Priority changed from blocker to major

comment:89 Changed 3 years ago by Perryg

At this point since we have all moved on and there are actually working solutions, I think we can close this ticket.

comment:90 Changed 3 years ago by frank

  • Status changed from new to closed
  • Resolution set to fixed

Thanks.

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use