Live data from Hacker News

Comparing Filesystem Performance in Virtual Machines

mitchellh.com

11–20 of 46 posts

Re: Comparing Filesystem Performance in Virtual Machines

#11
post #9

Interesting and timely article! On an Ubuntu guest (Windows host), I install the Samba server and then use the native Windows CIFS client to connect to the Ubuntu host. This gives me the advantage of vm (virtualbox) native filesystem and letting me use my windows machine to open files on the guest Perhaps this support can be added to some later version of vagrant

This is what I would do when I was on Windows. The biggest (really big) downside is that the files live inside the VM and are only accessible when the VM is up and running.

Re: Comparing Filesystem Performance in Virtual Machines

#12
post #3

How is it that native is slower then virtual i/o in his tests? I don't get it... if it's only reading some cached data, it's not a real test scenario, isn't it? So i suppose, the host system caches the reads. Also, how could it possibly be true that native writes are slower then virtual writes?

From the article: It is interesting that sometimes the native filesystem within the virtual machine outperforms the native filesystem on the host machine. This test uses raw read system calls with zero user-space buffering. It is very likely that the hypervisors do buffering for reads from their virtual machines, so they’re seeing better performance from not context switching to the native kernel as much. This theory…

It doesn't explain a thing on why. He just measured the performance of memory access and different caching strategies. From my point of view the "benchmarks" say nothing at all about actual I/O disk performance in virtual and native environments.

Re: Comparing Filesystem Performance in Virtual Machines

#14
post #3

How is it that native is slower then virtual i/o in his tests? I don't get it... if it's only reading some cached data, it's not a real test scenario, isn't it? So i suppose, the host system caches the reads. Also, how could it possibly be true that native writes are slower then virtual writes?

Benchmarks are flawed. Combine that with 'virtual' devices and you're bound to get amazingly weird results.

Re: Comparing Filesystem Performance in Virtual Machines

#15
post #12

Earlier quoted context omitted.

From the article: It is interesting that sometimes the native filesystem within the virtual machine outperforms the native filesystem on the host machine. This test uses raw read system calls with zero user-space buffering. It is very likely that the hypervisors do buffering for reads from their virtual machines, so they’re seeing better performance from not context switching to the native kernel as much. This theory…

It doesn't explain a thing on why. He just measured the performance of memory access and different caching strategies. From my point of view the "benchmarks" say nothing at all about actual I/O disk performance in virtual and native environments.

You wouldn't expect the actual disk I/O to be different. The VM has overheads in transporting the data; that's what the article is trying to measure.

And with that in mind, the "native" bars are pretty much useless in this article. They should always be higher than the VM bars, unless specifically trying to test fsync - and since it seems fsyncs are ignored, the test isn't being achieved.

Re: Comparing Filesystem Performance in Virtual Machines

#18
post #5

Is it just me or do the graphs not match up to the text in several places? For example in the 64MB random file write graph ( http://i.imgur.com/iGxn2H1.png ) green is the vmware native according to the legend, which is clearly the highest bar graph across the board, yet he says "VirtualBox continues to outperform VMware on writes"

He's probably talking about the Shared Folders performance.

That's the conclusion I drew, but it's really unclear. He said at the end that VMWare blows Virtualbox out of the water. The graphs show that for shared folders but as far as disk access in general, they look fairly evenly matched (at least, that's what the graphs I saw depicted).

Re: Comparing Filesystem Performance in Virtual Machines

#19
There is a lot of caching involved and it looks like the VM writes are not synchronous - they do not wait for the actual disk to be written. Normally nothing can beat the native access, but in a VM the "disk" is actually a sparse file that can be efficiently cached in RAM. I see the same behavior/speeds in my VMs if the virtual disk has a lot of free space and I have a lot of free RAM on the host. The speeds get "down to earth" if you fill up the host's RAM.
Post reply on HN