0

I have a system with a single SSD and want to set up KVM. As far as I understand it, I have 2 possibilities:

1) run the host from an USB stick and use the physical SSD as the storage pool (type disk).

2) Install the host on the SSD on use either a partition (fs) or a directory (dir) as the storage pool.

I'm wondering how much the filesystem overhead for 2) would impact disk performance for the guests?

0

That's a really general question so here's a general answer.

1) is a bad idea. Those usb drives don't have good write amplification management. Just the generation of log files will kill the flash. Buy more disks, spinning rust is fine.

2) has the highest performance when you can stripe your IOs. otherwise all of your vms are competing for io bandwidth on that single disk. You can get some better performance on a single disk with a read cache (rapiddisk and others) at the expense of system memory but that doesn't do anything for writes. writes require a io controller with a battery backed cache or a main memory that can crash to flash like NVDIMM.

If you want to really know the performance impact, measure it. Preferably with a workload that imitates what your users will do. iostat, blktrace and fio are your friends.

https://brooker.co.za/blog/2013/07/14/io-performance.html

  • First, thanks for reminding me that log files are bad for USB drives. Your recommendations are good, but a bit overkill for me. Nevertheless I measured with bonnie and got the following averages in Mb/s for (Host - GuestOnFS - GuestOnDisk): Sequential Write (124 - 115 - 125). Rewrite (77 - 73 - 75). Sequential Read (255 - 234 - 205). – OttoEisen Jul 17 '16 at 9:01
  • That doesn't really tell you much, you could have pulled that off the datasheet. Forget that it's a VM and pretend you have an application that a 20G disk. That application tends to only access 5% of that disk at any one time. When it does, it tends to write more than it reads, say 70/30, and it does so in 4K chunks. Now... how many instances of that application can your box run before it runs out of CPU? lets say 4 for arguments sake. That's 4 x 20G where each application access only 5% or 1G of that LUN. Construct an fio test that has that R/W mix and point it at the file system. – ppetraki Jul 18 '16 at 17:54
  • This should get you started: wiki.mikejung.biz/… . You can use blktrace to profile the block device used by the VM . Use that to generate a histogram of #R/W per iosize over the sectors of the disk. – ppetraki Jul 18 '16 at 17:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.