Thursday, July 24, 2008

Windows 2k/XP Tweaks

General Windows 2000/2003 Server/XP Tweaks and tips.


This article provides some general tweaking information relevant to Windows XP, Windows 2000 and Windows 2003 Server. If you're looking for broadband-specific information, please visit the broadband section of the site.


Turn off Indexing Service


Indexing Service creates indexes of the contents and properties of all files on local and network drives in order to increase file searching speed. It's quite similar to "Find Fast" that ships with Microsoft Office. Indexing Service runs continuously and can slow down your PC's general performance because it has to index files continuously. If you don't need slightly faster file searches, the feature can be safely turned off. Note: Indexing Service is turned on by default for all NTFS partitions.


Turning this service off to increase overall performance: Open My Computer -> right-click on a Drive icon -> Select Properties -> Remove the checkmark from "Allow Indexing Service to index this disk for fast file searching" -> Click Apply. Make sure to select "Apply changes to :\, subfolders and files."  before clicking OK in the new window.


Alternatively, you can navigate to: Control Panel -> Administrative Tools -> Services -> Disable Indexing Services.


Disable Paging Of Core Files


You can improve Core System Performance in Windows NT/2k/2k3 on systems with large amount of RAM, by forcing the core Windows system files to be kept in memory and not paged to disk.


To appply this tweak, open the Registry and edit the value in the key below.


HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management


To enable: DisablePagingExecutive=dword:00000001   (Data Type: REG_DWORD, set to 1 to enable tweak and stop core processes from being paged to disk)
To disable: DisablePagingExecutive=dword:00000000   (Data Type: REG_DWORD, set to 0 to disable tweak, this is the Windows default setting)


Note: In Windows 2000, there is a bug with enabling this tweak, you might need to update to the latest Service Pack, or install the hotfix described by MS here: MS KB Article 32605


Disable unnecessary Services


Services are programs that start with Windows and continuously run in the background, helping the OS with different functionality. Not all services that load by default are needed, you can disable some to free some resources and speed up your system in general. You should go through the list and read the descriptions to decide which services you need depending on what you use your computer for...  You can always turn the service back on if and when you find need for it. Here is the procedure to turn off a service:


1.  Navigate to: Start -> Programs -> Administrative Tools -> Services.
Alternatively, you can do START -> Run ->  and type services.msc


2. Left-click on a service and read its' description carefully. Turning off services disables some particular functionality of the OS, so make sure you want to turn the particular service off.


3. To disable, Right-click -> Properties -> Change the "Startup Type" to "Manual" and Stop the service. Next time you reboot that particular service won't start.


Some Sample Services that can safely be turned off in most Home PCs:


Automatic Updates
Computer Browser
Error Reporting Service
Help and Support
Indexing Service
Messenger (pop-up spam vulnerability)
NetMeeting Remote Desktop Sharing
Performance Logs and Alerts
Protected storage (stores passwords and enables ato-complete)
Remote Registry (remote access to your registry)
Routing and Remote Access (enables dial-in routing to your computer)
Secondary Logon
Task Scheduler
...


Notes:
To disable services, just stop them, and set them to "Manual". Check the Event Log for errors after rebooting.
For additional information on all services, and what they do, check: http://www.blkviper.com/WinXP/service411.htm


Temporary Administrative Permissions


Many programs require administrative rights to be able to install. Here is an easy way to temporarily assign yourself Administrative permissions while you remain logged in as a normal user:


1. Hold down the Shift key (might not be necessary on Win2k3) and right-click on the program, or the setup file.
2. Click "Run as"
3. Type in a username and password that have Administrative permissions.

Note: This will also work for applications in the Start menu.


Optimize the Pagefile


If you have more than one hard drive, it is a good idea to put your pagefile on the non-windows drives. Also, it is not a bad idea to set the pagefile to a constant size (1 to 2 times the available RAM), so it wont get fragmented.


Right-click on My Computer -> select Properties -> the Advanced tab -> Performance, Settings button ->  Advanced tab, Virtual memory, Change button -> choose the drives and size available for pagefile(s).


I usually use a non-windows drive, and same Initial/Maximum size to avoid fragmentation of the pagefile. Another method to avoid fragmentation is to clear the pagefile on shutdown, by changing the following Registry setting:


HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\
"ClearPageFileAtShutdown=1"
  (1 clears the pagefile at shutdown, 0 is the Windows default).


Related Resources:
MSKB 314834 (Windows XP)
MSKB 182086 (Windows 2000)


Fix Windows Explorer Slowdowns


Sometimes Windows Explorer can slow down to a crawl, here are a couple of tips to reclaim your resources:


1. Possible WIA and USB device issues, here is the solution: http://support.microsoft.com/default.aspx?scid=kb;en-us;819017


2. Media files causing slowdowns, such as large number, and/or corrupt AVI files. Any Explorer operaion can lead to very high CPU usage and a seeming lockup of your computer. To resolve the issue:
Start > Run > type: Regedit
Navigate to:
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{87D62D94-71B3-4b9a-9489-5FE6850DC73E}
And delete this key:
InProcServer32
Then unload the dynamic library with the following:
Start > Run > type: regsvr32 /u shmedia.dll


If you're running XP, you might also want to check this: http://support.microsoft.com/default.aspx?scid=kb;en-us;822430


3. Reduce Shell Overhead: http://support.microsoft.com/default.aspx?scid=kb;en-us;819101


4. Apply the LAN browsing tweak if you're on a network (and not using Netware):
Start > Run > type: Regedit
Navigate to:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Current Version\Explorer\RemoteComputer\NameSpace
Delete this key:
{D6277990-4C6A-11CF-8D87-00AA0060F5BF}
 


Improve NTFS Performance


You can improve NTFS performance by stopping it from generating timestamps every time directories are accessed, and if you're feeling a bit more adventurous, by preventing NTFS from generating MS-DOS compatible filenames for all files with long filenames. Here are the two registry keys that you can modify:


HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\FileSystem
"NtfsDisableLastAccessUpdate"=dword:00000001
"NtfsDisable8dot3NameCreation"=dword:00000001


Note: Applying the second line above (disabling truncated filename creation) might cause problems with some 16-bit applications. To resolve this, simply set the number back to "0"


Unload DLLs of Closed Applications


Windows does not always unload DLLS (Dynamic Link Libraries) used by programs from memory, even after the applications are closed. This default behavior causes more memory to be reserved for unused DLLs over time.  This tweak sets Windows to automatically unload DLLs for closed applications from RAM, which speeds up GUI operation by freeing unused memory and returning it to the system.


To fix this and unload unnecessary DLLs, navigate to:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\AlwaysUnloadDLL
and set the "Default" string to "1"


If the "AlwaysUnloadDLL" subkey does not exist, create it. To reverse the change, simply delete "AllwaysUnloadDLL". Alternatively, you can use the following registry files to apply/undo this tweak:
  sg_unload_dll.reg
  undo_sg_unload_dll.reg


Note: This tweak also works with Windows 9x. It is possible that unloading DLLs might cause some issues with some old 16-bit applications.

No comments: