Linux – Hard Drive Performance

Or lack of.

You must insure that your drives are using the sata driver (if they are sata disks), quickest way to check is that they will be called sda sdb etc…. and not hda hdb, as this is the default IDE driver and will slow down the performance majorly.

How to check performance;

hdparm -tT /dev/hda

Modern drives should be getting over 50MB/s easily. If your getting about 5MB/s you have the problem.

How to Fix;

I had to change the sata mode to Enhanced in the bios and disable any of the on-board IDE controllers. When rebooting all your device names will change, and you will need to edit the /etc/fstab file as appropriate.

Apparently this is due to a conflict in the drivers, and them confusing your SATA drives as standard IDE disks.

VMWare Performance tips

these are tested from experience…. (the following is true on vmware server 1.0.6 on a linux host)

  • Always use only 1 Virtual CPU – i have found that most times even if you have heaps of cores to spare on the host, a single virtual core is faster.
  • Set the memory to the recommended level when possible – 256Mb sounds shit when you have 4gb, doesn’t matter – set it to 256Mb (increase only if excessive paging on the guest). Let linux and vmware manage the memory, in most cases it does a much better job than windows. Do not disable memory page trimming on any of the guests, this gives more memory back to the host to cache other more important activity (disk etc)
  • Never use 2gb split files for the virtual disk unless you have to transfer the vm onto a file system that doesn’t support larger files.
  • Load the latest drivers for your NIC on the host
  • Be nice to your physical disk – do not load all your VM’s on a single drive – the HDD is the slowest part of the system, dont saturate it. I use either a raid 0 running multiple vm’s (with backups) or dedicated drives per set of vm’s. This excludes enterprise level raids which can handle much higher level of simultaneous requests.
  • Install vmware tools on all guest machines

watch your pings – ping your guests… they should never loose a ping. If they do you are loading the cpu to high and the host cannot process the network queries. As above use only one virtual cpu. Also ensure you have the latest network driver loaded for your NIC on the host.