|
Windows 2008 R2建议配置 通用的计算机配置 如下是建议部署在XenApp 6和XenApp6.5 的服务器上面的组策略配置项: | 项目 | 路径(计算机配置) | 理由 | | Error Reporting | Administrative Templates – Windows Components – Windows Error Reporting. t, `9 a0 D- N+ m+ F. z5 |
Disable Windows Error Reporting: Enabled | 除非排查问题,不然禁用 | | Disable Customer Experience Improvement Program (CEIP) | Administrative Templates – System – Internet Communication Management – Internet Communication Settings! |8 C, ^) L' L& _& U
Turn off Windows Customer Experience Improvement Program: Enabled | 为减小后台资源消耗,退出微软体验报告回馈 | | Windows Update | Administrative Templates – Windows Components – Windows Updates. X% o# c( l" E% G4 q
Configure Automatic Updates: Disabled | 微软更新应该由管理员更新在桌面模板上面 | | System Restore | Administrative templates – System – System Restore& I" r" Z8 d% C* n8 C
Turn off System Restore: Enabled | 系统还原这里就没有必要了 | | RDP Listener – Printer mapping | Disable printer mapping for RDP sessions.
! u7 V. h5 {/ \- @Administrative Templates – Windows Components – Remote Desktop Services – Remote Desktop Session Host – Printer Redirection7 ~: `. Z0 J! u9 S" U0 C7 O
Do not allow client printer redirection: Enabled | 打开此策略之后,RDP连接会安装映射的打印机,服务器上安装的打印机驱动会变得不统一,且如果出现异常会增加排查问题的难度 |
2 R6 n. ~# y6 H/ a+ h9 t如下注册表配置建议部署在XenApp 6.0 /6.5 服务器上: | 项目 | 建议/注册表 | 理由 | | Hide System Hard Error Messages | HKLM\System\CurrentControlSet\Control\Windows# M* k$ \8 F$ g) O
“ErrorMode”=dword:00000002 | 当Windows或者应用出现一个硬件的错误,它会弹出一个对话框ok或者Continue; 这些错误对用户来说是可以隐藏的,如果用户已经断开,弹出的错误可能会导致会话挂起;系统可以将这个错误信息写到系统日志中去。 | | Spooler Warning Events | HKLM\System\CurrentControlSet\Control\Print\Providers0 t" {$ S/ l: G+ h- E$ m g- I! s& t
“EventLog”=dword:00000001 | 当ICA 会话开始时,ICA 自动创建打印机成功或失败的信息会由Spooler服务写到系统事件日志中去,这个服务会产生太多此类日志,这里的配置是让这个服务只记录错误日志。 | | Paging of the Executive | HKLM\System\CurrentControlSet\Control\Session Manager\Memory Management5 S7 Y7 @* \) n* f; a) d7 `/ d
“DisablePagingExecutive”=dword:00000001 | 为了提高性能,内核模式驱动程序和其他系统组件可以被配置为只在内存里做分页。 | | Edit Run and RunOnce Registry keys | HKLM\Software\Microsoft\Windows\CurrentVersion\Run
; L% b. z9 i4 g8 n( }HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce& N f$ {) j' r+ @* u! v0 }2 Q
HKLM\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Run: v# U1 h" K. B6 p3 t
HKLM\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\RunOnce | 优化开机启动项,这个就不用我多说了,一些无用的例如杀毒,软件的自动更新任务等可以从启动项中删除以优化启动时处理器负担。 | | Windows Power Plans | High Performance Power Plan | 不用多说,将电源设置为最佳性能 | | BIOS Power Schemes | 尽可能的选择最大性能方案。 | 这个也不用多说了,BIOS中设置为最大性能 | | Scheduled Tasks | Verify the scheduled tasks and randomize execution time.
6 f, ?: q1 Q' {8 v* C8 ZTypically the following scheduled tasks can be disabled:
: T4 ]& ?0 D L9 c# ]3 k- M
, o$ X* _1 o4 c
* G' a- G% S6 \3 ]- c
* d) ^4 `7 U' a C* s( \, k/ L+ p- 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 -> QueueReporting3 F+ k6 s+ r( ] W0 f) L
| 将无用的计划任务取消 | | Disable Logon Screensaver | HKEY_USERS\.DEFAULT\Control Panel\Desktop6 v0 J2 F1 a2 ]& M# A
"ScreenSaveActive"="0" | 关闭屏幕保护程序 | | Disabled Boot Animation | Disable
: M: ^% T, \6 z/ z9 o9 R. Bbcdedit /set bootux disabled
7 k! w! Q8 [5 o( z5 k(需要在Windows 命令行中运行) | 禁用启动动画,加速启动过程 | | Disable all application auto-updates | Java and Flash updates can be controlled via the Control Panel.
8 E& L8 E: A0 P' j3 zSAP updates are disabled in the CCS ADM(X) template. | 禁用所有应用的自动更新 | | Defragmentation | 运行磁盘碎片整理 | 在制作桌面模板之前运行磁盘整理,或者定期运行磁盘整理;运行磁盘整理时确保不在工作时间运行以免影响用户使用 | | 防病毒软件 | 优化 | 见思杰KB CTX127030 | | Write Cache (Operating System) | Device Manager -> Disk Drive Properties -> Policies tab % A7 q7 \6 Y2 w/ \5 J
7 ~* _% ~6 q H0 x; @
$ l' Y/ Q3 {" V
8 o# b2 [; L5 a8 p* z% v: `; p3 O/ `
6 }! F* l2 p: J5 a, N! a8 {& K! p$ ^5 v
' `6 ^* {% G# {6 Q
+ I+ B/ |: M; M! t, I2 Z8 ]
2 W& q( E0 C+ ^+ q K" K/ W% f- z
% M! a: y3 V" d1 Q
5 L. m: H6 n$ I3 y6 I$ X. K0 ?, b0 Q
, [) H, {/ M/ j; x! {- f
' e+ S3 e4 g, C0 \& P
; \+ r g- p' t7 j2 ]8 K! u; R" u
HKLM\System\CurrentControlSet\Control\Session Manager\Configuration Manager\+ @. E) V: q1 r
“RegistryLazyFlushInterval”=dword:00000060 (dec) | 硬件上写缓存不可用时,可以通过设备管理器上的驱动属性启用Windows回写缓存。如果没有硬件写缓存是可用RegistryLazyFlushInterval也应该配置。 | | Write Cache (Hardware) | 硬件驱动控制器可以在缓存中存储读写信息以便于读写速度可以达到一个最优值。当写缓存启用时,有数据读写发生时,控制器立即告诉操作系统,允许它继续正常运行。Citrix Consulting建议配置为基于硬件100%写缓存。 | | Worker Threads | HKLM\System\CurrentControlSet\Control\Session Manager\Executive\
" E( p3 f' o! W% K* V2 Q4 q“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
2 p. C' Q) Q# U5 Y( |"MaxCmds"=dword:00002048 (dec)
- D a* M' |( Y6 ^' ]1 aHKLM\SYSTEM\CurrentControlSet\Services\MRxSmb\Parameters5 l7 |* O. X. ?$ T
"MultiUserEnabled"=dword:00000001
, E1 H z, Y" _6 m2 _* r5 ^HKLM\SOFTWARE\Microsoft\Windows\ CurrentVersion\Policies\Explorer
" }+ l, y' z8 {# E) ~NoRemoteRecursiveEvents”=dword:00000001) ~* u/ h3 q3 n# D1 X* o
HKLM\SYSTEM\CurrentControlSet\Services\ Lanmanserver\Parameters u% f5 J2 O4 x4 Y0 c. C
"MaxWorkItems"=dword:00008192 (dec)
1 @4 J3 H* y2 N) j+ B5 \+ s7 t"MaxMpxCt"=dword:00002048 (dec)
7 M4 T! P( U5 t% k8 t {8 l& L. N9 D"MaxRawWorkItems"=dword:00000512 (dec)
7 j0 W4 G2 k: t( o1 m. h3 [% \"MaxFreeConnections"=dword:00000100 (dec)2 j% v* W: |' i2 g) d- C- a
"MinFreeConnections"=dword:00000032 (dec) | 微软文件传输协议SMB 1.0的优化 | | SMB 2.x Client Tuning | HKLM\System\CurrentControlSet\Services\ LanmanWorkstation\Parameters
R& I# j) \8 s- g9 p9 I& n. I$ c“DisableBandwidthThrottling"=dword:00000001& `. z! _& Y# n1 Z* A [4 b7 J
“DisableLargeMtu”=dword:000000001 b, O* g. o: h( m
HKLM\SOFTWARE\Microsoft\Windows\ CurrentVersion\Policies\Explorer
6 i- ~, y; Y, `4 A" eNoRemoteRecursiveEvents”=dword:00000001 | SMB2.0优化 |
# Q# s* {- @0 n6 ]9 _; _5 ~基于Provisioning Service的XenApp优化项 针对于Provisioning 的XenApp 服务器,由于是需要将XenApp服务器做成标准的vDisk模板,任何更改的设置在重启之后就消失了,所以某些过程就不需要了。这里我们针对这个场景也有如下一些建议的注册表配置: | 配置项 | 优化 | 建议/注册表 | 理由 | | Disable Clear Page File at Shutdown | yes | HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management]
J6 t) N& X3 ~5 U( ^$ M1 y"ClearPageFileAtShutdown"=dword:00000000 | 清理页面文件会延长关机时间从而增加了整个系统重启的时间 | | Disable Offline Files | yes | HKLM\SOFTWARE\Microsoft\Windows\ CurrentVersion\NetCache# V0 a& M: `4 b, t) j
"Enabled"=dword:00000000 | 在XenApp的场景中不需要离线文件这个功能 | | Disable Background Defragmentation | yes | HKLM\SOFTWARE\Microsoft\Dfrg\ BootOptimizeFunction4 v$ g, p9 ~" O* ?( a) _
"Enable"="N" | Provisioning Services vDisks不需要磁盘碎片整理 | | Disable Background Layout Service | yes | HKLM\SOFTWARE\Microsoft\Windows\ CurrentVersion\OptimalLayout2 F' V2 C) E8 ]9 D7 \
"EnableAutoLayout"=dword:00000000 | 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( g: {8 ?; ]4 _0 \5 }
"DisablePasswordChange"=dword:00000001 | 禁用活动目录计算机密码自动更改 | | Redirect Event Logs | No | HKLM\SYSTEM\CurrentControlSet\Services\Eventlog\Application6 T+ E0 i7 m/ F! _
"File"="D:\EventLogs\Application.evtx"
8 i3 Y' J; a$ ^) c- \& FHKLM\SYSTEM\CurrentControlSet\Services\Eventlog\Security
% k' G5 O8 F7 W, {9 J' o! j& u% t1 X"File"="D:\EventLogs\Security.evtx"% P) {6 J$ O9 \1 n# j
HKLM\SYSTEM\CurrentControlSet\Services\Eventlog\System7 s0 S" L5 ^4 u+ d
"File"="D:\EventLogs\System.evtx" | 由于PVS的计算机重启会恢复原状,所以我们将系统日志重定向到另外的盘,以便于有问题时可以查看到日志 | | Disable Large Send Offload | No | HKLM\SYSTEM\CurrentControlSet\Services\BNNS\ Parameters
+ q3 p' A& x5 j( w8 I"EnableOffload"=dword:00000000 | 在做vDisk Stream的时候需要禁用此选项 | | Disable TCP/IP Offload | No | HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\ Parameters; d# }1 P* K* O+ P8 k3 D
"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.
% b6 U* Z0 z3 Z+ K; HTask Scheduler – Defrag -> ScheduledDefrag | 由于磁盘碎片整理会增加系统负载,且所做的更改重启就没了,所以没有必要做磁盘碎片整理,可以定期重启,既省时又省力 |
注意:优化项为Yes选项是在PVS目标设备上XenConvert Optimize Tool中已经有的功能
- n8 k: ?' j* [ UWindows服务优化 Windows Server 2008 R2包括一组服务,其中许多服务是默认启用的。当Windows 服务器作为Citrix XenApp服务器的时候,其中的一些服务几乎没有用且显著增加了操作系统的内存占用量。因此以这些服务建议禁用。 ! O" p {7 m7 ~8 M0 ^. [
| 服务 | 建议 | 理由 | | 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服务器没必要启用微软的补丁自动更新 |
4 C F. Q/ t8 m) b6 [ U用户配置 和计算机配置不一样,用户配置无论XenApp服务器vDisk是私有模式还是标准模式都是应用到每一个用户身上。所有的用户设置在XenConvert Optimizer tools都是没有的。 废话不多说,如下是建议的Windows相关的用户设置: | 项目 | 建议 | 理由 | | Internet Explorer – Force Offscreen Composition | HKEY_CURRENT_USER\Software\Microsoft\ Internet Explorer\Main! w' Z, W# P0 \ Y
"Force Offscreen Composition"=dword:00000001 | 这个设置可以解决某些网站有闪屏的现象 注意:只对IE8.0之前的浏览器起作用 | | Disable Recycle Bin | User Configuration – Administrative Templates – Windows Components – Windows Explorer
4 S, R( c3 `* I7 T: d/ uDo not move deleted files to the Recycle Bin: Enabled | 由于回收站在Windows 2008 R2中是用户配置文件的一部分,在漫游的用户配置文件需要禁用回收站以防止用户配置文件膨胀 | | Reduce Menu Show Delay | HKEY_CURRENT_USER\Control Panel\Desktop( s! j8 B( B* P* [
"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\VisualEffects4 k( j( g; \0 u/ q( t$ @) T X6 F
"VisualFXSetting"=dword:00000003
- m! z; y% z2 |' l h; @HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics
/ w, b0 e/ n S; Q"MinAnimate"="0"% A( Q% Q2 i Q# I' w* u, P5 h
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced- F5 V: q% M1 F1 C
"ListviewAlphaSelect"=dword:00000000 "TaskbarAnimations"=dword:00000000 "ListviewWatermark"=dword:00000000 "ListviewShadow"=dword:000000000 i3 S2 U: m( C* J% Y# d
HKEY_CURRENT_USER\Control Panel\Desktop
! E$ c- _, U4 I, r. K# L"FontSmoothing"="0" "UserPreferencesMask"=binary:90,12,01,80 ,10,00,00,00 | 提供更好的用户体验 注意:UserPreferenceMask变化基于设置选定在系统属性-性能选项配置页面。 | | Disable Screen Saver | User Configuration – Administrative Templates – Control Panel – Personalization2 e3 K: u& E0 o$ H
Enable Screen Saver: Disable | 在服务器端运行屏幕保护程序会消耗一定的资源,也没有必要;最好是在本地客户端上运行屏幕保护程序 | | Documents History | User Configuration – Administrative Templates – Start Menu and Taskbar
8 O8 i% ?. b1 x+ o0 x, SDo not keep history of recently opened documents: Enable7 v ?) n! o4 `" P* _% [2 K
Remove Balloon Tips on Start Menu items: Enable r5 e8 O% M: e# ~6 l6 L. B
Remove frequent program list from Start Menu: Enable | 减少CPU使用率,改善用户登录时间,增大最大可承载的用户 | | Auto End Tasks | HKCU\Control Panel\Desktop8 w6 e+ i1 r! J& B t
“AutoEndTasks”=REG_SZ = “1”; G/ }2 h8 E2 C+ N0 n* i, {
“WaittoKillAppTimeout”=REG_SZ= “20000” | 有时候用户关闭应用时应用会挂起或者无响应,然后弹出对话框让用户自己选择“等待”或者“终止程序”;这个设置的作用是会自动为用户选择操作避免这个对话框的出现 | | Background Spell Checking | Disable using Group Policy | 后台拼写检查会占用大量的系统资源 | | Sound Scheme | Disable Windows Logon / Logoff notification sounds& R9 Q, o1 n F0 b
HKCU\AppEvents\Schemes\Apps\.Default\ WindowsLogon\.Current
1 d! B1 A H( o/ f2 r, g6 u& W" d/ k“(Default)”=REG_SZ=””
8 ` s- n2 }1 tHKCU\AppEvents\Schemes\Apps\.Default\ WindowsLogoff\.Current
7 O4 _7 t3 Q8 ?- J“(Default)”=REG_SZ=”” | 每次用户登入、登出都会播放声音;播放声音产生的流量消耗也会增长用户登录登出的时间。 | " r7 T( V4 W8 V( T$ s, O
建议的XenApp用户策略配置 | 目录(在XenApp 策略里面) | 设置 | 理由 | | Desktop UI | Desktop Wallpaper: Prohibited, Y8 x2 ?+ A7 ^$ S- z
Menu animation: Prohibited% q" X3 c0 D8 A, v. u: q
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 | 尽管这个设置和性能无关,但是这是我们高度建议的一个策略,这个设置会阻止用户安装不需要的打印机驱动,也会减少排查打印机相关问题的复杂度 |
i8 B9 i7 ^- V; _
6 j! b1 Q8 ?1 I' L! M1 K |