Hướng dẫn

Thông báo Gần đây

  • Làm Image đa cấu hình với CCBoot PnP bước 1: - Lựa chọn các đời main từ thấp đến cao- Phân loại các main cùng đời vào một nhóm- Quá 2 đời main hoặc 2 nền tảng thì làm ...
    Posted Feb 23, 2014, 11:08 AM by QQ Services
  • Làm thế nào để xác định kích thước Page File thích hợp cho các HĐH Windows 64bit A page file (also known as a "paging file") is an optional, hidden system file on a hard disk. The page file can be used to "back" (or support) system ...
    Posted Feb 19, 2014, 8:25 AM by QQ Services
  • Tối ưu Windows Server 2008 R2 cho Hệ thống Bootrom - Cybergames Trong các hệ thống BootRom (BR) đang được triển khai tại phòng NET ở Việt Nam hiện nay, nổi trội lên 2 hệ thống BR chạy trên nền tảng HĐH ...
    Posted Nov 12, 2015, 1:47 AM by QQ Services
Showing posts 1 - 3 of 3. View more »

Làm Image đa cấu hình với CCBoot PnP

posted Feb 23, 2014, 11:08 AM by QQ Services

bước 1: 
- Lựa chọn các đời main từ thấp đến cao
- Phân loại các main cùng đời vào một nhóm
- Quá 2 đời main hoặc 2 nền tảng thì làm 2 image
- Cài driver cho từng nhóm main
- Phân bố hardware profile theo card màn hình

Làm thế nào để xác định kích thước Page File thích hợp cho các HĐH Windows 64bit

posted Feb 19, 2014, 8:25 AM by QQ Services

A page file (also known as a "paging file") is an optional, hidden system file on a hard disk. The page file can be used to "back" (or support) system crash dumps and extend how much system-committed memory (also known as “virtual memory”) a system can back. It also enables the system to remove infrequently accessed modified pages from physical memory to let the system use physical memory more efficiently for more frequently accessed pages.

64-bit versions of Windows and Windows Server support more physical memory (RAM) than 32-bit versions support. However, the reason to configure the page file size has not changed. It has always been about supporting a system crash dump, if it is necessary, or extending the system commit limit, if it is necessary. For example, when a lot of physical memory is installed, a page file might not be required to back the system commit charge during peak usage. The available physical memory alone might be large enough to do this. However, a page file or a dedicated dump file might still be required to back a system crash dump.

Use the following considerations for page file sizing for all versions of Windows and Windows Server:
  • Crash dump setting: If you want a crash dump file to be created during a system crash, a page file or a dedicated dump file must exist and be large enough to back the system crash dump setting. Otherwise, a system memory dump file is not created.
  • Peak system commit charge: The system commit charge cannot exceed the system commit limit. This limit is the sum of physical memory (RAM) and all page files combined. If no page files exist, the system commit limit is slightly less than the physical memory installed. Peak system-committed memory usage can vary greatly between systems. Therefore, physical memory and page file sizing also varies.
  • Quantity of infrequently accessed pages: The purpose of a page file is to back infrequently accessed modified pages so that they can be removed from physical memory. This provides more available space for more frequently accessed pages. The "\Memory\Modified Page List Bytes" performance counter measures, in part, the number of infrequently accessed modified pages that are destined for the hard disk. However, be aware that not all the memory on the modified page list is written out to disk. Typically, several hundred megabytes of memory remains resident on the modified list. Therefore, consider extending or adding a page file if all the following conditions are true:
    • More available physical memory (\Memory\Available MBytes) is required.
    • The modified page list contains a significant amount of memory.
    • The existing page files are fairly full (\Paging Files(*)\% Usage).

    Notes
    • Some products or services may require a page file for reasons other than those discussed here. For more information, check your product documentation. For example, Windows Server domain controllers and DFS replication, certificate, and LDS servers (also Client editions) are not supported without a configured page file. The algorithm of the database cache for ESENT (ESE, in Microsoft Exchange Server) depends on the "\Memory\Transition Pages RePurposed/sec" performance monitor counter. A page file is required to make sure that the database cache can release memory if memory is requested by other services or applications. In summary, page file sizing depends on the system crash dump setting requirements and the system commit charge peak usage or expected usage. Both considerations are unique to each system, even for systems that are identical to other systems. This means that page file sizing is unique to each system and cannot be generalized.
    • For Windows Server 2012 Hyper-V and Windows Server 2012 R2 Hyper-V, the page file of the management OS (commonly called the host OS) should be left at the default of setting of "System Managed." This is per the Hyper-V product group.

Collapse imageMore information

System committed memory

The system commit limit is the sum of physical memory and all page files combined. It represents the maximum system-committed memory (known as the “system commit charge”) that the system can back. The system commit charge is the total committed or “promised” memory of all committed virtual memory in the system. If the system commit charge reaches the system commit limit, the system and processes might not obtain committed memory. This condition can cause hangs, crashes, and other malfunctions. Therefore, make sure that you set the system commit limit large enough to back the system commit charge during peak usage. 

The system commit charge and system commit limit can be measured on the Performance tab in Task Manager or by using "\Memory\Committed Bytes" and "\Memory\Commit Limit" performance counters. The "\Memory\% Committed Bytes In Use" counter is a ratio of the "\Memory\Committed Bytes" to "\Memory\Commit Limit" values. 

Note System-managed page files automatically grow up to three times physical memory or 4 GB (whichever is larger) when the system commit charge reaches 90 percent of the system commit limit. This assumes that enough free disk space is available to accommodate the growth.

System crash dumps

A system crash (also known as a “bug check” or a "Stop error") occurs when the system cannot run correctly. The dump file that is produced from this event is called a system crash dump. A page file or dedicated dump file is used to write a crash dump file (memory.dmp) to disk. Therefore, a page file or a dedicated dump file must be large enough to back the kind of crash dump selected. Otherwise, the system cannot create the crash dump file.

Note During startup, system-managed page files and system-managed dedicated dump files are sized respective to the system crash dump settings. This assumes that enough free disk space exists.
System crash dump settingMinimum page file size requirement
Small memory dump (256 KB)1 MB
Kernel memory dumpDepends on kernel virtual memory usage
Complete memory dump1 x RAM plus 257 MB*
Automatic memory dumpAutomatic selection of small, kernel, or complete memory dump

* 1 MB of header data and device drivers can total 256 MB of secondary crash dump data.

Automatic memory dump

Windows 8 and Windows Server 2012 introduced the “Automatic memory dump” feature. This feature is enabled by default. This is a new setting, not a new kind of crash dump. This setting automatically selects the best system crash dump based on the frequency of system crashes. 

The Automatic memory dump setting at first selects a Small memory dump, which requires a page file or a dedicated dump file of at least 256 KB. If the system crashes, the Automatic memory dump feature selects a Kernel memory dump at startup. Then, it increases the minimum size of the system-managed page file or the system-managed dedicated dump file to back this kind of crash dump. 

Kernel memory crash dumps require enough page file space or dedicated dump file space to accommodate the kernel mode side of virtual memory usage. If the system crashes again within four weeks of the previous crash, a Complete memory dump is selected at restart. This requires a page file or dedicated dump file of at least the size of physical memory (RAM) plus 1 MB for header information plus 256 MB for potential driver data to support all the potential data that is dumped from memory. Again, the system-managed page file or the system-managed dedicated dump file will be increased to back this kind of crash dump. If the system is configured to have a page file or a dedicated dump file of a specific size, make sure that the size is sufficient to back the crash dump setting that is listed in the table earlier in this section together with and the peak system commit charge.

For more information about system crash dumps, click the following article number to go to the article in the Microsoft Knowledge Base:

969028 How to generate a kernel or a complete memory dump file in Windows Server 2008 and Windows Server 2008 R2

Dedicated dump files

Computers that are running Microsoft Windows or Microsoft Windows Server usually must have a page file to back a system crash dump. System administrators now have the option to create a dedicated dump file instead by using the following software packages to start with:
  • Windows 7 Service Pack 1 with hotfix 2716542 applied
  • Windows Server 2008 R2 Service Pack 1 with hotfix 2716542 applied
A dedicated dump file is a page file that is not used for paging. Instead, it is “dedicated” to back a system crash dump file (memory.dmp) when a system crash occurs. Dedicated dump files can be put on any disk volume that can support a page file. We recommend that you use a dedicated dump file when you want a system crash dump but you do not want a page file. 

For more information about dedicated dump files, click the following article numbers to go to the articles in the Microsoft Knowledge Base:

969028 How to generate a kernel or a complete memory dump file in Windows Server 2008 and Windows Server 2008 R2

950858 Dedicated dump files are unexpectedly truncated to 4 GB on a computer that is running Windows Server 2008 or Windows Vista and that has more than 4 GB of physical memory

System-managed page files

By default, page files are system-managed. This means that the page files increase and decrease based on many factors, such as the amount of physical memory installed, the process of accommodating the system commit charge, and the process of accommodating a system crash dump. 

For example, when the system commit charge is more than 90 percent of the system commit limit, the page file is increased to back it. This continues to occur until the page file reaches three times the size of physical memory or 4 GB, whichever is larger. This all assumes that the logical disk that is hosting the page file is large enough to accommodate the growth. 

The following table lists the minimum and maximum page file sizes of system-managed page files.
Operating systemMinimum page file sizeMaximum page file size
Windows XP and Windows Server 2003 with less than 1 GB of RAM1.5 x RAM3 x RAM or 4 GB, whichever is larger
Windows XP and Windows Server 2003 with more than 1 GB of RAM1 x RAM3 x RAM or 4 GB, whichever is larger
Windows Vista and Windows Server 20081 x RAM3 x RAM or 4 GB, whichever is larger
Windows 7 and Windows Server 2008 R21 x RAM3 x RAM or 4 GB, whichever is larger
Windows 8 and Windows Server 2012Depends on crash dump setting*3 x RAM or 4 GB, whichever is larger
Windows 8.1 and Windows Server 2012 R2Depends on crash dump setting*3 x RAM or 4 GB, whichever is larger

* See system crash dumps.

Performance counters

Several performance counters are related to page files. This section describes the counters and what they measure.
\Memory\Page/sec and other hard page fault counters
The following performance counters measure hard page faults (which include, but are not limited to, page file reads):
  • \Memory\Page/sec
  • \Memory\Page Reads/sec
  • \Memory\Page Inputs/sec
The following performance counters measure page file writes:
  • \Memory\Page Writes/sec
  • \Memory\Page Output/sec
Hard page faults are faults that must be resolved by retrieving the data from disk. Such data can include portions of DLLs, .exe files, memory-mapped files, and page files. These faults might or might not be related to a page file or to a low-memory condition. Hard page faults are a standard function of the operating system. They occur when the following items are read:
  • Parts of image files (.dll and .exe files) as they are used
  • Memory-mapped files
  • A page file
High values for these counters (excessive paging) indicate disk access of generally 4 KB per page fault on x86 and x64 versions of Windows and Windows Server. This disk access might or might not be related to page file activity but may contribute to poor disk performance that can cause system-wide delays if the related disks are overwhelmed. 

Therefore, we recommend that you monitor the disk performance of the logical disks that host a page file in correlation with these counters. Be aware that a system that has a sustained 100 hard page faults per second experiences 400 KB per second disk transfers. Most 7200 RPM disk drives can handle about 5 MB per second at an IO size of 16 KB or 800 KB per second at an IO size of 4 KB. No performance counter directly measures which logical disk the hard page faults are resolved for.
\Paging File(*)\% Usage
The \Paging File(*)\% Usage performance counter measures the percentage of usage of each page file. 100 percent usage of a page file does not indicate a performance problem as long as the system commit limit is not reached by the system commit charge, and if a significant amount of memory is not waiting to be written to a page file.

Note The size of the Modified Page List (\Memory\Modified Page List Bytes) is the total of modified data that is waiting to be written to disk. 

If the Modified Page List (a list of physical memory pages that are the least frequently accessed) contains a lot of memory, and if the % Usage value of all page files is greater than 90, you can make more physical memory available for more frequently access pages by increasing or adding a page file.

Note Not all the memory on the modified page list is written out to disk. Typically, several hundred megabytes of memory remains resident on the modified list.

Multiple page files and disk considerations

If a system is configured to have more than one page file, the page file that responds first is the one that is used. This means that page files that are on faster disks are used more frequently. Also, putting a page file on a “fast” or “slow” disk is important only if the page file is frequently accessed and if the disk that is hosting the respective page file is overwhelmed. Be aware that actual page file usage depends greatly on the amount of modified memory that the system is managing. This means that files that already exist on disk (such as .txt, .doc, .dll, and .exe) are not written to a page file. Only modified data that does not already exist on disk (for example, unsaved text in Notepad ) is memory that could potentially be backed by a page file. After the unsaved data is saved to disk as a file, it is backed by the disk and not by a page file.

Tối ưu Windows Server 2008 R2 cho Hệ thống Bootrom - Cybergames

posted Feb 16, 2014, 9:01 AM by QQ Services   [ updated Nov 12, 2015, 1:47 AM ]

Trong các hệ thống BootRom (BR) đang được triển khai tại phòng NET ở Việt Nam hiện nay, nổi trội lên 2 hệ thống BR chạy trên nền tảng HĐH Windows của Microsoft là GCafe của Garena và CCBoot của YoungSoft. Các hệ thống này đều có thể hoạt động trên các HĐH khác nhau của Microsoft như Windows XP, Windows Server 2003, Windows 7, và Windows Server 2008. Trong khuôn khổ bài viết này, kythuatgame.com sẽ hướng dẫn các bạn tinh chỉnh HĐH Windows Server 2008 R2 theo hướng tối ưu nhất cho các hệ thống BootRom nêu trên.

Tinh chỉnh chung

Dưới đây là các tinh chỉnh mà mặt nào đó thuộc Group Polycies của Windows

Item
 Đường dẫn nơi tinh chỉnh Diễn giải chức năng
Error Reporting Administrative Templates – Windows Components – Windows Error Reporting
 Disable Windows Error Reporting: Enabled
Khi ứng dụng xảy ra lỗi, một báo cáo các lỗi xảy ra sẽ được gửi tới Microsoft. Nên Tắt
Disable Customer Experience 
Improvement Program (CEIP)
 Administrative Templates – System – Internet Communication Management –  Internet Communication Settings
 Turn off Windows Customer Experience Improvement Program: Enable
Chương trình cải thiện trải nghiệm người dùng của Windows. Nó giúp cho người dùng có sự trải nghiệm tốt hơn với máy tính, song cũng làm giảm hiệu suất của máy tính thông qua việc chuẩn đoán và phản hồi trải nghiệm của người dùng. Nên Tắt
Windows Update Administrative Templates – Windows Components – Windows Updates
 Configure Automatic Updates: Disabled
Chương trình cập nhật của Windows, chỉ nên chạy trên những máy tính cơ bản. Nên Tắt chương trình này
System Restore Administrative templates – System – System Restore
 Turn off System Restore: Enabled
Chức năng khôi phục hệ thống của Windows. Không cần thiết do tính chất của hệ thống ảo và việc quản lý một file ảnh duy nhất.
RDP Listener – Printer mapping Disable printer mapping for RDP sessions.
 Administrative Templates – Windows Components – Remote Desktop Services  – Remote Desktop Session Host – Printer Redirection
 Do not allow client printer redirection: Enabled
Ánh xạ các máy in trong các phiên quản trị RDP có thể gây ra việc driver các máy in được cài đặt. Điều này có thể gây ra sự không thống nhất giữa các cấu hình server và làm gia tăng tính phức tạp trong việc xử lý sự cố. Nên tắt ứng dụng này


Tinh chỉnh Registry

Chú ý: Nếu có thể, bạn nên thay đổi cấu hình của registry thông qua việc ưu tiên sử dụng Windows Group Policy.

  ConfigurationRecommendation / Registry Key Diễn giải
Hide System Hard Error Messages

Ẩn thông báo lỗi nghiêm trọng của phần cứng
 HKLM\System\CurrentControlSet\Control\Windows
“ErrorMode”=dword:00000002
Khi Windows hay một ứng dụng sinh ra một lỗi nghiêm trọng, một hộp thoại với lỗi thường xảy ra đó sẽ xuất hiện kèm theo với một nút OK hoặc Continue. Những thông báo này thường là khó hiểu đối với người dùng, và họ có thể làm treo, đơ phiên làm việc lúc đó nếu người dùng ngắt kết nối với chúng, mặc dù có một lỗi vẫn đang chờ phản hồi. Hệ thống có thể được cấu hình để ngăn chặn những tin nhắn này bằng cách ghi chúng vào Event Log and tự đụng lựa chọn "OK" giúp người dùng.
Spooler Warning Events HKLM\System\CurrentControlSet\Control\Print\Providers  “EventLog”=dword:00000001Dịch vụ Spooler có thể nhanh chóng điền vào System Event Log (Ghi lại sự kiện hệ thống) với những sự kiện cảnh báo không sử dụng. Những xảy ra khi một máy in Tự động Tạo ICA được tạo ra hay được xóa đi, cái mà sản sinh hàng nghìn sự kiện trong ngày. Spooler nên được cấu hình để ghi vào EnventLog đối với những lỗi xảy ra.
Paging of the Executive HKLM\System\CurrentControlSet\Control\SessionManager\Memory Management
“DisablePagingExecutive”=dword:00000001
Để tăng cường hiệu suất, những driver (trình điều khiển phần cứng) hạt nhân cùng các thành phần hệ thống khác có thể được cấu hình sao cho chúng không được ghi vào bộ nhớ ảo nằm trên ổ cứng (Pagefile). Tuy nhiên, hệ thống phải đủ bộ nhớ rảnh rang để giữ những chúng.
Edit Run and RunOnce Registry keys

Loại bỏ các ứng dụng không cần thiết chạy cùng windows khi khởi động
 HKLM\Software\Microsoft\Windows\CurrentVersion\Run

HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce

HKLM\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Run

HKLM\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\RunOnce

Những khóa Registry The Run and RunOnce định nghĩa những chương trình mà sẽ được khởi động nhiều lần hoặc một lần cùng với Windows. Trong một hệ thống nhiều user, chúng có thể đóng góp đáng kể vào việc sử dụng bộ vi xử lý và qua đó làm giảm khả năng phải xử lý nhiều. Đối với những chương trình mà có thể chạy một lần với một bối cảnh hệ thống như Java Schduler (Cập nhật Java), các module diệt virus thì được khuyến cáo nên xóa bỏ khỏi những khóa Registry ở trên.
Windows Power Plans

Các kế hoạch sử dụng năng lượng của Windows
 High Performance Power Plan

 Để ở chế độ này, Vi xử lý sẽ luôn luôn được đặt ở trạng thái hoạt động với hiệu suất cao nhất.
BIOS PowerSchemes

Thiết đặt sử dụng năng lượng trong BIOS

 Lựa chọn sắp đặt sử dụng hiệu suất tối đa nếu có thểPhần cứng server gần đây thường bao gồm các mức thiết đặt tiết kiệm năng lượng trong BIOS, cái mà có thể làm cho các CPU của một server bị khóa với một tốc độ thấp hơn tốc độ tối đa. Khuyến cáo thiết đặt ở mức hiệu suất tối đa.
 Scheduled Tasks

Các công việc được lập lịch thi hành
Soát lại các công việc được lập lịch và thời gian ngẫu nhiên thi hành chúng. Thông thường những công việc lập lịch dưới đây có thể cấm:
  • 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
Các công việc được lập lịch nên được sử dụng một cách cẩn trọng và thời gian thực thi nên là ngẫu nhiên, vì để ngăn chặn nhiều tác động tiêu cực đến các cơ sở hạ tầng trung tâm như hệ thống lưu trữ hoặc cơ sở dữ liệu.
Disable Logon Screensaver

Cấm bảo vệ màn hình Logon Screensave
 HKEY_USERS\.DEFAULT\Control Panel\Desktop
"ScreenSaveActive"="0"
 Việc cấm một ScreenSaver có thể tăng cường hiệu suất.
 Disabled Boot Animation

Cấm ngữ cảnh hoạt hình, đồ họa khi khởi động
Run in Command Promt 
Disable bcdedit /set bootux disabled (need to be run from the Windows Command Prompt)
Cấm ngữ cảnh hoạt hình, cái mà không người dùng nào có thể thấy sẽ giúp tiết kiệm tài nguyên và tăng cường tốc độ toàn bộ quá trình khởi động.

Chú ý: Việc cấm ngữ cảnh hoạt hình khởi động sẽ cấm tất cả các phản hồi về giao diện cho tới khi màn hình đang nhập xuất hiện. Hành vi này có thể làm tăng tính phức tạp cho việc xử lý sự cố.

 Disable all application auto-updates

Cấm tự động cập nhật tất cả các ứng dụng
  •  Java updates can be controlled via the Control Panel
  • SAP updates are disabled in the CCS ADM(X) template.
  • Google Update
  • Flash Update
Tự động cập nhật nên được quản lý để ngăn chặn những thay đổi được thực hiện đối với môi trường bởi người sử dụng.
 Defragmentation

Chống phân mảnh ổ đĩa
 Run defragmentationChống phân mảnh ổ đĩa nên được hoàn thành trước khi tạo bản ảnh cho máy trạm hoặc trong các khoảng thời gian thường xuyên để đảm bảo ổ đĩa được tối ưu nhất. Khi lập lịch chống phân mảnh ổ đĩa được sử dụng, cần đảm bảo rằng, việc lập lịch đó nên vào các khoảng thời gian rãnh rỗi của máy tính (Ví dụ vào lúc 1H sáng thứ tư hàng tuần).
 Antivirus Optimize Follow the Best Practices as outlined  here.
 Write Cache
(Operating System)

Bật Write Cache (Sử dụng chức năng của HĐH)
Device Manager a Disk Drive Properties > Policies tab


Additional settings:
HKLM\System\CurrentControlSet\Control\Session Manager\Configuration Manager\
“RegistryLazyFlushInterval”=dword:00000060 (dec)
Dành cho phần cứng mà không có chức năng write cache
 Write Cache
(Hardware)
 Những bộ điều khiển phần cứng (Card Raid, Array Raid) có thể lưu trữ trên nó những gì ghi và đọc vào trong một bộ nhớ cache sao cho dữ liệu có thể đọc và ghi một cách tối ưu nhất. Khi được kích hoạt, bộ điều khiển ngay lập tức sẽ thông báo cho hệ điều hành rằng dữ liệu vừa được ghi hay đọc, cho phép nó tiếp tục các thao tác thông thường.
 Worker Threads

Nhiều luồng công việc
 HKLM\System\CurrentControlSet\Control\SessionManager\Executive\
“AdditionalCriticalWorkerThreads”=dword:00000064 (dec)
Giá trị này ảnh hưởng tới số lượng các luồng công việc mà file hệ thống cache sử dụng cho các yêu cầu đọc trước - ghi sau. Nâng cao giá trị này có thể cho phép thêm nhiều các hàng đợi Vào/Ra (I/O) trong các hệ thống lưu trữ do đó có thể cải thiện hiệu suất Vào/Ra,đặc biệt trên các hệ thống với nhiều vi xử lý và phần cứng lưu trữ mạnh mẽ.
 Page File My Computer properties > Advanced > Performance
Settings > Advanced tab > Change Virtual Memory

Page File là một file vật lý trên ổ đĩa nơi mà bộ nhớ ảo của hệ thống có thể  được lưu trữ. Điều này cho phép hệ thống phân bổ và ký thác thêm bộ nhớ ảo hơn là có một bộ nhớ vật lý.

Page File nên được tối ưu hóa như sau:
 Có cùng dung lượng min-max để giảm tối thiểu sự phân mảnh của Page File.

Chú ý: Để thêm thông tin về xác định kích cỡ phù hợp của page file, có thể tìm ở đây.
 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
"MaxCmds"=dword:00002048 (dec)

 HKLM\SYSTEM\CurrentControlSet\Services\MRxSmb
\Parameters
"MultiUserEnabled"=dword:00000001

HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer
NoRemoteRecursiveEvents”=dword:00000001

HKLM\SYSTEM\CurrentControlSet\Services\Lanmanserver\Parameters
"MaxWorkItems"=dword:00008192 (dec)
"MaxMpxCt"=dword:00002048 (dec)
"MaxRawWorkItems"=dword:00000512 (dec)
"MaxFreeConnections"=dword:00000100 (dec)
"MinFreeConnections"=dword:00000032 (dec)

 File Sharing in a Microsoft Environment is based on an application protocol called Server Message Block (SMB).  When a device connects to a Microsoft file share on another computer it is acting as an SMB client.

By default the SMB 1.0 Client network redirector can have only 50 outstanding SMB requests/commands open to a single file server.  This is controlled by the MaxCmds registry value. 

All connections to remote servers are per computer not per user. This means all users on a Terminal Server open files over the same SMB session.  A single SMB Client Session can only have 16383 open files. This is controlled by the MultiUserEnabled registry value.

When you map a drive to a UNC path and have Windows  explorer open to the network drive, Explorer submits an always open SMB command to request notification when a file changes anywhere on the network drive. These are called SMB Change Notify events.  In order to reduce network traffic, resource utilization and SMB commands and to overcome a potential screen flicker issue for certain file sharing scenarios, the policy for NoRemoteRecursiveEvents should be

enabled.  This Prevents change notifications from being sent for anything other than the root folder.

Note: Further information can be found within  this blog.

 SMB 2.x Client Tuning HKLM\System\CurrentControlSet\Services\LanmanWorkstation\Parameters
 “DisableBandwidthThrottling"=dword:00000001
 “DisableLargeMtu”=dword:00000000

HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer
NoRemoteRecursiveEvents”=dword:00000001

 By default, the SMB redirector throttles throughput across high-latency network connections in some cases to avoid network-related timeouts. Setting the DisableBandwidthThrottling registry value to 1 disables this throttling, enabling higher file transfer throughput over high-latency network connections.

By default, the SMB redirector does not transfer payloads larger than approximately 64 KB per request. Setting the DisableLargeMtu registry value to 0 enables larger request sizes, which can improve file transfer speed.

Note: Further information can be found within  this blog.

Provisioning Services based servers

The next set of registry changes are recommended for images deployed using standard mode vDisk images with Citrix Provisioning services. Standard mode images are unique in that they are restored to the original state at each reboot, deleting any newly written or modified data. In this scenario, certain processes are no longer efficient. These configurations may also apply when deploying persistent images and in many cases should be implemented in addition to the changes recommended in the preceding section.


 Configuration Recommendation / Registry Key Justification
 Disable Clear Page File at Shutdown HKLM\SYSTEM\CurrentControlSet\Control\SessionManager\Memory Management]
"ClearPageFileAtShutdown"=dword:00000000
 Clearing the Windows Pagefile at shutdown can delay the shutdown procedure and therefore increase the time required for a complete reboot cycle.
 Disable Offline Files HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\NetCache
"Enabled"=dword:00000000
 The offline file feature is not required for XenApp scenarios.
 Disable Background Defragmentation HKLM\SOFTWARE\Microsoft\Dfrg\BootOptimizeFunction
"Enable"="N"
 Defragmentation is not necessary for Provisioning Services vDisks.
 Disable Background Layout Service HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\OptimalLayout
"EnableAutoLayout"=dword:00000000
 The Layout Service is responsible for rearranging files on the hard drive to increase performance. This does not apply to Provisioning Services vDisks.
 Disable Hibernation HKLM\SYSTEM\CurrentControlSet\Control\SessionManager\Power
"Heuristics"=hex:05,00,00,00,00,01,00,00,00,00,00,00,00,00,00,00,3f,42,0f,00
 Hibernation is not required for XenApp scenarios.
 Disable Mach. Acct. Password Changes HKLM\SYSTEM\CurrentControlSet\Services\Netlogon\Parameters
"DisablePasswordChange"=dword:00000001
 Disabling the automatic machine account password change is required for the Active Directory integration of Provisioning Services Target Devices.
 

Redirect Event Logs

 HKLM\SYSTEM\CurrentControlSet\Services\Eventlog\Application
"File"="D:\EventLogs\Application.evtx"

HKLM\SYSTEM\CurrentControlSet\Services\Eventlog\Security
"File"="D:\EventLogs\Security.evtx"

HKLM\SYSTEM\CurrentControlSet\Services\Eventlog\System
"File"="D:\EventLogs\System.evtx"

 Redirecting Windows Eventlogs to a persistent drive (such as D:\) eases troubleshooting and satisfies certain security monitoring requirements.
 Increase Service Startup Timeout HKLM\SYSTEM\CurrentControlSet\Control
"ServicesPipeTimeout"=dword:00600000(dec)
 In certain peak load scenarios Windows services might take longer than 30 seconds to start. This setting increases the timeout value to 10 minutes.
 Scheduled Defrag Disable the scheduled defragmentation of the hard disks.
Task Scheduler - Defrag à ScheduledDefrag
 Defragmenting the vDisks from a standard target device is not possible (disk is mapped read only), but can significantly increase to load on the PVS Server as well as the write cache.

Note: With Provisioning Services 6.0 and above it is no longer necessary or recommended to disable the Large Send Offload and TCP/IP Offload features.

 

* The Optimizer column indicates whether this registry change is included in the XenConvert Optimizer tool that is installed with the Provisioning Services target device software.


Services


Windows Server 2008 R2 includes a set of services, many of which are enabled as default. When using the system as Citrix XenApp server, some of these services provide little value increases but significantly increase the memory footprint of the OS. Therefore the following services could potentially be disabled.


 

 Service Recommendation Justification
 Desktop 
 Windows

 Manager Session
 Manager 
 Potential This service is responsible for Windows 7 Aero theme. Organizations need to determine if Aero theme is something they wish to support at a later date
 Network List 
 Service




 Network
 Location
 Awareness 
 Disable







Disable
 The network location of a XenApp Server is unlikely to change over time. Thus automatic network location detection is not required.

 
Please note that some 3rd party software products, such as the AppSense User Virtualization Platform, may require these services.

 Note: Disabling these services may cause an initial delay of 15 seconds when visiting a HTTPs web site.
 Themes Potential Allows users to manage the themes, which includes backgrounds, sounds and visual effects. Although this service does take resources and will impact overall scalability, each organization needs to determine if this functionality should be supported. It does allow the user to better personalize the environment and helps improve acceptance.
 Windows Defender  Disable Most enterprise deployments will have their own anti-malware solutions. As the corporate version will most likely be used, the integrated service should be disabled. 
 Windows Update Potential For XenApp servers based on a Provisioning Services vDisk or in case an Enterprise Software Deployment Systems is used to deploy Windows hotfixes, the Windows Update Service is not required.

File Servers

The following registry changes are recommended for all Windows File Server deployment scenarios in order to enable the XenApp Server side
SMB tuning parameters:

 Configuration Recommendation / Registry Key Justification
 SMB 1.0 Tuning
Note: Tuning SMB 1.0 is required in mixed (2003 / 2008 R2) environments, where SMB 2.0 cannot be used. 
 HKLM\SYSTEM\CurrentControlSet\Services\Lanmanserver\Parameters

"MaxWorkItems"=dword:00008192 (dec)

"MaxMpxCt"=dword:00002048 (dec)

"MaxRawWorkItems"=dword:00000512 (dec)

"MaxFreeConnections"=dword:00000100 (dec)

"MinFreeConnections"=dword:00000032 (dec) 

 File Sharing in a Microsoft Environment is based on an application protocol called Server Message Block (SMB). 

When a device connects to a Microsoft file share on another computer it is acting as an SMB client.

The SMB client interacts with the network redirector, which is responsible for sending file requests to the proper location (local file system, CIFS/SMB, Netware, CDM, etc¼). The client sends SMB commands to the server for execution. These commands include requests to read, write or delete files and folders as well as commands to list directories and subscribe to change events (such as when someone else creates a new file and it automatically appears in your Explorer window). 

By default the SMB or CIFS service on the file server only allows 50 outstanding SMB requests/commands open from a single client at any given time. This is controlled by the MaxMpxCt registry value (by default, does not exist).

 SMB 2.x Tuning HKLM\System\CurrentControlSet\Services\LanmanServer\Parameters

"TreatHostAsStableStorage"=dword:00000001

"MaxThreadsPerQueue"=dword:00000064 (dec)


 HKLM\System\CurrentControlSet\Control\SessionManager\Executive

"AdditionalCiticalWorkerThreads"=dword:00000064 (dec)
 The "TreatHostAsStableStorage" key controls the processing of write flush commands from clients. Disabling this functionality can improve client responsiveness. 

The "MaxThreadsPerQueue" and 
"AdditionalCiticalWorkerThreads" keys control the number of threads allocated to file I/O requests. These are the values recommended by Microsoft for file servers with sufficient processing capabilities.

Refer to  http://download.microsoft.com/download/3/2/A/32A
70368-1457-4972-8CDD-08A496198361/Perf-tun-srv- R2.docx for additional information.


User Settings

 

Unlike machine settings, user settings must be applied to each user and typically cannot be applied as part of the base image. In addition, user settings typically do not depend on whether the image is deployed in private or standard mode; however, the method in which the settings should be applied can be influenced by the image mode. None of the configurations in this section are included in the XenConvert Optimizer tool. These factors make user settings more difficult to implement.

As a recommended approach for the application of the user settings is to utilize group policy settings and/or preferences, as they provide administrators a central site for configuration and allow for greater customization based on the desktop. 

Recommended Configurations - Windows specific
The following registry changes and Group Policy based modifications should be evaluated for all deployment scenarios and would almost always be desirable in a XenApp hosted shared desktop implementation. As some of the settings will significantly impact the personalization capabilities for users it is highly recommended to perform user acceptance testing (in addition of general functionality testing) prior to production rollout.
Note: Windows Group Policy Preferences are a very elegant way of applying registry changes. 

 Configuration Recommendation Justification
Internet Explorer - ForceOffscreen Composition  HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main

"Force Offscreen Composition"=dword:00000001 

 Overcomes a potential screen flicker issue for certain websites.

Note:
This setting applies to IE8 and earlier only
 Disable Recycle Bin  User Configuration - Administrative Templates - Windows Components - Windows Explorer
Do not move deleted files to the Recycle Bin: Enabled
 As the Recycle Bin is part of the user profile in Windows 2008 R2 it should be disabled in roaming profile scenarios, to prevent profile bloat.
 Reduce Menu Show Delay  HKEY_CURRENT_USER\Control Panel\Desktop
"MenuShowDelay"="150" 
 Reduces the delay Windows sets for menus. Provides better user experience. 
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
"VisualFXSetting"=dword:00000003

HKEY_CURRENT_USER\ControlPanel\Desktop\WindowMetrics
"MinAnimate"="0"

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced "ListviewAlphaSelect"=dword:00000000 "TaskbarAnimations"=dword:00000000 "ListviewWatermark"=dword:00000000
"ListviewShadow"=dword:00000000

HKEY_CURRENT_USER\Control Panel\Desktop
"FontSmoothing"="0"
"UserPreferencesMask"=binary:90,12,01,80 ,10,00,00,00 

 Provides a better user experience. 

Note: The UserPreferenceMask changes based on the settings selected in the System Properties - Performance Options configuration page. 

 Disable Screen Saver  User Configuration - Administrative Templates - Control Panel - Personalization
Enable Screen Saver: Disable
 Running a server side screen saver consumes resources on the XenApp servers. In case a screen saver is required, running it locally on the end point device would be a better option.
 Documents History User Configuration - Administrative Templates - Start Menu and Taskbar
Do not keep history of recently opened documents: Enable
Remove Balloon Tips on Start Menu items: Enable
Remove frequent program list from Start Menu: Enable
 Minimize the effect on CPU usage when you are running many XenApp sessions and to improve user logon times. 
 Auto End TasksHKCU\Control Panel\Desktop
"AutoEndTasks"=REG_SZ = "1"
"WaittoKillAppTimeout"=REG_SZ= "20000"
Sometimes an application will hang or become unresponsive. This often happens when closing applications or logging off.
The system will often present a dialog that asks the user to "Wait" or "End Task."
This dialog can be suppressed and the "End Task" automatically selected for the user. 
 Background Spell Checking  Disable using Group Policy Background spell and grammar checking can cause significant CPU load.
 Sound Scheme Disable Windows Logon / Logoff notification sounds 

HKCU\AppEvents\Schemes\Apps\.Default\WindowsLogon\.Current 

"(Default)"=REG_SZ="" 

HKCU\AppEvents\Schemes\Apps\.Default\WindowsLogoff\.Current 

"(Default)"=REG_SZ=""

 Playing a sound notification upon every logon/logoff increases the bandwidth consumption and can also increase the logon/logoff times.

Note: It might be desirable to disable further sounds.






















1-3 of 3