Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Tackling Slow Computer Shutdowns

Question : My problem is when the time comes to Shut down or restart my PC - it takes about two to three minutes to shut down or restart. Please help.

Answer : Slow shutdowns can be due to various reasons. The main reason for slow shutdowns is page file clearing. This is especially indicated if the hard disk light goes on and stays on while the operating system (OS) is shutting down.

The page file is a file on the hard disk that's used as virtual memory. Virtual memory augments the random access memory on the system board. Since the page file may contain sensitive information, many OSes can be set to clear the page file when it (the OS) shuts down.

Many Web sites state this improves the security posture of an OS. They're not wrong in this, except that saying this improves the security posture of an OS is a little like saying installing 12 locks and a biometric identification system with voice analysis improves the security posture of a house.

Page file compromise is very low risk because there are many other ways to attempt to compromise the security and integrity of an OS, many of which would be easier and have better yield rates. Because of this, this option is not recommended for all but the most secure environments.

In Windows, this option is controlled by a registry entry. The registry entry in question is "ClearPageFile-AtShutdown". This key is usually located in the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management section of the registry.

To attempt to turn off page file clearing, start (run) the program regedt32.exe and navigate to the HKEY_ LOCAL _MACHINE\SYSTEM\ CurrentControlSet\ Control \ Session Manager\Memory Management section. On the right pane, check if the entry "ClearPageFileAtShutdown" is visible. If it is, right-click on it and select Modify from the pop-up menu. When the EDIT DWORD window pops up, type "0" in the box under Value Data and click on the OK button. After the PC restarts, the next shutdown should take a little less time.

Another possibility is that there are programs or services that take some time to shut down. In general, it is not advisable to have too many services or programs running in the background because all these will have to be terminated before the OS can shut down gracefully.

To test for this, try closing all open programs and manually shutting down all background applications (including all firewall/anti-virus software) just before shutting down the OS.

Most background applications can be shut down by right-clicking on the icon in the taskbar and selecting Exit or some similar option. If it shuts down faster after all the background applications have been shut down, it's possible that there are one or more background applications that take a long time to shut down. If this is the case, not much can be done other than shutting down the offending application or finding a way to configure the parent program so it doesn't load a background application when it starts.

The offending application can be identified by looking through the event logs (Start --> Control Panel --> Administrative Tools --> Event Viewer). If nothing looks amiss, it can also be identified in this manner: First, shutdown a background application and then shut down the OS. Not the shutdown time. On the next restart, shut down another background application and note the shutdown time. This should be repeated for every application that runs in the background. If at any time the shutdown time improves after a background application is shut down, the same application becomes a prime suspect in the "slow shutdown time" issue.

It's also possible to decrease shutdown time by decreasing the time Windows waits for hung and slow applications to shut down.

To change this time, open the registry editor (regedt32) and navigate to the HKLM\SYSTEM\CurrentControlSet\Control section. From here, right-click on "WaitToKillServiceTimeout" and select Modify. In the box under ValueData, enter the time (in millisecond) the OS should wait until it summarily kills the service. The default value is 20,000 (20,000 milliseconds or 20 seconds).

Other settings that can be added here include "Hung-AppTimeout" and "Auto-EndTasks".

HungAppTimeout controls the amount of time the OS should wait before killing a hung or frozen application. AutoEndTasks tells the OS when to end hung applications automatically, or display the End Tasks dialogue. To add any of the two settings, right-click on the right pane and select New --> String Value. Enter the name of the setting (HungApp-Timeout or AutoEndTasks as appropriate). Next, right-click on the added setting, select Modify and enter an appropriate value.

For HungAppTimeout, an appropriate value is the amount (in millisecond) that the OS should wait before terminating an application. Suitable values for AutoEndTasks include "0" and "1 ", with "0" meaning "end hung applications automatically, do not show End Tasks dialogue" and "I" meaning "show End Tasks dialogue when the shutdown time exceeds the value stated in HungAppTimeout".

If using Internet Explorer, ensuring that the browser clears the Temporary Internet Files folder every time it shuts down (Tools --> Internet Options --> Advanced --> Empty Temporary Internet Files folder when browser is closed) and defragmenting the hard disk drive may result in faster shutdown times.



This post first appeared on Doctor Computer, please read the originial post: here

Share the post

Tackling Slow Computer Shutdowns

×

Subscribe to Doctor Computer

Get updates delivered right to your inbox!

Thank you for your subscription

×