Ask Leo! by Leo A. Notenboom

How do I find out who's using all my memory?

Search First! Then browse: Categories | Full Archive | By Date | Newsletter

Home » Windows » Windows Performance

Summary: When your system starts to slow down a frequent culprit are programs using excessive memory. It's fairly easy to find out which programs they are.

When I am online for any length of time I start losing RAM, any thing I am doing online starts to slow down! I recently installed an extra 512MB of RAM but didn't seem to help much. The only thing that seems to help is to shut down AOL, wait about 5 minutes and restart. Then all is OK.

If you believe you're losing available memory, or RAM, there are some fairly easy ways to see who's eating it up. And yes, programs that use more memory than they should can easily contribute to a machine slowing down more and more the longer you use it.

The most common culprit is what's called a "memory leak". This is when a program running on your PC reserves some of your computer's memory for itself, and then loses track of it. The net effect is that the program loses the ability to release that memory for other programs to use.

And if a program has a memory leak in some operation that it performs regularly, it can slowly eat up more and more of your system's memory until there's little left for any other programs.

In practice the effects of memory leaks are often minimized by the way manages memory by swapping unused memory to disk in the paging or virtual memory file. And memory that has been lost to leakage, while technically "in use" can actually not be accessed since the program that asked for it has lost track of it.

However over time memory leaks can definitely impact system performance. Rebooting resolves it for a while, as does shutting down the program that has the leak. The question is how to identify that program?

We'll start by downloading my most recommended tool: Process Explorer.

Fire up process explorer and you should see something very much like this:

Process Explorer

You should see columns labeled Working Set and Virtual Size. If you do not, right click on any column header, click on Select Columns... and in the resulting dialog, click on the Process Memory tab:

Process Explorer Column Selection

Make sure that Virtual Size and Working Set Size are both checked and click OK.

Click on the column header labeled Working Set and all the running processes on your machine will be sorted by decreasing physical memory use. The programs using the most physical memory will be listed at the top:

Process Explorer sorted by Working Set

Here you can see that on my machine as I type this firefox.exe is using the most memory, followed by explorer (the Windows taskbar and UI), Process Explorer itself, and the rest of the programs running on my machine.

Keep this open and watch it as you use your computer. If you see one program that's continually using more and more memory, that could be a sign of a problem with that program.

Now repeat this process, but this time sort by Virtual Size:

Process Explorer sorted by Virtual Size

Virtual Size include all the memory allocated by each process, including that which has been swapped out to virtual memory or the paging file. As you can see, sorting by this typically results in a different order of programs. In my case one of the instances of svchost.exe has consumed the most virtual memory, followed by process explorer and Window's explorer.exe.

Once again, leave this running as you use your computer for a while and watch for programs that continually grow in their virtual memory allocation.

As your system performance degrades you may see one program with an excessively large physical or virtual memory allocation. What to do next will depend entirely on exactly what that program turns out to be, but at least you'll have identified the potential culprit.

Related:

Article C2985 - April 5, 2007

Helpful? Get new articles weekly by email in my FREE newsletter!

Your Name:
Your Email:


Why Subscribe?

Recent Comments
6 Comments

Thanks, you do an especially good job of making the steps easy to follow...here though, it might be helpful to state that the window may have to be made larger left to right size, in order to see the working set and virtual columns..thanks again for being there for your readers... Charlotte

Posted by: Charlotte Kimm at April 6, 2007 11:43 PM

The article and the Process Explorer tool were very helpful. However, when I viewed processes running on my system, there were 6 abstantiations of "svchost.exe" running. The collective total of the memory being used by these processes was very large. Is this normal?

Posted by: Ron Ledet at April 7, 2007 7:37 AM

Thanks Leo, another helpful tool and one that I will definitely be getting to grips with, you do a great job. May I point out with regard to the comment from Charlotte Kimm on 6 April, you can actually change the order of the columns. To do this, left click on the column header and, while holding down the mouse button, move the column header to the place you need it.

Posted by: Rob Caunt at April 8, 2007 6:58 AM

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ron: It's quite common to have more than one, and yes, sometimes they do use a
lot of memory.
http://ask-leo.com/what_is_svchost_and_why_is_there_more_than_one_copy_running.html

Leo
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)

iD8DBQFGGT2RCMEe9B/8oqERAqXuAJ0VapuqCVauqxTVnG8uolrZiLTKCACfRzCn
clTEGDE2abSFChRDpvLzAAE=
=vz+T
-----END PGP SIGNATURE-----

Posted by: Leo A. Notenboom at April 8, 2007 12:07 PM

thanks. but, now that I know one of my svchost.exe files is constantly hogging all my available memory, what do I do about it? It's gotten so bad that I sometimes have to reboot two or three times. it might take me up to a half hour before everything settles down and I can actually use my computer. How do I figure out why the svchost.exe file is killing me???

Posted by: Fred at May 13, 2007 8:09 AM

Fred,

There is an article on how to fix what you're experiencing, I hope that this will be helpful to you: http://ask-leo.com/how_do_i_fix_this_high_cpu_usage_svchost_virus_or_whatever_it_is.html

Posted by: Jenn at May 13, 2007 9:05 PM

Post a comment on "How do I find out who's using all my memory?":






(Email Address will not be published.)

Remember Me?

By popular demand...
my tip jar
Cuppa Joe
Buy Leo a Latte!

(you may use HTML tags for style)

RSS feed Subscribe to the RSS Feed specifically for comments on this article.

Before commenting, please...

Please wait. Your comment is being processed ...


Question? Ask Leo!