Very slow performance on Ubuntu guest with Windows XP host

Discussions about using Linux guests in VirtualBox.
Post Reply
strangeelement
Posts: 21
Joined: 21. Oct 2008, 18:20
Primary OS: MS Windows XP
VBox Version: PUEL
Guest OSses: Ubuntu 9.10

Very slow performance on Ubuntu guest with Windows XP host

Post by strangeelement »

I am running a Ubuntu Hardy guest on a XP host with a fairly good machine: dual Athlon 64 X2 4200+ with 3GB RAM and an ATI Radeon X1650 512MB RAM. I set up the Ubuntu guest as a Web development machine. The principle is amazing, whenever I want to work I simply fire up the VM, having nothing on my XP desktop related to development.

I set up the Ubuntu guest with 1 GB of RAM and 128 MB of video RAM. The Ubuntu guest's performance is atrocious. Most of the times, it feels like I am running a 486 with 16 MB of RAM.

Over time the VM got slower and slower. I mainly have Firefox, Zend Studio and a terminal window open. Zend Studio (java app) is by far the worst. It can often take seconds for characters I type to fill in. Opening files takes several seconds. The entire display is often unresponsive.

Switching between applications, tabs in FF or files in Zend Studio often takes takes seconds.

As far as I know I set things up correctly. I installed the VB guest tools and attributed plenty enough to the machine to work properly.

Is there something I can do to improve performance or that I missed? In the beginning, performance was acceptable and I would really like to avoid recreating the VM.

When I check the system monitor, the only particular thing I notice is that Xorg is usually taking whatever is left of the CPU, usually hovering around 50-60%. Memory is always adequate, never taking much more than 70%.
stefan.becker
Volunteer
Posts: 7639
Joined: 7. Jun 2007, 21:53

Post by stefan.becker »

Please post the exact Guest Settings (Screenshot from VBOX Window).
strangeelement
Posts: 21
Joined: 21. Oct 2008, 18:20
Primary OS: MS Windows XP
VBox Version: PUEL
Guest OSses: Ubuntu 9.10

Machine settings SS

Post by strangeelement »

The main window?


Image
oceallaighm
Posts: 36
Joined: 10. Jun 2008, 11:31

Post by oceallaighm »

I have been running Ubuntu 8.04.1 on Vista Home Premium with 4Gb Ram and an AMD 64 x 2 Tk57 processor and 160GB HDD.

As I have stated before it works as though it is running directly on hardware. I noticed on your screen shot that you have 128MB video, I am only using 24MB and I have been told that all that I need is 8MB.

The other thing that I noticed is that you have PAE/NX enabled, I have it disabled. I hope that this is of some help.
stefan.becker
Volunteer
Posts: 7639
Joined: 7. Jun 2007, 21:53

Post by stefan.becker »

Which version of VBOX?
strangeelement
Posts: 21
Joined: 21. Oct 2008, 18:20
Primary OS: MS Windows XP
VBox Version: PUEL
Guest OSses: Ubuntu 9.10

Post by strangeelement »

I'm running VBox 2.0.2 and checking regularly for the latest version.

The problem started with version 1.6 and continued after I upgraded.

I will try disabling PAE/NX and reduce the VRAM, although the latter should obviously not reduce performance.
strangeelement
Posts: 21
Joined: 21. Oct 2008, 18:20
Primary OS: MS Windows XP
VBox Version: PUEL
Guest OSses: Ubuntu 9.10

Post by strangeelement »

Disabling PAE/NX prevents the machine from booting:
This kernel requires the following features not present on the CPU: 0:6
Unable to boot - please use a kernel appropriate for your CPU.
So I guess it's best to leave it enabled :)
strangeelement
Posts: 21
Joined: 21. Oct 2008, 18:20
Primary OS: MS Windows XP
VBox Version: PUEL
Guest OSses: Ubuntu 9.10

Post by strangeelement »

VERY INTERESTING...

I first lowered my VRAM down to 64MB, down from 128MB, and the CPU usage dropped down to around 80% when idle.

I lowered it again to 32MB and now my CPU usage hovers around 20-25%, shooting up when something displays like the Synaptic software update notification.

If I check the processes, I still see Xorg taking a large chunk of the CPU whenever I do something and for a few seconds afterwards. I see Xorg at 50-70%, then dropping to about 9%, sometimes shooting up to 70% again.

If I simply move the cursor, I see Xorg shooting to 70% and CPU usage increasing up to 90%. If I stop moving the cursor, CPU usage usually settles down to 20-25%, although barely nothing is running.

If I continually move the cursor, System monitor stops refreshing until I stop, displaying at around 85% before dropping down.

I think this has something to do with my Ubuntu install. Seeing this, I am tempted to recreate the VM from scratch.
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Post by Sasquatch »

Strangeelement, as it appears you need PAE/NX enabled for it to boot properly, I would say that you have installed the Server edition and added the GUI manually. If that is true, what happens if you install the -virtual kernel, or -generic instead of the -server? The Server kernel is not optimised for graphical use, as it should be run, yes you guessed it, servers. And they are in general without a GUI, just a CLI so that they have more spare resources for the things they are designed for.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
fixedwheel
Volunteer
Posts: 1699
Joined: 13. Sep 2008, 02:18

Post by fixedwheel »

strangeelement wrote:I lowered it again to 32MB
what is the max. screen size? - 8MB is enough for 1920x1200 @24bit

and, is there any compiz active?
strangeelement
Posts: 21
Joined: 21. Oct 2008, 18:20
Primary OS: MS Windows XP
VBox Version: PUEL
Guest OSses: Ubuntu 9.10

Post by strangeelement »

Sasquatch's guess (dead on) is correct: I am running the server version of Ubuntu with desktop installed on top.

I chose this setup so I would be 100% sure to run the same configuration on my workstation as I do on my server. I assumed it would enable the proper changes in the kernel (something I am not quite familiar with) but it probably does not do so 100%. I mostly chose this setup to be able to roughly automate the setup process using the same script on the server + ubuntu-desktop for the workstation. I wanted to be able to setup a new workstation very quickly. The downsides ended being too much to handle anyway.

I was mostly motivated to do so after an unexpected image time reversal with VMWare: the VM I was using one day rewinded back to about a month before. Since switching to VirtualBox however I have never experienced any problem.

I will recreate the VM using the desktop version of Ubuntu. Sad I have to do this with only 9 days left before 8.10 comes out. I'll take my chance with the beta.

fixedwheel, I am running at 1440x900 with minimal graphics enabled.
fixedwheel
Volunteer
Posts: 1699
Joined: 13. Sep 2008, 02:18

Post by fixedwheel »

strangeelement wrote:I will recreate the VM using the desktop version of Ubuntu.
i would try another kernel instead of reinstall.
open synaptic and search for linux-image... my 8.04 guest is running the "generic" one
strangeelement wrote:1440x900 with minimal graphics enabled.
8MB is enough
strangeelement
Posts: 21
Joined: 21. Oct 2008, 18:20
Primary OS: MS Windows XP
VBox Version: PUEL
Guest OSses: Ubuntu 9.10

Post by strangeelement »

Alright I'll try that.

Once I can find how to switch to that kernel after installing it...
fixedwheel
Volunteer
Posts: 1699
Joined: 13. Sep 2008, 02:18

Post by fixedwheel »

ubuntu hides the grub boot menu: press Esc immediate after the vbox bios screen

you could modify /boot/grub/menu.list and run sudo update-grub (be careful, and read: its documented in the comments)


edit, and dont forget to install the linux-headers-...-generic, you need them for guest additions reinstall
strangeelement
Posts: 21
Joined: 21. Oct 2008, 18:20
Primary OS: MS Windows XP
VBox Version: PUEL
Guest OSses: Ubuntu 9.10

Post by strangeelement »

I tried switching the kernel and it made great improvements.

However I had already started creating a new VM and it's still a pretty quick setup. Comparing the 2, the new installation directly from the desktop is faster.

It runs as smooth as it could.

I learned a valuable lesson here.


Thanks a lot for your help,
Rich.
Post Reply