TurnKey Linux Virtual Appliance Library

Performance issues using virtualbox

Jonas's picture

The Basics:

I am running VirtualBox within a Kubuntu 12.04 host system on top of an intel core i7-2600k with 16GB of RAM. I am a student and am using Turnkey Appliances basically for development, testing, and general putzing purposes. I was able to successfully setup a DNS server install on Turnkey Core, as well as a LAMP Appliance from another machine. As this is all done on my local machine, and (currently) the only traffic on the appliances are what I am creating over my "host-only" network, I would expect that I can run these machines with relatively sparse resources and still have reasonable response times. 

 

The Problem:

Thus far I've been able to initially setup the machines with little to no issues. However, it seems as I repeatedly shutdown and restart the machines over time, they get more and more sluggish. It is to the point now where the LAMP appliance takes several minutes to boot, and once it finally does, I can't even arrow through the "Configuration Console" without severe lagging. Whats more is that the CPU's that I have asssigned to be used by the appliances seem to just constantly churn at 100%. The webmin access is excruciatingly slow, and can't seem to even get to a terminal prompt within reasonable time. 

My first thought was that perhaps enough resources werent being assigned to these appliances, so I upped the assigned RAM, and processor count. Not only was the performance improvement negligible, but all of the assigned processors still seem to continue to be churning at 100% (even though there are more of them). Even more odd to me is that my RAM utilization never seems to rise anywhere near what I have assigned for the machine.

I have tried RAM counts of anywhere between 512 MB to 8192 MB and CPU counts from 1 to 4 processors. I do have the virtualization flag enabled in the VirtualBox settings for the machine if that matters.

 

The Questions:

So I guess the first question is, does this sound like a VirtualBox issue, or a Turnkey Appliance issue?

Has anyone else experienced this sort of issue?

Are there any recommendations as to initial settings, or optimizations that I can use once it is setup to prevent this behavior?

Is it recommended and/or helpful to change the CPU counts and RAM mounts after it has been initially configured?

 

 

Regards,

Jonas

Jonas's picture

My Troubleshooting...

The Solution?:

Not sure if anyone else had this issue, or even if anyone cares, but for posterity sake, here is what I did to "fix" this issue:

  • Removed the standard version of VirtualBox that came with my Kubuntu repo and reinstalled using the latest version from the VirtualBox website (4.1.12 r77245). 
  • Reinstalled the appliances using the ISO's (not the vmdk disks as before). This allowed me to specify a non LVM based disk structure (one of the issues I kept with the vmdk versions, was the appliance would constantly identify "bad" blocks of memory on reboot and fsck would sometimes fail).
  • Both of my appliances (a Core and a LAMP stack appliance) have been running with less than 512MB of memory, and only one assigned CPU, and they have been running solidly for the past day and a half or so.

I am still interested in hearing why this may have occured. 

 

Regards,

Jonas

Jeremy's picture

Thanks for posting back

I thought I replied earlier, but obviously not...

I don't use VBox on Ubuntu much these days but I have used both ISO installs and the VM images under VBox Ubuntu 10.04 previously, and more recently on WinXP and never had the problems you report. I have also used the VM images under VMware Server on Win Server 2k3 and ISO install under KVM (via ProxmoxVE 1.9 & 2.0 - based on Debian 5 & 6 resepectively) also with no worries. All of these have maintained the default LVM with no ill effects. As a general rule, all my VMs use 512MB RAM & 1 CPU. A number of them have been started and stopped lots (some of them over a year old now).

So from my experience, I suspect either the version of VBox included in 12.04 or some other 12.04 factor. From the sounds of your solution, it sounds like it could be a Precise VBox bug?

Jonas's picture

Thanks for the reply

I suppose thats the price of adopting a distro in beta. When I have time I would like to do some highly unscientific tests to see how I can scale these appliances with various setting of RAM, CPU's, and LVM, but I am glad that for now the updated VirtualBox seemed to fix the issues i was having.

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)