I've used unixbench (old but often insightful) benchmark on a system with Windows XP host and Ubuntu desktop guest and I've tested four combinations: uniprocessor with and without VMI and vSMP with and without SMP. First, the uniprocessor case:
UP without VMI:
INDEX VALUES
TEST BASELINE RESULT INDEX
Dhrystone 2 using register variables 116700.0 8217072.4 704.1
Double-Precision Whetstone 55.0 1747.5 317.7
Execl Throughput 43.0 965.6 224.6
File Copy 1024 bufsize 2000 maxblocks 3960.0 547771.0 1383.3
File Copy 256 bufsize 500 maxblocks 1655.0 158140.0 955.5
File Copy 4096 bufsize 8000 maxblocks 5800.0 1075652.0 1854.6
Pipe Throughput 12440.0 1093934.2 879.4
Pipe-based Context Switching 4000.0 102125.1 255.3
Process Creation 126.0 1823.1 144.7
Shell Scripts (8 concurrent) 6.0 232.7 387.8
System Call Overhead 15000.0 1651982.4 1101.3
=========
FINAL SCORE 560.3
With VMI:
INDEX VALUES
TEST BASELINE RESULT INDEX
Dhrystone 2 using register variables 116700.0 8287559.3 710.2
Double-Precision Whetstone 55.0 1763.3 320.6
Execl Throughput 43.0 1937.4 450.6
File Copy 1024 bufsize 2000 maxblocks 3960.0 466619.0 1178.3
File Copy 256 bufsize 500 maxblocks 1655.0 132740.0 802.1
File Copy 4096 bufsize 8000 maxblocks 5800.0 1000305.0 1724.7
Pipe Throughput 12440.0 860361.9 691.6
Pipe-based Context Switching 4000.0 112045.5 280.1
Process Creation 126.0 5796.5 460.0
Shell Scripts (8 concurrent) 6.0 452.0 753.3
System Call Overhead 15000.0 908250.9 605.5
=========
FINAL SCORE 635.2
There are couple of surprising results here (I retested and they are repeatable) which I can't explain. Firstly, syscall overhead seems higher in the VMI case. This is absolutely not what should happen and looks likean important problem. I believe some other results that are worse in the VMI version, like pipe throughput, are ultimately caused by this. The second problematic result is disk IO. The virtual machine is configured for async disk writes ("performance" option in VM disk configuration) so the simulated speed at which IO happens might be enough to bring forth the slow syscall issue in this case as well, but it also might not.
On the other hand, other results are noticably better and align with expectations. Process creation and shell scripts benchmarks show that VMI will greatly help in servers implementing multiprocessing (like preforked Apache) and multithreading (like Java, but also variants of Apache and others). Seeing this, it looked like vSMP would also be greatly helped by VMI:
SMP without VMI:
INDEX VALUES
TEST BASELINE RESULT INDEX
Dhrystone 2 using register variables 116700.0 8238720.6 706.0
Double-Precision Whetstone 55.0 1776.1 322.9
Execl Throughput 43.0 775.9 180.4
File Copy 1024 bufsize 2000 maxblocks 3960.0 442286.0 1116.9
File Copy 256 bufsize 500 maxblocks 1655.0 125644.0 759.2
File Copy 4096 bufsize 8000 maxblocks 5800.0 990118.0 1707.1
Pipe Throughput 12440.0 949947.4 763.6
Pipe-based Context Switching 4000.0 84774.1 211.9
Process Creation 126.0 1526.2 121.1
Shell Scripts (8 concurrent) 6.0 371.7 619.5
System Call Overhead 15000.0 1490071.0 993.4
=========
FINAL SCORE 517.9
With VMI:
INDEX VALUES
TEST BASELINE RESULT INDEX
Dhrystone 2 using register variables 116700.0 8511347.8 729.3
Double-Precision Whetstone 55.0 1733.0 315.1
Execl Throughput 43.0 1145.7 266.4
File Copy 1024 bufsize 2000 maxblocks 3960.0 414339.0 1046.3
File Copy 256 bufsize 500 maxblocks 1655.0 115624.0 698.6
File Copy 4096 bufsize 8000 maxblocks 5800.0 924648.0 1594.2
Pipe Throughput 12440.0 775780.9 623.6
Pipe-based Context Switching 4000.0 103076.4 257.7
Process Creation 126.0 4744.0 376.5
Shell Scripts (8 concurrent) 6.0 308.3 513.8
System Call Overhead 15000.0 856001.0 570.7
=========
FINAL SCORE 545.2
The first thing noticable is that the vSMP case is actually slower than the UP case for the majority of benchmarks. This doesn't mean vSMP is completely useless - it will probably be ok with worklods that are CPU bound but do not interact with the operating system and do no IO (i.e. if they are computational programs - Seti@Home is an example).
Surprisingly, even with VMI the results are lower than the uniprocessor case - shell scripts and process creation benchmarks do not benefit with vSMP (they do when benchmarked on real hardware).
The final word is that vSMP appears not to be worth it for any kind of real-world servers. VMI on the other hand is and will probably help uniprocessor virtual servers a great deal, though not as much as it could have due to slow syscall issue. I've tested and there is also little difference (not more than a couple of percent) between running the same virtual machine (and VMI/vSMP combinations) on Windows host and Linux host (on the same hardware).
VMI has one benefit over Xen: VMI-enabled kernels can boot on regular hardware (and use regular drivers, etc) so it's enabled in most recent Linux distributions.
FreeBSD doesn't support neither (though Xen support will maybe happen in the next few months).
Post your comment here!
Comments are subject to moderation and will be deleted if deemed inappropriate. All content is © Ivan Voras. Comments are owned by their authors (who agree to basically surrender all rights by publishing them :) )..