Technology in terms you understand. Sign up for the Confident Computing newsletter for weekly solutions to make your life easier. Click here and get The Ask Leo! Guide to Staying Safe on the Internet — FREE Edition as my thank you for subscribing!

Why Programs Might Use All the Memory in Your Computer

The good, the bad, and the ugly.

Programs typically don't use all available memory unless they need it or they have a problem.
A PC computer screen showing a memory usage graph. The graph depicts memory usage rising steadily from left to right, with the lines or bars shooting upwards dramatically as they reach the far right side of the screen. The graph is shown exploding out of the top on the right, with bits of data or visual elements breaking through the top boundary.
(Image: DALL-E 3)
Question: Is it true that the more memory your computer has, the more memory some programs use? I’ve read several forums where people mention that they have multiple gigabytes of memory and that Firefox, Quicken, or some other program is using over half of it. They call those programs memory hogs and say their computers slow down. I never see that myself; for example, I run Firefox, and it never uses that much memory.

By memory, of course, I assume you mean RAM. (“Memory” doesn’t mean disk space.)

Normally, programs don’t expand to fill all available memory. They use what they need regardless of how much your computer has. Therein lies the source of most memory-related slowdowns.

There is an argument that one (and only one) program might benefit from using all RAM, but only after all other active programs have had their share. I’ll discuss that one program in a moment.

There are lots of reasons you might want multiple gigabytes of memory, but it shouldn’t be for something as simple as Firefox. I agree that someone’s a memory hog in that situation, but it might not be Firefox.

Your experience — everything working fine with relatively low memory usage — is much more common.

Become a Patron of Ask Leo! and go ad-free!

TL;DR:

Why a program might use all memory

Having more RAM doesn’t necessarily cause programs to use more RAM. Well-behaved programs only use what they need. Memory issues arise from running too many programs at the same time or from memory leaks. When RAM is fully utilized, Windows uses virtual memory, which can slow your system down.

Running applications sorted by memory usage in Task manager.
Running applications sorted by memory usage in Task Manager. Click for larger image. (Screenshot: askleo.com)

How good programs use memory

A well-written program doesn’t pay much attention to available memory. Instead, it uses the memory it needs and no more. It also releases memory for use by other programs when it’s no longer needed. That’s an oversimplified definition of a program that’s a good citizen.

If a good citizen program uses a lot of memory, there’s a reason, and most times, the reason is performance. Games are a good example. If written properly, a game can keep information in memory for significantly faster access than if it had to read that information from disk.

Other programs can take advantage of additional memory in the same way. Database programs like Quicken are a good example. A large Quicken database can use a lot of memory.

How Windows handles memory

Most operating systems allow programs to request and use more RAM than is present.

For example, a program can request eight gigabytes of memory from Windows, and Windows could grant that request even on a system that has less than 8GB of memory available, or even less than 8GB of memory installed.

How is that possible? The program doesn’t have direct access to RAM that doesn’t exist. Instead, Windows notices when a program tries to use non-existent memory. Windows shuffles things around, moving some of what’s in RAM to disk and reading back from disk some of what used to be in RAM. This whole (very complicated) process is what’s called virtual memory — using space on the hard disk to make it function like there is more RAM than there is.

The problem with virtual memory is that disks are slow. No matter what type of disk you have, it’s always going to be slower than RAM. If your computer runs out of RAM because programs are requesting more RAM than exists, the system will get slower as Windows reads and writes virtual memory to and from the disk. In the worst case, this can bring the system to a near standstill as it enters a state called thrashing.

Let’s look at three scenarios that can cause your system to thrash.

Reason 1: A program accidentally uses all available memory

The most common case of an application using too much memory is called a memory leak.

Recall that I said a good citizen program frees memory for use by other programs when it’s no longer needed. A memory leak happens when a program loses track of the memory it’s used and neglects to free it for use by others. It’s a bug in the program.

In the cases you’ve heard about, I don’t suspect Firefox. While it could have a bug, as far as I know, it’s well-behaved of late. More likely is that one of the add-ons or extensions installed has a problem, or even worse, malware of some sort is present. Unfortunately, browser add-ons are a common source of bugs and memory issues, as is malware.

Windows tries to manage memory leaks. If a program isn’t using all the memory it requested, Windows might swap the contents of unused RAM into virtual memory in the paging file on disk to free it for use by other applications. However, since there’s a maximum size limit for the paging file, this just delays the problem until the paging file fills up.

Even before the programs use up all of the virtual memory, however, a memory leak or other high-memory use scenario could cause your system to run more slowly.

Reason 2: You might cause all available memory to be used

Programs themselves aren’t the only culprits of using too much RAM.

It could be you.

The #1 reason that well-behaved software ends up using all available memory is pretty simple. Either:

  • You’re trying to run too many programs at once, or
  • You’re trying to do too much with the program(s) you’re running.

The first one is pretty self-explanatory: if you run several programs simultaneously, they all need some RAM. If the total RAM requested is more than you have installed, Windows could move to using virtual memory, slowing down your system.

The solution is simple: when you’re done with a program, exit it. When a program exits, it releases all the memory it had in use.

The second situation is a little less obvious. Since web browsers are a common cause, I’ll use Firefox as an example.

How many tabs do you keep open? As I type this, my browser has 11 tabs open, each to a different webpage. Each tab causes the browser to use more memory. If you open enough tabs, your computer will eventually run out of RAM and start using virtual memory.

Not only browsers operate this way. Almost any significant program varies its need for RAM based on what you do. Opening multiple documents in a word processing program or multiple photos in a photo editor, and even the size of the files you’re working with, affect a program’s need for RAM.

Reason 3: Your installed programs might cause all available memory to be used

We’ve seen that running too many programs can cause all of your computer’s RAM to be used. Unfortunately, there’s a good chance you’re already running more programs than you think you are.

Many programs — many, many programs — install auto-start items. These are (theoretically) small programs set up to run automatically when you boot your computer or when you log in. If there are many of these, each with its own requirement for some amount of RAM, they could affect the amount of RAM “left over” for the programs you choose to run yourself.

Now, auto-start programs aren’t inherently bad. Much of Windows itself is, in essence, an auto-start program, and many of its features are implemented as programs and services that start automatically. That’s as it should be.

Many programs require some auto-start component and thus some ongoing RAM usage. Programs like anti-malware tools, software firewalls, OneDrive, Dropbox, and others all provide important functionality that relies on running in the background at all times.

However, some programs install what many feel are unnecessary components that auto-start. They use resources like RAM for no real benefit. Unfortunately, there’s no list I can give you of what’s safe to remove from your auto-start folder; it depends on the programs you use and how you use them. What’s a waste of resources for one person might be a valuable feature for someone else.

The one program that might legitimately always use all RAM

I haven’t seen this in practice, but I know it’s true for some operating systems.

Let’s say you have 16GB of RAM, and as you run your system, only 8GB is being used. That means the other 8GB is sitting there available and unused.

The operating system could put it to use. It might use it for file and program caching or other internal operations. But it’s possible that by putting unused RAM to use, the operating system could make better use of all resources to operate more quickly and efficiently.

If it’s available, why not use it for something productive?

So theoretically, the operating system could use all available RAM — as long as it knows to step aside when a running program needs some.

More RAM is almost always better

So why would you want more memory than the programs you use require?

There are a couple of reasons.

Windows uses memory to better handle its operations, such as reading and writing files to disk. In fact, adding memory to a slow system is one of the best ways to improve Windows’ performance.

Windows is a multi-tasking operating system, and as we’ve seen, you can run more than one program at a time. As I write this, I have several programs running, including my browser (with several tabs open), a text editor, a music player, two virtual machines running other copies of Windows, and a few other things. Process Explorer tells me I have 424 processes running right now that are using 48GB of RAM1.

The more memory there is, the less impact all these running programs have on each other’s performance.

Do this

Watch your memory usage. Task Manager and tools like Process Explorer can tell you not only how much is used but which programs are using it.

And, if it makes sense, consider adding more RAM to your system. As I like to tell people, “Windows loves RAM.” Smile

Subscribe to Confident Computing! Less frustration and more confidence, solutions, answers, and tips in your inbox every week.

Podcast audio

Play

Footnotes & References

1: I have a busy system.

12 comments on “Why Programs Might Use All the Memory in Your Computer”

  1. Hi Leo,
    I have only had memory issues since upgrading from Win8 to 8.1
    My machine has 12Gb of RAM but when it is left idle with only background processes running I will get a low memory warning telling me to close apps. When I check in Task Manager it shows only about 12% of memory usage. I simply close the low memory warning window and have never noticed any ill effects. Oddly it only happens when the machine has been idle for a while and not when I am using it. I never had this issue when this same machine, with the same set up and apps, was running Win8.
    Checking on the net indicates that others are having similar issues after upgrading to Win8.1
    Is there anything that you think I should do to eradicate the problem or should I just ignore it as it doesn’t seem to cause any issues ?

    Reply
  2. Leo, I have to disagree with your statement:
    “A well-written program doesn’t actually pay attention to available memory.”

    A well-written program will use only as much memory as it needs. A very-well-written program will adapt itself to the environment (either completely automatically, or within configured limits/guidance) and use more resources if available to improve performance. One example from programs I use is something like PTgui (panorama photo-stitching software) — when rendering the software has to use many many temporary files (many gigabytes, even terabytes) and it can do either disk-based or RAM-based temp files. And no, it’s not the same thing as using disk as a swap file. Performance would be horrendous for the software to only use <1GB of RAM and thrash my disk, but it is aware of how much RAM my system has (64GB) and takes full advantage of the available memory.

    Reply
  3. the problem i am seeing with browser tab is when you have several tabs open then close the extra tabs the processes con tinue still using ram at this moment i have opera open and had 7 tabs i closed all but one but task manager shows all 7 still open

    Reply
  4. What about the case of WmiPrvSE which is hogging about half of my 4GB Win7 64-bit available memory? I can’t find any help articles that tell why or how this &$%*(* thing works or does its dirty deeds. This, I am told, is a Microsoft program, and it’s necessary to keep it running. What??? Who makes the rules about good computing and then breaks them: Microsoft.

    Reply
  5. Leo, is this true (and/or safe)?
    I’m told to open MSCONFIG, disable the entire START-UP tab list (not SERVICES), then re-boot. Supposedly the computer then by default will load only the basics needed to start, thus ignoring self-starting superfluous RAM hogs. Yea or nay?

    Reply
  6. Leo: you missed one thing – *How* to tell your users to show much memory is being used! There is, of course, the tried and true Task Manager (right-click on taskbar, select Task Manager) in which the Processes tab will show how RAM much each program is taking. Although the Task Manager has been much improved in Windows 8, I prefer the “Resource Monitor” which not only shows current RAM usage, but also CPU, Network and Disk. An article on how to best use the Resource Monitor may be in order.
    -bb

    Reply
  7. Just wanted to point out the comically obvious. The picture shows 30-pin SIMM chips. In 2015, THAT may be your memory issue. ;-P

    Seriously though, thanks for what you do, Leo. Your wisdom and your ability to communicate it to the masses are a great asset to the interwebs. Thanks for sharing it and keep up the good work!

    –Gabe

    Reply
  8. A major culprit, as the article mentions is browser tabs. While reading this article, I checked the Task Manager and my Opera browser with 12 tabs was using 1.6 GB and Firefox with 4 tabs was using 1 GB. That’s not a problem as thos pluse a few other processors only used a littl over half my RAM, but if I only had 4 GB, it would have started using Virtual (Hard disk) memory. So, one of the first things to do when you run out of memory, is to close browser tabs and open files you aren’t using such as documents, photos, and media.
    For the few times I exceed RAM, an SSD system drive and there’s no slowdown if Virtual Memory is occasionally used.

    Reply

Leave a reply:

Before commenting please:

  • Read the article.
  • Comment on the article.
  • No personal information.
  • No spam.

Comments violating those rules will be removed. Comments that don't add value will be removed, including off-topic or content-free comments, or comments that look even a little bit like spam. All comments containing links and certain keywords will be moderated before publication.

I want comments to be valuable for everyone, including those who come later and take the time to read.