2

My computer is running Windows XP and only has 1GB of RAM.

After launching some massive applications (like Eclipse and SQL Developer) the computer slows down considerably. The obvious symptom of this is the mouse pointer becomes less reponsive and it takes 1-2 seconds to reach the point I want it to be.

However, after I closed those applications, the computer is still slow and I need to reboot the computer to get it to be responsive again. Can't it reclaim the memory by itself?

1
  • 1
    It's Windows. This is what Windows does. Mar 30, 2012 at 18:19

5 Answers 5

1

I agree with the remark of Synetech about checking CPU usage more than memory usage.

BTW: An excellent article from Mark Russinovich about «The Memory-Optimization Hoax RAM optimizers make false promises»

http://www.windowsitpro.com/article/internals-and-architecture/the-memory-optimization-hoax

And now a suggested tool to know what's running in your PC and how much resources each process takes:

Process Explorer http://technet.microsoft.com/en-us/sysinternals/bb896653

[by the same Mark Russinovich...] ;-)

Hope this help. Let us know.

6

It is likely that your computer has not released the memory yet. You'll probably notice that there is a lot of disk activity while your machine swaps between the virtual memory and physical memory. It may take a while to release memory but one way to confirm it's released is by using Task Manager. Launch Task Manager and switch to the processes tab. You can sort by any of the columns there in ascending and descending order.

The one you want to look at is Memory, if you sort to show the processes using the most memory it will give you an idea which one is using up the memory. You can also use the View menu in Task Manager to Select Columns to display (eg. VM Size). If you see a process that is using a lot in the Mem Usage and VM Size then you can be reasonably confident this is what might be slowing down your machine. If it's not a critical service, you could terminate the process to see if this helps.

You can also look at a free tools liek RamRush which can forcibly clear memory that an application hasn't released after it has been closed.

7
  • 1
    Your answer, although very complete already, lacks a link to "Ram Rush". Can you please edit your answer to include the link the software's website? Also, welcome to SuperUser, if you haven't already, please check out the faq
    – wizlog
    Feb 10, 2012 at 2:53
  • 4
    I’d recommend looking at the CPU usage more than the RAM usage. Yes, the hard-drive is likely thrashing while the pagefile is swapped, but if the mouse cursor is that frozen, it is more likely the CPU is overloaded. Look a TaskManager and watch it for a while. When you exit heavy-duty apps on a system that can barely handle them, it may take (quite) a while for it to finish cleaning up and start idling. As for RAMRush, it looks like a typical RAM “optimizer” that simply allocates all system memory and then frees it. It may help in this case, but will probably just make it take longer.
    – Synetech
    Feb 10, 2012 at 3:05
  • @Synetech: You are right. RAM rush increases the amount of free memory, which is exactly the opposite of what he needs. His problem is triggered by large applications closing which creates, you guessed it, a large amount of free memory. (Why anyone would want more free memory, I have never figured out. Free memory has no effect on performance. Only memory that is being used can do you any good.) Feb 10, 2012 at 4:21
  • 1
    @David, like other “RAM optimizers”, it doesn’t actually free anything up. It simply allocates lots of memory (up to the amount installed in the system) for itself, which causes the OS to push everything else (that is possible) out to the pagefile (virtual memory). Then it frees the memory, leaving the physical RAM free, but because all the other memory already allocated to other programs is now on disk, it all has to start getting copied back to physical RAM. This means a lot more disk thrashing. I’m pretty sure this would not really help the OP, and probably make it take even longer.
    – Synetech
    Feb 10, 2012 at 4:55
  • @Synetech It does actually free something up -- all the memory it allocated. I think we're just disagreeing over terminology. I think we agree on the effects and the problem -- free memory is bad, since it doesn't hold the contents the computer needs to operate smoothly. Essentially, by running and terminating a large program, he has already done exactly what a RAM "optimizer" would do, and it caused the problem. Feb 10, 2012 at 5:08
2

Pagefile

Where is your pagefile?

I would recommend putting it on a dedicated volume to make it faster. Ideally, you would put it on a different physical drive from the one the OS is installed on (so long as it is less frequently used than the OS drive). If that is not possible, then at least put it in its own partition (as close to the start of the drive as possible) to ensure that it remains un-fragmented.

When you minimize or idle a program for a while, Windows pages its memory out to the swapfile on disk. When you close it, that memory has to be freed even if it is not in RAM (in which case, it has to be marked as free in the swapfile).

By optimizing the swapfile, when you close your memory-heavy programming apps, the OS will be able to page back in the memory from other programs in a much more reasonable amount of time.

Simply Busy

Failing that, patience is a virtue. (I have had plenty of times—eg encoding a video with the program set to real-time priority!—when the system was so bogged down by something that the mouse not only froze, but the keyboard even locked up such that the *-Lock LEDs would not change, and the internal speaker beeped. In most cases, unless it was a full-on crash-worth hang, waiting long enough would eventually fix it—assuming I had enough patience to wait.)

CPU

Like I said in my first comment. I would examine the CPU usage. While it is normal for the drive to thrash when memory is freed, it rarely causes the mouse to actually stutter. That is usually due to a high-priority process using a lot of CPU. Examine the Task Manager (or Process Explorer since it has a trace graph), to examine what process is using up the CPU to help narrow down the problem.

If the process that is spinning the CPU is the programming app’s (ie, the app is closed, but the process is still hanging around to finish cleaning up), then can use TaskMan (or ProcExp) to set it to low-priorty so that you can continue to use your system while waiting for it to finish.

Throttling

It also occurs to me that another thing that could be causing the issue is CPU throttling. After closing a large program like development environments, the system does a lot of clean up, so watch your CPU usage and temperature. Does it use a lot of cycles during the clean up process? Does the temperature go up? Perhaps the motherboard is configured to throttle the CPU once it reaches a certain temperature, thus causing the whole system to slow down, including the responsivenesses of the mouse cursor and keyboard.

1

The slowdown is caused by the squeezing of the system's caches. When applications require large amounts of memory, the system reduces the amount of memory allocated to "less important" uses such as the page cache. When the memory is freed, the page cache still doesn't have most of the pages the system needs, and they all have to fault in.

However, even in a worst-case situation, this should only take 30 seconds or so and realistically, it shouldn't take more than ten seconds. This is probably the time your mouse pointer is slow.

First, let me say that a "RAM optimizer" will make things worse. Your performance problems are caused by the cache size being small and RAM optimizers, by design, minimize the cache size.

The thing is, things should quickly return to normal once the page cache repopulates. So the question is, why is it still slow? The first thing to check is CPU usage -- does the CPU return to normal? The second thing to check is memory usage -- are there any processes using a much larger amount of memory than normal?

My bet is that it's a bug or leak. Those are the only things that would prevent the system from returning to normal afterwards.

0

In large part the problem is that the system hasn't yet cleaned up storage. You'll likely notice that the disk light is running steady, as the system tries to page out stuff.

Not entirely sure why this happens -- the freed storage shouldn't need to be paged out. But I suspect that a "feature" of Microsoft's virtual memory scheme has something to do with it.

2
  • It’s not the freed memory that needs to be paged. What happens is that the program needed so much memory, that the OS had to page out other programs. When the app was closed, the OS then has to page everything else back in.
    – Synetech
    Feb 10, 2012 at 4:57
  • 1
    Except that when the system gets in this situation it can take longer to recover than it does to boot up fresh. The system should block-transfer most of the code that's been paged out, so it will come in quickly, and that much data shouldn't be needed if nothing's running. Feb 10, 2012 at 12:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .