Pegasi Wiki

This wiki acts as a memo for our own work so why not share them? Feel free to browse and use out notes and leave a note while at it.

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
kvm_performance_tuning [2012/04/13 17:36]
Pekka Kuronen
kvm_performance_tuning [2017/11/06 10:11] (current)
Line 12: Line 12:
  
 **Use Virtio block and network drivers from Fedora** **Use Virtio block and network drivers from Fedora**
 +
 Very well functioning especially with block devices Very well functioning especially with block devices
  
 **Use cache=none OR cache=writeback** **Use cache=none OR cache=writeback**
 +
 Preferably the first since it is safer in user Preferably the first since it is safer in user
  
 **Use io=native** **Use io=native**
 +
 This should give some extra boost This should give some extra boost
  
 **Ditch the file image based storage** **Ditch the file image based storage**
 +
 Raw image will not work stable with good cache settings and Windows guest. Best if you transfer the image to a block device with following procedure. Lets assume we have a raw image file and a nice SSD disk in /dev/sdd that is free to use for our guest. Raw image will not work stable with good cache settings and Windows guest. Best if you transfer the image to a block device with following procedure. Lets assume we have a raw image file and a nice SSD disk in /dev/sdd that is free to use for our guest.
  
Line 77: Line 81:
     </​disk>​     </​disk>​
 </​code>​ </​code>​
 +
 +**Tune my Linux host network**
 +
 +Increasing the right buffers gave me around 20-30% increase in 1G LAN thoughput. Simply put edit /​etc/​sysctl.conf to include following
 +
 +<​code>​
 +net.core.wmem_max=8388608
 +net.core.rmem_max=8388608
 +</​code>​
 +
 +And do testing without rebooting with following commands
 +
 +<​code>​
 +echo 8388608 > /​proc/​sys/​net/​core/​wmem_max
 +echo 8388608 > /​proc/​sys/​net/​core/​rmem_max
 +</​code>​
 +
 +And no, implementing jumbo frames in my servers and my HP switch did not make any real difference.
 +
  
 This made my KVM guest fly and host can barely see the load. I can truly say it is like a different piece of hardware compared to image based system. This made my KVM guest fly and host can barely see the load. I can truly say it is like a different piece of hardware compared to image based system.
 +
 +~~DISCUSSION|Leave a comment~~
 +~~NOCACHE~~
 +~~QUICKSTATS:​@kvm_performance_tuning&​basics~~
 +~~QUICKSTATS:​@kvm_performance_tuning&​ip~~
 +

  //check if we are running within the DokuWiki environment if (!defined("DOKU_INC")){ die(); } //place the needed HTML source codes BELOW this line