Friday, February 1, 2019

memory - Unreasonable RAM usage in Windows 7



I have a fresh install of Windows 7, and my RAM in normal startup goes up to 2.5GB. I looked at Task Manager, and there's at least 1.5GB missing from there and in Resource Monitor as well. There's no indication of what's using that RAM. Can someone tell me how I can find out what's consuming my memory? I believe it's a virus, but none of the free antivirus programs tracked it down.



I added the pictures below. If this is normal usage of Windows 7 as some answers imply, then I don't get this at all.



P.S.
My Windows 8 Installation was running below 2.5GB, actually it was 1. something, until recently that I transferred some files from another computer which had the same problem that mine has now. I deleted Windows 8 and installed Windows 7, since I would do that anyway, and now I'm getting high memory usage in Windows 7 as well.




Screenshot
(Click images to enlarge)



Screenshot


Answer



If you want the OS not to use your RAM, take it out of your machine and sit it on your desk. But so long as the RAM is in the machine, using it is free. If you're thinking "I want the RAM free now so I can use it later", you're being silly. You can use it now and use it later. There is no disadvantage to using the RAM. None at all.



Modern operating systems only make RAM free if they have no choice. This is because there are only two things that can happen. If the RAM is used soon, then they just have to make the RAM used again, wasting the effort they went through to make the RAM free -- it is easier to move RAM directly from one use to another. And if the RAM is not used soon, then the effort of making it free is again wasted. Making RAM free is a last resort used only if the OS has no other choice because it adds an extra step the OS will have to go through in order to use the RAM.



Free RAM is only needed for the rare cases where RAM is needed and the operating system cannot transition RAM from one use to another (for example, in interrupt context). Only a very small amount of RAM is needed for this purpose, typically 64MB or so on modern computers. Any more free RAM than that is just waste.




Consider if a program runs and then stops. The program is in RAM. The operating system could make the RAM free or it could keep the program in RAM. If the program runs again soon, keeping it in RAM is a huge win -- disk I/O is avoided. And there is zero cost to keeping the program in RAM if the RAM isn't needed for some other purpose. So the OS keeps the program in RAM until that RAM is needed for something else. Making the RAM free when free RAM isn't needed is a pure losing proposition.


No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...