Windows 2008 R2建议配置 通用的计算机配置 如下是建议部署在XenApp 6和XenApp6.5 的服务器上面的组策略配置项: 项目 | 路径(计算机配置) | 理由 | Error Reporting | Administrative Templates – Windows Components – Windows Error Reporting: p) [8 B2 C9 f6 z
Disable Windows Error Reporting: Enabled | 除非排查问题,不然禁用 | Disable Customer Experience Improvement Program (CEIP) | Administrative Templates – System – Internet Communication Management – Internet Communication Settings
/ X! U" Y7 ]; L! xTurn off Windows Customer Experience Improvement Program: Enabled | 为减小后台资源消耗,退出微软体验报告回馈 | Windows Update | Administrative Templates – Windows Components – Windows Updates$ D" m! Z6 o. c0 J% o5 h
Configure Automatic Updates: Disabled | 微软更新应该由管理员更新在桌面模板上面 | System Restore | Administrative templates – System – System Restore
$ B- P9 [2 w# P5 s, i* jTurn off System Restore: Enabled | 系统还原这里就没有必要了 | RDP Listener – Printer mapping | Disable printer mapping for RDP sessions.
* H2 V: V# D+ S" P; QAdministrative Templates – Windows Components – Remote Desktop Services – Remote Desktop Session Host – Printer Redirection
+ [+ u+ g, M* ~' e" u. k4 d5 DDo not allow client printer redirection: Enabled | 打开此策略之后,RDP连接会安装映射的打印机,服务器上安装的打印机驱动会变得不统一,且如果出现异常会增加排查问题的难度 | 0 `6 O# D( H/ N: K9 y
如下注册表配置建议部署在XenApp 6.0 /6.5 服务器上: 项目 | 建议/注册表 | 理由 | Hide System Hard Error Messages | HKLM\System\CurrentControlSet\Control\Windows* ?. W3 m3 h. l/ ?4 p4 ?
“ErrorMode”=dword:00000002 | 当Windows或者应用出现一个硬件的错误,它会弹出一个对话框ok或者Continue; 这些错误对用户来说是可以隐藏的,如果用户已经断开,弹出的错误可能会导致会话挂起;系统可以将这个错误信息写到系统日志中去。 | Spooler Warning Events | HKLM\System\CurrentControlSet\Control\Print\Providers
: N1 L9 J. c: l+ c- Q6 q6 P“EventLog”=dword:00000001 | 当ICA 会话开始时,ICA 自动创建打印机成功或失败的信息会由Spooler服务写到系统事件日志中去,这个服务会产生太多此类日志,这里的配置是让这个服务只记录错误日志。 | Paging of the Executive | HKLM\System\CurrentControlSet\Control\Session Manager\Memory Management
' t' [+ y' ~( ] ~“DisablePagingExecutive”=dword:00000001 | 为了提高性能,内核模式驱动程序和其他系统组件可以被配置为只在内存里做分页。 | Edit Run and RunOnce Registry keys | HKLM\Software\Microsoft\Windows\CurrentVersion\Run
9 D- R+ s+ g2 M8 c4 A4 A H N/ OHKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce5 y. P$ ?- Z; ^
HKLM\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Run
8 g) d% n5 x8 B$ vHKLM\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\RunOnce | 优化开机启动项,这个就不用我多说了,一些无用的例如杀毒,软件的自动更新任务等可以从启动项中删除以优化启动时处理器负担。 | Windows Power Plans | High Performance Power Plan | 不用多说,将电源设置为最佳性能 | BIOS Power Schemes | [size=12.727272033691406px]尽可能的选择最大性能方案。 | 这个也不用多说了,BIOS中设置为最大性能 | Scheduled Tasks | Verify the scheduled tasks and randomize execution time.
Z0 o4 Z, |% R5 L, S$ \Typically the following scheduled tasks can be disabled:
1 u+ [+ b% K4 E9 V7 n+ v0 K! Q+ l2 J. |/ s) `- j
0 C& L! g1 w6 E8 i K6 S! J4 V5 H
- Application Experience -> AitAgent
- Application Experience -> ProgramDataUpdater
- Autochk -> Proxy
- Customer Experience Improvement Program -> everything under this node (Consolidator, KernelCeipTask, UsbCeip, ServerCeipAssistant, ServerRoleCollector, ServerRoleUsageCollector)
- DiskDiagnostic -> Microsoft-Windows-DiskDiagnosticDataCollector
- Power Efficiency Diagnostics -> AnalyzeSystem
- Server Manager -> ServerManager
- Windows Error Reporting -> QueueReporting, ]0 I4 W: m# K; _" l9 D# A C
| 将无用的计划任务取消 | Disable Logon Screensaver | HKEY_USERS\.DEFAULT\Control Panel\Desktop
7 p6 a# B3 A$ n+ ?' O"ScreenSaveActive"="0" | 关闭屏幕保护程序 | Disabled Boot Animation | Disable
# c& Y* x2 J. a0 ?5 Rbcdedit /set bootux disabled3 q+ Z% u, S {5 y7 p
(需要在Windows 命令行中运行) | 禁用启动动画,加速启动过程 | Disable all application auto-updates | Java and Flash updates can be controlled via the Control Panel.( C5 i( h3 a, D( q6 n. m4 h
SAP updates are disabled in the CCS ADM(X) template. | 禁用所有应用的自动更新 | Defragmentation | 运行磁盘碎片整理 | 在制作桌面模板之前运行磁盘整理,或者定期运行磁盘整理;运行磁盘整理时确保不在工作时间运行以免影响用户使用 | 防病毒软件 | 优化 | 见思杰KB CTX127030 | Write Cache (Operating System) | Device Manager -> Disk Drive Properties -> Policies tab
4 t# k; x/ c" ]6 q8 l/ D/ V
7 x4 D4 H& V# V- b( J. o) b0 k9 b) R8 b8 g
& X! g& p& q1 Z4 J) L& R8 ]7 R, K, `. W! @# s
0 ?; E' O1 s$ s7 p: {( _" q$ p9 ~. L6 R: Z( V) D7 m
% ?& `3 I& ~8 \. K1 X4 j
7 }6 T# d+ O8 F% Z
2 S# b, ?! R4 H* o$ X
/ m2 _9 F$ f" X& S
- b3 a& `* _7 S: o
/ s; d& V. }8 m- A8 I, E" C3 q: n# Y
HKLM\System\CurrentControlSet\Control\Session Manager\Configuration Manager\
" w ` O$ E5 _" q: N7 X' g“RegistryLazyFlushInterval”=dword:00000060 (dec) | 硬件上写缓存不可用时,可以通过设备管理器上的驱动属性启用Windows回写缓存。如果没有硬件写缓存是可用RegistryLazyFlushInterval也应该配置。 | Write Cache (Hardware) | 硬件驱动控制器可以在缓存中存储读写信息以便于读写速度可以达到一个最优值。当写缓存启用时,有数据读写发生时,控制器立即告诉操作系统,允许它继续正常运行。Citrix Consulting建议配置为基于硬件100%写缓存。 | Worker Threads | HKLM\System\CurrentControlSet\Control\Session Manager\Executive\
8 J* X: U4 }. R, D7 P* T O z, [: l“AdditionalCriticalWorkerThreads”=dword:00000064 (dec) | 这个值会影响文件系统缓存预读和延迟写请求的线程数量。增加这个值可以允许在存储子系统有更多I/O,可以改善I/O的性能,特别针对与多处理器系统和强大的存储设备上。 | Page File | My Computer properties -> Advanced -> Performance Settings -> Advanced tab -> Change Virtual Memory | 页面文件其实就是在磁盘上用来存放虚拟内存的文件。系统可以允许分配更多的虚拟内存。虚拟内存的建议配置可以参考微软KB2021748. | SMB 1.0 Client Optimization Note: Tuning SMB 1.0 is required in mixed (2003 / 2008 R2) environments, where SMB 2.0 cannot be used. | HKLM\SYSTEM\CurrentControlSet\Services\Lanmanworkstation\Parameters
9 b! z& Y# B6 { Q9 P) R: k. ~" q"MaxCmds"=dword:00002048 (dec): \) h1 B0 t& [4 b4 r" G
HKLM\SYSTEM\CurrentControlSet\Services\MRxSmb\Parameters
0 h7 i {& C( J8 q% l J"MultiUserEnabled"=dword:00000001* K. ]! A; Q) |6 ]. H e% p
HKLM\SOFTWARE\Microsoft\Windows\ CurrentVersion\Policies\Explorer
, P, U$ B, ]8 f( YNoRemoteRecursiveEvents”=dword:00000001; H& _3 u3 J. W
HKLM\SYSTEM\CurrentControlSet\Services\ Lanmanserver\Parameters
3 Q$ k! Q/ P# S" K5 f( \5 w# B' T/ m"MaxWorkItems"=dword:00008192 (dec)
) q3 a" c2 E- O; j/ m"MaxMpxCt"=dword:00002048 (dec)
+ n2 |& Y' ?2 x8 x"MaxRawWorkItems"=dword:00000512 (dec)! ~# @: {2 ? G0 m6 q9 t' X
"MaxFreeConnections"=dword:00000100 (dec)8 |) s; B, p: u, h- Z' o& I
"MinFreeConnections"=dword:00000032 (dec) | 微软文件传输协议SMB 1.0的优化 | SMB 2.x Client Tuning | HKLM\System\CurrentControlSet\Services\ LanmanWorkstation\Parameters$ j; {$ O3 i/ m
“DisableBandwidthThrottling"=dword:00000001
* w6 E2 D$ L1 G9 L6 ]“DisableLargeMtu”=dword:00000000; S) D5 O! n9 j, ~1 a. [9 @% [" d
HKLM\SOFTWARE\Microsoft\Windows\ CurrentVersion\Policies\Explorer. {% j9 b8 R, i0 J( J" ~
NoRemoteRecursiveEvents”=dword:00000001 | SMB2.0优化 |
! U9 q s( F2 R基于Provisioning Service的XenApp优化项 针对于Provisioning 的XenApp 服务器,由于是需要将XenApp服务器做成标准的vDisk模板,任何更改的设置在重启之后就消失了,所以某些过程就不需要了。这里我们针对这个场景也有如下一些建议的注册表配置: 配置项 | 优化 | 建议/注册表 | 理由 | Disable Clear Page File at Shutdown | yes | HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management], a7 r; X8 L* w. b8 x o+ w
"ClearPageFileAtShutdown"=dword:00000000 | 清理页面文件会延长关机时间从而增加了整个系统重启的时间 | Disable Offline Files | yes | HKLM\SOFTWARE\Microsoft\Windows\ CurrentVersion\NetCache0 l( b* y- p* c* k [/ w
"Enabled"=dword:00000000 | 在XenApp的场景中不需要离线文件这个功能 | Disable Background Defragmentation | yes | HKLM\SOFTWARE\Microsoft\Dfrg\ BootOptimizeFunction) E ?% k, N& f! W# E
"Enable"="N" | Provisioning Services vDisks不需要磁盘碎片整理 | Disable Background Layout Service | yes | HKLM\SOFTWARE\Microsoft\Windows\ CurrentVersion\OptimalLayout
; N t3 N, H% ]* X9 `) Y"EnableAutoLayout"=dword:00000000 | [size=12.727272033691406px]Provisioning Services vDisks不需要重新安排磁盘文件布局 | Disable Hibernation | Yes | HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Power "Heuristics"=hex:05,00,00,00,00,01,00,00,00,00,00,00,00,00,00,00,3f,42,0f,00 | 禁用计算机休眠功能 | Disable Mach. Acct. Password Changes | Yes | HKLM\SYSTEM\CurrentControlSet\Services\Netlogon\Parameters* ]0 n) O, L7 s3 `/ ?
"DisablePasswordChange"=dword:00000001 | 禁用活动目录计算机密码自动更改 | Redirect Event Logs | No | HKLM\SYSTEM\CurrentControlSet\Services\Eventlog\Application
g: w9 i' r# a4 A- n3 ^"File"="D:\EventLogs\Application.evtx"
, J4 K6 k" j X5 W; xHKLM\SYSTEM\CurrentControlSet\Services\Eventlog\Security; j( o7 r; A. P- q
"File"="D:\EventLogs\Security.evtx"
$ d+ y, R6 ^1 H+ P, wHKLM\SYSTEM\CurrentControlSet\Services\Eventlog\System, `5 s) G( f+ s, t- D' ?
"File"="D:\EventLogs\System.evtx" | 由于PVS的计算机重启会恢复原状,所以我们将系统日志重定向到另外的盘,以便于有问题时可以查看到日志 | Disable Large Send Offload | No | HKLM\SYSTEM\CurrentControlSet\Services\BNNS\ Parameters
: H1 ]7 |4 I- u& M- L& U"EnableOffload"=dword:00000000 | 在做vDisk Stream的时候需要禁用此选项 | Disable TCP/IP Offload | No | HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\ Parameters. ?6 D6 e' m+ f1 \* Z' T* U
"DisableTaskOffload"=dword:00000001 | 同上 | Increase Service Startup Timeout | No | HKLM\SYSTEM\CurrentControlSet\Control "ServicesPipeTimeout"=dword:00600000(dec) | 在某些高负载的环境中,windows 服务可能需要超过30秒的时间才能正常启动;这里我们将此设定设置为10分钟 | Scheduled Defrag | No | Disable the scheduled defragmentation of the hard disks.
$ ^: f1 W- \, O/ y5 ^Task Scheduler – Defrag -> ScheduledDefrag | 由于磁盘碎片整理会增加系统负载,且所做的更改重启就没了,所以没有必要做磁盘碎片整理,可以定期重启,既省时又省力 |
注意:优化项为Yes选项是在PVS目标设备上XenConvert Optimize Tool中已经有的功能
( v, I: ]- W$ J0 y9 vWindows服务优化 Windows Server 2008 R2包括一组服务,其中许多服务是默认启用的。当Windows 服务器作为Citrix XenApp服务器的时候,其中的一些服务几乎没有用且显著增加了操作系统的内存占用量。因此以这些服务建议禁用。 2 O/ |2 Q! z2 [4 b) c! A
服务 | 建议 | 理由 | Desktop Windows Manager Session Manager | Potential | 这个服务主要提供windows 7 Areo的主题,由企业自己决定是否需要支持这个主题 | Network List Service | Disable | XenApp服务器的位置不大可能一直在变,因此网络位置的自动检测也是没有必要的。请注意,一些第三方的软件产品例如Appsense需要这两个服务。 注意:禁用这两个服务可能会导致访问一个Https网站有15秒的延迟 | Network Location Awareness | Disable | Themes | Potential | 允许用户管理主题,包括背景,声音和视觉效果。尽管这个服务会占用资源也会影响到整体的规划,每个企业需要自己去决定是否启用此服务。 | Windows Defender | Disabled | 每个企业应该都有自己的防病毒体系,所以微软自带的这个就没必要留着了。 | Windows Update | Potential | PVS的XenApp服务器没必要启用微软的补丁自动更新 |
7 j" t; `/ u% a6 g/ r2 z用户配置 和计算机配置不一样,用户配置无论XenApp服务器vDisk是私有模式还是标准模式都是应用到每一个用户身上。所有的用户设置在XenConvert Optimizer tools都是没有的。 废话不多说,如下是建议的Windows相关的用户设置: 项目 | 建议 | 理由 | Internet Explorer – Force Offscreen Composition | HKEY_CURRENT_USER\Software\Microsoft\ Internet Explorer\Main
+ r- `" Q+ N3 n0 E# X/ N- h5 B& B4 z; ["Force Offscreen Composition"=dword:00000001 | 这个设置可以解决某些网站有闪屏的现象 注意:只对IE8.0之前的浏览器起作用 | Disable Recycle Bin | User Configuration – Administrative Templates – Windows Components – Windows Explorer
. R% I9 q m# g; c3 H: FDo not move deleted files to the Recycle Bin: Enabled | 由于回收站在Windows 2008 R2中是用户配置文件的一部分,在漫游的用户配置文件需要禁用回收站以防止用户配置文件膨胀 | Reduce Menu Show Delay | HKEY_CURRENT_USER\Control Panel\Desktop% ~! T* M* U/ l% ?8 { }1 e
"MenuShowDelay"="150" | 减少菜单显示时间,提供更好的用户体验。 | Disable all Visual Effects except "Use common tasks in folders" and "Use visual styles on windows and buttons" | HKEY_CURRENT_USER\Software\Microsoft\ Windows\CurrentVersion\Explorer\VisualEffects
+ ], [0 w+ t _" i"VisualFXSetting"=dword:000000030 C" o1 v$ g5 @& Q1 [% i
HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics( b5 }9 k4 u5 i
"MinAnimate"="0"& v$ ~" e8 F9 ^3 g3 {
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced
" S7 d; g9 \0 i! V4 _"ListviewAlphaSelect"=dword:00000000 "TaskbarAnimations"=dword:00000000 "ListviewWatermark"=dword:00000000 "ListviewShadow"=dword:00000000
. e- w/ M6 e& w- S' R2 r9 wHKEY_CURRENT_USER\Control Panel\Desktop+ M4 w& u- B" v* t8 i0 D
"FontSmoothing"="0" "UserPreferencesMask"=binary:90,12,01,80 ,10,00,00,00 | 提供更好的用户体验 注意:UserPreferenceMask变化基于设置选定在系统属性-性能选项配置页面。 | Disable Screen Saver | User Configuration – Administrative Templates – Control Panel – Personalization
. Y2 S+ c; f' k# N( L" eEnable Screen Saver: Disable | 在服务器端运行屏幕保护程序会消耗一定的资源,也没有必要;最好是在本地客户端上运行屏幕保护程序 | Documents History | User Configuration – Administrative Templates – Start Menu and Taskbar* H' k- S- D5 o- O5 C S; z9 m
Do not keep history of recently opened documents: Enable' h: ~# e, [3 A# \
Remove Balloon Tips on Start Menu items: Enable
/ X# c$ h- }/ B6 \& }Remove frequent program list from Start Menu: Enable | 减少CPU使用率,改善用户登录时间,增大最大可承载的用户 | Auto End Tasks | HKCU\Control Panel\Desktop1 a" ~9 k) n5 T' G1 b/ Y9 [- n
“AutoEndTasks”=REG_SZ = “1”
8 A7 ]: t, ?8 [/ @/ a' m“WaittoKillAppTimeout”=REG_SZ= “20000” | 有时候用户关闭应用时应用会挂起或者无响应,然后弹出对话框让用户自己选择“等待”或者“终止程序”;这个设置的作用是会自动为用户选择操作避免这个对话框的出现 | Background Spell Checking | Disable using Group Policy | 后台拼写检查会占用大量的系统资源 | Sound Scheme | Disable Windows Logon / Logoff notification sounds% d* c2 N% _# {; H
HKCU\AppEvents\Schemes\Apps\.Default\ WindowsLogon\.Current& j% B2 G8 Z* ~
“(Default)”=REG_SZ=””
% H3 P# o+ B5 NHKCU\AppEvents\Schemes\Apps\.Default\ WindowsLogoff\.Current
1 T9 j7 f+ o; @ a“(Default)”=REG_SZ=”” | 每次用户登入、登出都会播放声音;播放声音产生的流量消耗也会增长用户登录登出的时间。 | / ?3 Z0 I3 |3 n* |
建议的XenApp用户策略配置 目录(在XenApp 策略里面) | 设置 | 理由 | Desktop UI | Desktop Wallpaper: Prohibited! C% K" U: G# J9 a& U7 w9 v
Menu animation: Prohibited. i' {+ M3 Y$ {
View window content while dragging: Prohibited | 这些设置可以使每用户会话的内存和带宽占用率减少 | Visual Display\Moving Images | Progressive compression level: Low (min. setting) | 通过这个策略降低每用户的网络带宽使用率 | Printing\Drivers | Automatic Installation of in-box drivers: Disabled | 尽管这个设置和性能无关,但是这是我们高度建议的一个策略,这个设置会阻止用户安装不需要的打印机驱动,也会减少排查打印机相关问题的复杂度 | 5 L. {! I0 s% T$ B
0 X- M4 m2 _# l6 L# z4 @4 p& | |