Pages

Friday, November 16, 2007

Citrix 2k3 Tuning Changes.

After much work, here are some common Citrix 2k3 tuning changes I often make:


HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\TCPIP\Parameters
  • DWORD MaxUserPort and set to 65534 (new entry)
  • DWORD TcpWindowSize and set to 65535
  • DWORD MaxFreeTcbs and set to 72000 (new entry)
  • DWORD MaxHashTableSize and set to 65536 (new entry)
  • DWORD TcpTimedWaitDelay and set to 60 (new entry)
  • DWORD KeepAliveTime 300000 (new entry)
  • DWORD KeepAliveInterval 1000 (new entry)
  • DWORD TcpMaxDataRetransmissions 10 (new entry)
  • DWORD NumTcbTablePartitions 4 *<numcpu> (new entry)
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\TCPIP\Parameters\Interfaces\{OID}
  • DWORD TcpAckFrequency 13 for gigE 5 for FE (new entry)
HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\XTEConfig
  • DWord MaxThreads 255 (new entry)
HKEY_LOCAL_MACHINE\SYSTEM\Current Control Set\Control\File System
  • DWORD SecondLevelDataCache <CPU CACHE SIZE> (new entry)
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management
  • DWORD DisablePagingExecutive 1
  • DWORD SecondLevelDataCache <CPU CACHE SIZE>
  • DWORD IoPageLockLimit 65536 (new value)
HKEY_LOCAL_MACHINE\SOFTWARE\Adobe\Acrobat Reader\7.0\FeatureLockdown
  • DWORD BEFIPrintMe 0
  • DWORD bPurchaseAcro 0
  • DWORD bUpdater 0
  • DWORD bRegisterProduct 0
  • DWORD bShowAdsAllow 0
HKEY_LOCAL_MACHINE\SOFTWARE\Adobe\Acrobat Reader\7.0\AdobeViewer
  • DWORD EULA 0
HKEY_LOCAL_MACHINE\SOFTWARE\Adobe\Acrobat Reader\7.0\Updater
  • DWORD bShowAutoUpdateConfDialog 0
  • DWORD bShowNotifDialog 0
  • DWORD iUpdateFrequency 0
HKEY_LOCAL_MACHINE\SOFTWARE\Adobe\Acrobat Reader\7.0\Originals
  • DWORD bDisplaySplash 0
HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main
  • DWORD Force Offscreen Composition 1
HKEY_CURRENT_USER\Software\Microsoft\Office\Common
  • DWORD QMEnable 0
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters
  • DWORD IRPStackSize 15 (new value)
  • DWORD SizReqBuf 32768 (new value)
  • DWORD MaxMpxCt 1024 (new value)
  • DWORD MaxWorkItems 4096 (new value)
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Lanman\WorkStation\Paramters
  • DWORD UtilizeNTCaching 0 (new value)
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinSatations\ICA-tcp\UserOveride\Control Panel\Desktop
  • "AutoEndTasks" ="1"
  • "MenuShowDelay"=10"
  • "CursorBlinkRate"="-1"
  • "DragFullWindows"="0"
  • "WaitToKillAppTimeout"="20000"
  • "SmoothScroll" = dword:0
  • "Wallpaper" = "<advaniswall paper>"
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinSatations\ICA-tcp\UserOveride\Control Panel\Desktop\WindowMetrics
  • "MinAnimate"="0"
(NOTE these could also be RDP-tcp)
HEKY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer
  • REG_SZ AlwaysUnloadDLL 1
HKEY_USERS\.DEFAULT\Control Panel\Desktop
  • REG_SZ MenuShowDelay 10
HKEY_USERS\.DEFAULT\Software\Microsoft\Internet Explorer\Main
  • DWORD "Force Offscreen Composition" 1 (new value)
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ICABrowser\Parameters
  • REG_SZ DisabledTcpAddress <IPADDR OF INTERFACE TO DISABLE> (new value)

From some of the following:
    http://support.microsoft.com/kb/q120642/
    http://support.microsoft.com/kb/q158474/
    http://support.microsoft.com/kb/324270/en-us
    http://technet2.microsoft.com/WindowsServer/en/library/db56b4d4-a351-40d5-b6b1-998e9f6f41c91033.mspx?mfr=true
    http://www.microsoft.com/technet/interopmigration/unix/sfu/perfnfs.mspx#EWF

    Thursday, November 8, 2007

    Useful Postgres Queries

    Getting a list of dbnames
    /usr/local/bin/psql -q -t -A -h -d template1 -c "SELECT datname FROM pg_database WHERE datname not in ('template0','template1')"

    Getting a list of name spaces for a given DB
    /usr/local/bin/psql -q -t -A -h -d < DB > -c " select schemaname from pg_tables where schemaname not in ('pg_catalog','information_schema') group by schemaname"
    Getting a list of tables (including name spaces)
    /usr/local/bin/psql -q -t -A -h -d < DB > --field-separator "." -c "select schemaname,tablename from pg_tables where schemaname not in ('pg_catalog','information_schema')"

    Getting a list of locks on the DB server (from within a psql prompt)
    SELECT procpid, usename ,datname, (now() - query_start) as age, c.relname , l.mode, l.granted FROM pg_stat_activity a LEFT OUTER JOIN pg_locks l ON (a.procpid = l.pid) LEFT OUTER JOIN pg_class c ON (l.relation = c.oid);

    Looking at what is connected to a given Database name (from within a psql prompt)
    select * from pg_stat_activity where datname='< DB >';