I've got a VPS running Ubuntu. Being a virtual server, I understand that it shares resources with unknown number of other servers, and I'm noticing that it's considerably slower than my desktop machine.
Is there some tool to measure the performance of the virtual machine? I'd be curious to see some approximate measure similar to bogomips, possibly for CPU (operations/sec), memory and disk read/write speed. I'd like to be able to compare those numbers to my desktop machine.
I'm not interested in the specs of the actual physical machine my VPS is running on - by doing cat /proc/cpuinfo
I can see that it's a nice quad-core Xeon machine, but it doesn't matter to me. I'm basically interested in how fast a program would run in my VPS - how many CPU operations it can make in a second, how many bytes to write to RAM or to disk.
I only have ssh access to the machine so the tool need to be command-line.
I could write a script which, say, does some calculations in a loop for a second and counts how many loops it was able to do, or something similar to measure disk and RAM performance. But I'm sure something like this already exists.
Well, since nobody wants to answer... :)
Searching Synaptic for "bench" finds a lot of benchmarking suites capable of testing different aspects of a machine. The only one I heard about previously is
phoronix-test-suite
, which I'm sure is very comprehensive although my short attention span didn't allow me to figure out how to use it.Then I found UnixBench, which is described as
UnixBench is mentioned by Linode as a tool for VM performance testing in this blog post:
The test suite is NOT in Ubuntu repositories, but it is trivial to download and compile it:
The tests take a while to finish. The output looks like
Which means that the VPS in question has a score of 249.7 for single task and 592.5 for parallel processing.
My desktop machine, while having similar or lower specs to the physical machine my VPS is running on, produced a score of 1409.7 for single task and 5156.3 for parallel processing. Exactly the kind of metric I was looking for.
Another important metric is network speed. I've found a script which downloads test files from different locations and measures download speed. The script can be run with
(although it probably would be safer to download the script and inspect its contents before running)
To monitor disk I/O latency there is
ioping
utility which can be installed from Ubuntu repositories:That may not be possible. You're not providing any details, so noone can provide specific answers. But not all VPSes means virtual hardware. You have all kinds of different solutions, like Linux Containers (LXC) which is radically different from rending a virtual machine with certain specifics.
The sole point of sharing hardware is to reuse it. In your case, even if you are using virtualized hardware, you can't be certain you're the only one to use it. If you need information about hardware utilization, then you should get a co-located physical server instead.