Tip

Speed up a program running in Windows

Brien M. Posey

How many times have you seen someone sitting at a computer and heard them utter the words, "Won't this @#$% thing run any faster?" Over the weekend, I found myself in that situation. I was running a brute force password crack for a friend that had been locked out of her computer. For those of you who aren't familiar with brute force cracks, they decipher passwords by using every possible combination of numbers and letters. Brute force cracks are notorious for taking a long time to complete. Anyway, after the crack had been running for a while, I remembered that there's a way to speed up a running program in Windows.

Each running program is made up of one or more processes. A process is a collection of executable threads. Since Windows is a multitasking operating system, Windows must determine how much processor time each thread receives.

Windows doesn't treat all threads or all processes equally. In fact, Windows

Requires Free Membership to View

grants a lot more processor time to some processes than others. For example, Windows grants a lot of processor time to the keyboard and mouse. Can you imagine what it would be like trying to use a computer if Windows polled only the keyboard and mouse for input once every few seconds? As painful as this experience sounds, this is exactly the way Windows treats most applications. Windows gives the applications relatively little processor time so that things like the keyboard, mouse and system services can run in the necessary manner.

When a developer writes an application, he can actually hard code the processor priority into the application. The processor priority refers to how much processor time the application receives. You can see a great example of such source code at http://support.microsoft.com/default.aspx?scid=kb;en-us;193846.

Although you must modify the individual application to change its priority, there's a way to change a process' priority on a temporary basis, without having to modify any source code. To do so, press CTRL+ALT+Delete and click the Task Manager button. When the Task Manager appears, select the Processes tab and select the process that corresponds to the application that you're trying to speed up. Now, right-click on the process and select the Set Priority option from the resulting shortcut menu. You now have some choices. You can set the priority at Real Time, High, Above Normal, Normal, Below Normal or Low.

Before you adjust a priority, there are a few things you must keep in mind. First, your machine has only so much processing power. Therefore, setting everything to a high priority isn't going to help you. You can, however, increase the priority for one or two processes and see a performance boost in those processes. If you want to get really creative, you can even lower the priority of less frequently used processes or terminate them completely. This will dedicate more processing power to higher priority processes.

The changes you make are temporary, so you can't really hurt anything by experimenting. Even so, I do have a few words of caution for you. Be very careful about using the Real Time and the Low priorities. The Real Time priority can dedicate so much processing power to one process that the system is unable to keep up and therefore malfunctions because key services are being neglected by the processor. Likewise, setting a critical service to the Low priority can have the same effect.

About the author:
Brien Posey, CEO of Posey Enterprises, is a freelance technical writer and has been working with computers for about 15 years. Before going freelance, Brien served as the Director of Information Systems for a large, nationwide healthcare company. He has also served as a network engineer/security consultant for the Department of Defense. You can access Brien's Web site, which contains hundreds of his articles and white papers, at www.brienposey.com.


This was first published in December 2002

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.