Difference between revisions of "Performance Tweaks"

From Proxmox VE
Jump to navigation Jump to search
Line 21: Line 21:
  
 
cache=none seems to be the best performance and is the default in Proxmox 2.X.
 
cache=none seems to be the best performance and is the default in Proxmox 2.X.
 +
      host don't do cache.
 +
      Similar to writeback, but host don't do cache
 +
      guest disk cache is writeback
 +
      Warn : like writeback, you can loose datas in case of a powerfailure
 +
      you need to use barrier option in your linux guest fstab if kernel < 2.6.37 to avoid fs corruption in case of powerfailure.     
 +
     
 +
cache=writethrough
 +
      host do read cache
 +
      guest disk cache mode is writethrough
 +
      Writethrough make a fsync for each write. So it's the more secure cache mode, you can't loose data. It's also the slower.
 +
      Writethrough enable read cache on host.
  
cache=directsync seems similar in performance to cache=none
+
cache=directsync.
 +
      host don't do cache.
 +
      guest disk cache mode is writethrough
 +
      similar to writethrough, a fsync is made for each write.
 +
   
  
cache=writethrough should help speed up reads since it can use the host disk cache for reads but in practice it performs worse than cache=none
+
cache=writeback
 
+
      host do read/write cache
cache=writeback should help with reads and writes at the risk of loosing data, in practice it performs worse than cache=none.
+
      guest disk cache mode is writeback
 +
      Warn : you can loose datas in case of a powerfailure
 +
      you need to use barrier option in your linux guest fstab if kernel < 2.6.37 to avoid fs corruption in case of powerfailure.
 +
     
  
 
caching adds additional data copies and bus traffic causing it to perform worse.
 
caching adds additional data copies and bus traffic causing it to perform worse.
 
  
 
=Application Specific Tweaks=
 
=Application Specific Tweaks=

Revision as of 15:52, 19 September 2012

Yellowpin.svg Note: Article about Proxmox VE 2.0

Introduction

This page is intended to be a collection of various performance tips/tweaks to help you get the most from your virtual servers.

KVM

USB Tablet Device

Disabling the USB tablet device in windows VMs can reduce idle CPU usage and reduce context switches. [1]

VirtIO

Use virtIO for disk and network for best performance.

Linux has the drivers built in

Windows requires drivers which can be obtained here: Fedora VirtIO Drivers

Disk Cache

Yellowpin.svg Note: The information below is based on using raw volumes, other volume formats may behave differently.

cache=none seems to be the best performance and is the default in Proxmox 2.X.

     host don't do cache. 
     Similar to writeback, but host don't do cache
     guest disk cache is writeback
     Warn : like writeback, you can loose datas in case of a powerfailure
     you need to use barrier option in your linux guest fstab if kernel < 2.6.37 to avoid fs corruption in case of powerfailure.       
     

cache=writethrough

     host do read cache
     guest disk cache mode is writethrough
     Writethrough make a fsync for each write. So it's the more secure cache mode, you can't loose data. It's also the slower.
     Writethrough enable read cache on host.

cache=directsync.

     host don't do cache.
     guest disk cache mode is writethrough
     similar to writethrough, a fsync is made for each write.
    

cache=writeback

     host do read/write cache
     guest disk cache mode is writeback
     Warn : you can loose datas in case of a powerfailure
     you need to use barrier option in your linux guest fstab if kernel < 2.6.37 to avoid fs corruption in case of powerfailure.
      

caching adds additional data copies and bus traffic causing it to perform worse.

Application Specific Tweaks

Microsoft SQL Server

Trace Flag T8038

Setting the trace flag -T8038 will drastically reduce the number of context switches when running SQL 2005 or 2008.

To change the trace flag:

  1. Open the SQL server Configuration Manager
  2. Open the properties for the SQL service typically named MSSQLSERVER
  3. Go to the advanced tab
  4. Append ;-T8038 to the end of the startup parameters option

For additional references see: Proxmox forum