Article ID: 186628 - Last Review: November 1, 2006 - Revision: 1.3 Performance Tuning CPU Use for 16 and 32-bit Windows ApplicationsThis article was previously published under Q186628
IMPORTANT: This article contains information about editing the registry.
Before you edit the registry, make sure you understand how to restore it if
a problem occurs. For information about how to do this, view the "Restoring
Registry Key" Help topic in Regedit.exe or the "Restoring a Registry Key"
Help topic in Regedt32.exe.
On This PageSUMMARY
Windows 16-bit or 32-bit applications may use too much CPU time, even when
they are idle (no keyboard or mouse events). Terminal Server's registry can
be modified to detect this behavior, suspending application execution and
allowing other applications to use the CPU, making multitasking much more
efficient.
MORE INFORMATIONWARNING: Using Registry Editor incorrectly can cause serious problems that
may require you to reinstall your operating system. Microsoft cannot
guarantee that problems resulting from the incorrect use of Registry Editor
can be solved. Use Registry Editor at your own risk.
For information about how to edit the registry, view the "Changing Keys And Values" Help topic in Registry Editor (Regedit.exe) or the "Add and Delete Information in the Registry" and "Edit Registry Data" Help topics in Regedt32.exe. Note that you should back up the registry before you edit it. If you are running Windows NT, you should also update your Emergency Repair Disk (ERD). To modify the registry, perform the following steps:
Bad Application Registry ValuesThe default values for the bad application settings are:FirstCountMsgQPeeksSleepBadApp = 0xf MsgQBadAppSleepTimeInMillisec = 0x1 NthCountMsgQPeeksSleepBadApp = 0x5 Flags: 0x8 MsgQBadAppSleepTimeInMillisec is the number of milliseconds the application is suspended when Terminal Server has decided that it is ill-behaved. Increase this value to use less CPU time. If this value is zero, polling detection is disabled. NthCountMsgQPeeksSleepBadApp - After the application is determined to be "bad," this setting is the number of times the application must query the message queue before it is suspended again. Decrease this value to use less CPU time. Flags is set to a value corresponding to the type of Windows application. Valid values are: 0x4 for Win16 applications only 0x8 for Win32 applications only 0xC for either Win16 or Win32 applications Bad Application SettingsAll values are expressed in hexadecimal numbers. When changing the values, first click the Decimal button and input the decimal value. For instance, if you want the MsgQBadAppSleepTimeInMillisec value to be set to 200 milliseconds, perform the following steps:
| Article Translations
|
Back to the top
