kvm 性能调节总结

The optimal configuration is (usually) as follows: 

  1. On the host, set elevator=deadline
  2. Use virtio and only virtio
  3. use raw LVs whenever possible. Qcow2 gives overhead. Files on a FS also have overhead
  4. in the VM use the elevator=noop
  5. both in host and VM, use noatime,nodiratime in fstab wherever possible
  6. Make sure the virtio drivers are up to date, especially the windows ones.
  7. Debian based distros are (arguably) not as good as Fedora and RHEL for QEMU/KVM. Not to start a flamewar, but most of the development and testing is done on Fedora and RHEL, and in my own experience, there have been lots of issues on Ubuntu and Debian that I couldn't reproduce on Fedora and RHEL. You can ignore this particular bullet if you want, but if you're looking for a solution, a quick benchmark on another distro is usually worth a try

你可能感兴趣的:(kvm)