Check the disk for problems on Debian Lenny

0

I just bought a VPS hosting with Debian Lenny (I'm new to all this world). I've managed to install and setup everthing I need pretty well. My testing website works fast as expected most of the time, but sometimes it is really slow (response time is about 5-10 seconds). I checked everything and seems that there are may be some disk issues.

How can I check the disk for problems/performance? What else could possible cause such a behaviour?

Thank you!

Equ

Posted 2010-04-02T21:32:44.517

Reputation: 3

Answers

1

You can't check for hardware disk problems/performance as your system is a VM and you are "shielded" from the real hardware.

You are most likely correct in assuming that there is a disk related problem though. The most common cause of bad performance from a VPS is I/O contention between all the VMs that run on a given host. Under normal circumstances only one or two of the VMs are performing heavy I/O activity so everything seems to run at a decent pace. But every now and than a lot of the VMs will need a create of I/O activity at the same time at which point the drive heads are thrashing about like nobody's business and performance drops significantly for all tasks that are performing I/O (entirely in memory tasks are most likely unaffected, unless the host is over-committed and some of your VM's memory is really in swap in disk).

Some cheap VPS hosts oversell their resources so badly that there is always significant I/O contention simply because the shear number of VMs actively running means that at any given time quite a few are performing I/O heavy operations, but even on a good VPS host you will see bad I/O contention from time to time.

You could run disk/filesystem benchmarks (bonnie++, copying from the raw device to /dev/null to test bulk read speed, copying from /dev/zero to the disk to see bulk write speed, ...) to check the performance you are currently getting, but this will be frowned upon by your host as any such benchmark obviously imposes a high I/O load of its own.

CPU contention is another common cause of irregular performance results, but with modern CPUs the I/O sub-system is usually the bottleneck rather than the CPU(s).

David Spillett

Posted 2010-04-02T21:32:44.517

Reputation: 22 424