1
I'm running a Ubuntu Server VM on a Windows 2008 R2 host, and I'm getting very poor I/O performance. See the following screenshot that shows my processes are severely I/O bound (i.e. 96.0% wait)
All I was doing was installing PostgreSQL. On the same VM but running on a Ubuntu host, the performance is fast. The machines are similarly spec'ed, though the Windows machine should have the advantage as it's running disks in a RAID 0 configuration.
Any pointers of what I can do to improve performance will be much appreciated.
Updates
The VM is Ubuntu Server 12.04 without a GUI. The VM settings are listed below.
Motherboard:
- 1 GB memory
- PIIX3 chipset
- IO APIC
- Hardware clock in UTC time
- Absolute pointing device
Processor:
- 1
- Execution cap 100%
Acceleration:
- VT-x/AMD-V enabled
- Nested Paging enabled
Display:
- 12 MB video memory
- 1 Monitor
This is a development/testing VM and not a production VM, hence the unexciting specs. The configuration is good enough for playing with some small (~5GB) databases. For some reason, running this on a Ubuntu host seems to get much better performance than running it on a Windows 2008 R2 host with identical hardware.
Update-2 I've increased the RAM and CPU core count of the VM. We're now at 2GB RAM and 2 CPU cores. I'm still seeing slow performance, but the %wait has halved. No idea why increasing the CPU cores allocated has this effect (it's not CPU starved, but IO starved) but it does make the VM a little more usable. I'll probably move back to Ubuntu unless I can find a solution to this.
virtual guests and databases do not work well together as a general rule. I've seen many an admin deal with the problem, but always on an enterprise virtualization system like ESX. can you post your VM settings, and are the bios virtual extensions? – Frank Thomas – 2012-12-06T12:23:27.140
Virtual guests running on bog standard hardware are pretty poor as database servers. Given that Amazon's EC2 is so popular and it's what we use, running the database in a VM is unavoidable. The performance impact can be mitigated by running the database on a RAID 10 array of EBS disks, but it's no where near the performance of a dedicated expensive database server. C'est la vie. – CadentOrange – 2012-12-06T12:43:26.627
have you tried disabling IO-APIC? not sure if its still required for 64bit guests. also 1GB of ram is not usually considered sufficient for anything useful in w2k8. whats your current utilization? – Frank Thomas – 2012-12-06T12:50:05.863
1GB of RAM does't get you much in Windows, but 1GB RAM for the Ubuntu VM is plenty. From the screenshot provided, there's about 100 MB RAM free with 0% of the swap being used. This suggests that RAM isn't the issue as we're far from full and there is no paging occurring. I disabled IO-APIC and that's had no visible impact. – CadentOrange – 2012-12-06T13:44:35.320