First is which I/O mechanism to use.
Set either
io='native'
or io='threads'
in your XML to benchmark each of these.
Second is which caching mechanism to use. You can set
cache='writeback'
, cache='writethrough'
or you can turn it off with cache='none'
, which you actually may find works best.
Don't use
writeback
unless your RAID array is battery-backed, or you risk losing data. (Of course, if losing data is OK, then feel free.)
Third, some other things that may help include turning off barriers, and using the deadline scheduler in the guest.
Finally, do some research. IBM made a very interesting presentation on KVM I/O performance at the 2010 Linux Plumbers Conference. In addition they have an extensive set of best practices on using KVMwhich will certainly be of interest.
P.S. Lengthy sequential reads and writes are rarely representative of a real-world workload. Try doing benchmarks with other types of workloads, ideally the actual application(s) you intend to run in production.
沒有留言:
張貼留言