Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have configured my Ubuntu VirtualBox install to have a base memory setting of 512MB. When running this install, its fairly sluggish in a way that feels like its thrashing memory. In other words, it will be fine for a little while and then suddenly run like a pig for a minute or two. This happens when running a couple of terminals, Eclipse w/ a PyDev Django project, and Firefox, or really any combination of a few applications.

When I look in Windows task manager, the VirtualBox.exe that corresponds to this Ubuntu machine is hovering at about 100MB-120MB.

When I look at System Monitor within Ubuntu, I see that it says for Memory "329.3 Mib (66.3%) of 496.6 MiB" and for Swap "138.6 MiB (38.0%) of 365.0 MiB".

So my first question is, which of these numbers do I believe? (And why the difference?)

My second question is, how can I convince Ubuntu to use the memory I've given it, assuming it will improve performance.

share|improve this question
1  
Further info about my specific setup: Windows XP with SP3, 2.5GB memory total, dual 2GHz CPUs; Ubuntu 10.10; VirtualBox 4.0.2. –  jlarson Feb 13 '11 at 16:22
2  
Rather than commenting we encourage you to edit your question to keep all information in one place. –  Takkat Feb 13 '11 at 16:34
    
Both of the numbers can be correct! On the host OS (where virtualbox runs) you can see the memory/resource usage of virtualbox, including the "emulation" code and the allocated code for "emulating" a machine. The guest OS (which runs "inside virtulbox") you can use what guest sees, even there can be non-used memory for the amount allocated for that virtual machine. Also, I guess 512Mbyte can be too less sometimes ... Depends on the softwares you use, and other settings. –  LGB Feb 13 '11 at 18:03
    
I can't say why VirtualBox.exe shows only ~100MB, but the correct tool to see Ubuntu's memory usage is the System Monitor. In your case, it says it is using 329 out of 497 MiB of RAM (this means roughly 345 out of 521 MB). –  zpletan Jul 25 '11 at 13:39

2 Answers 2

VirtualBox.exe shows only ~100MB because it's either swapping to disk in windows (nasty and bad) or because it's forked the service off to some other process that you can't find.

The correct tool to see Ubuntu's memory usage is the System Monitor. In your case, it says it is using 329 out of 497 MiB of RAM (this means roughly 345 out of 521 MB). This should be all ram to be honest, considering PAE and how visualisation works.

share|improve this answer

This looks to be a Windows kernel problem. View the third post here: http://forum.sysinternals.com/pe-is-not-showing-all-memory-used-by-virtualbox_topic23886.html

So, the memory you allocated for the VM is being used, but it isn't being properly represented by Task Manager. The VMMap tool they show in that thread will give a better representation of memory usage.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.