With todays fast multi core servers "small business virtualisation" becomes a reality. It easy to setup and works quite well out of the box. But there is more performance to be gained for those who don't fear the registry.
Several of our customers run a single Linux server that also hosts a Windows 2003 Terminal Server guest on VMWare. This provides access to Windows software for any device capable of running a RDP client (Linux Desktops, Windows CE/XPe Thin Clients, normal Windows Desktops). Recently I looked into ways of tuning these W2k3 guests for performance. There are a lot of knobs to be turned.
Windows 2003 as it comes out of the box tries to be nice to everyone. In its role as Terminal Server where interactive performance for end-user applications is the primary concern, there are a number of tweaks to optimize performance.
It all happens in the registry. The code blocks below show that Microsoft has come quite a long way in recent years. A lot of interesting documentation is available from Microsoft TechNet. Note that some of the following registry code is line-broken for readability. The affected lines are marked by a *LB*. Reassemble them before feeding them to the registry.
Just to be clear. If you actually try any of the code below, your computer will explode and your dog will die! Consider yourself discaimed!
We run on a big server with lots of memory. So make sure that disk access is not slowing us down:
REGEDIT4
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager*LB*
\Memory Management]
; Keep kernel and drivers in memory
"DisablePagingExecutive"=dword:00000001
; Reserve Memory for Io
"IoPageLockLimit"=dword:00065536
; Use the SecondLevel Cache (adjust this to
; what ever is in your cpu! grep Cache /proc/cpuinfo)
"SecondLevelDataCache"=dword:1024
NTFS stores the last access time for every file. This can be handy for forensic analysis and maybe some disk optimization tools. In general though, it just costs time. Since writing data is usually more costly than reading it.
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem]
"NtfsDisableLastAccessUpdate"=dword:00000001
The server may be occupied elswehere, so the virtual disk drive in VMware may not react as quickly as Windows expects.
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Disk]
"TimeOutValue"=dword:00000060
Not sure why one would want to tweak file server settings on a terminal server ... but since Microsoft KB324446 suggsets it, we should probably do it.
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer*LB*
\Parameters]
"SizReqBuf"=dword:0000ffff
"MaxWorkItems"=dword:00002004
"MaxMpxCt"=dword:00000800
"MaxRawWorkItems"=dword:00000200
"MaxFreeConnections"=dword:00000064
"MinFreeConnections"=dword:00000020
[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager*LB*
\Configuration Manager]
"RegistryLazyFlushInterval"=dword:00000060
We don't store user data on the VMWare guest. Everything is mounted via Samba, so tweaking the Lanman Workstation settings is probably a good idea.
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Lanman*LB*
WorkStation\Parameters]
; don't cache smb writes ... write them
; the underlying os can cache if it wants to
"UtilizeNtCaching"=dword:00000000
; don't encrypt or sign smbtrafic
"EnableSecuritySignature"=dword:00000000
; use faster data access scheme
"UseLockReadUnlock"=dword:00000001
; better performance KB324446
"MaxCmds"=dword:00000800
"MaxThreads"=dword:255
"MaxCollectionCount"=dword:65535
Having Windows hunt around the net trying to find out about other workstations scheduled jobs ist not a sensible way to spend time.
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion*LB*
\Explorer\RemoteComputer\NameSpace*\\*
\{D6277990-4C6A-11CF-8D87-00AA0060F5BF}]
By switching off some of the eye-candy on the desktop we get more time to spend on real work.
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TerminalServer*LB*
\WinStations\RDP-Tcp\UserOverride\Control Panel\Desktop]
"AutoEndTasks"="1"
"DragFullWindows"="0"
"MenuShowDelay"="10"
"WaitToKillAppTimeout"="20000"
"SmoothScroll"="00000000
"Wallpaper"="(none)"
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TerminalServer*LB*
\WinStations\RDP-Tcp\UserOverride\Control Panel*LB*
\Desktop\WindowMetrics]
"MinAnimate"="0"
Do not auto add every share we go to, to the network folders directory. Otherwise the Explorer will go searching them every time it does something with files. If one of the links is slow this has fatal consequeces for desktop performance.
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion*LB*
\Policies\Explorer]
"NoRecentDocsNetHood"=dword:1
Disable online grammar checking in Word 2003 since this is very costly.
[HKEY_LOCAL_MACHINE\Software\Microsoft\Office\11.0\Word\Options]
"AutoGrammar"=dword:00000000
Improve IE screen update performance.
[HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\Main]
"Force Offscreen Composition"=dword:00000001
Disable the Customer Experience Program in Office.
[HKEY_LOCAL_MACHINE\Software\Microsoft\Office\11.0\Common]
"QMEnable"=dword:00000000
When running Outlook 2003 SP2 with IMAP folders this may help a bit in getting Outlook to act like a decent mail client. Obviously still a long way from Thunderbird or some other application that knows IMAP by heart and not by contract.
[HKEY_LOCAL_MACHINE\Software\Microsoft\Office\11.0\Outlook\OutlookBar]
"DisableStoreCrawling"=dword:1
In its urge to be plug and play all the way, Windows does a lot of auto discovery. Especially when it comes to the network, there can be long periodes of watching the hourglass involved. We therefor normally just disable NetBIOS over TCP/IP in the TCP properties sheet of the network adapter and gain good speed for it when 'not-browsing' the local network.
For convenience you can download the registry settings as a single file.
NOTE: The content of this website is accessible with any browser. The graphical design though relies completely on CSS2 styles. If you see this text, this means that your browser does not support CSS2. Consider upgrading to a standard conformant browser like Mozilla Firefox, Opera, Safari or Konqueror for example.