Ars Analysis Calls Windows 7 Memory Usage Claims "Scaremongering"
Via newsycombinator comes a reaction at Ars Technica to the recently reported claims of excessive memory use on machines running Windows 7. From the article: "I installed the XPnet performance monitoring tool and waited for it to upload my data to see what it might be complaining about. The cause of the problem was immediately apparent. It's no secret that Windows 7, just like Windows Vista before it, includes aggressive disk caching. The SuperFetch technology causes Windows to preload certain data if the OS detects that it is used regularly, even if there is no specific need for it at any given moment. Though SuperFetch is a little less aggressive in Windows 7, it will still use a substantial amount of memory—but with an important proviso. The OS will only use memory for cache when there is no other demand for that memory."
The problem with Windows isn't that it has a cache, it is, that the cache sucks. I have a box with 2GB of RAM and I run Visual Studio on it and do a build on a solution with 60 projects. Now you might think that after a day of builds and recompiles, at least some of that stuff would wind up in cache, but it feels like it doesn't. It grinds the disk as much in the morning as it does in the evening. By contrast, my Linux box, where I build a project nearly as large, is always feeling pretty peppy. Bottom line is, Windows, when dealing with jobs with lots of file, feels like drilling holes in my head, and Linux is responsive and pleasant.
Now, it would be nice if we could see what's in the cache in Windows, but you can't.
It would nice if you could peg a file to the cache, in Windows, but you can't.
In short, you have no idea what's in the cache, really, and can't do anything about it, and the disk just keeps grinding away. I wonder, if my drive is busy with files that I've been working on all day long, what for god sake's is sitting in the cache? I just don't know.
This is my sig.
This is in the case you need to free like 1GB of normal RAM. Other than like Photoshop and games don't need that much. But anyway, it has to be zeroed out for security, and so that other apps cannot randomly get data from other apps.
Besides the technical points, 30ms to free that RAM is really low. You wont even notice that.
I think it's just a sign of the times. I regularly bump up against my 2GB ram limit (once a day) if I have GIMP/Photoshop open, 3 or 4 Chrome windows open with 10-20 tabs each (many of those being youtube videos), usually a videogame in the background (Windowed No Border mode at full or almost full screen resolution rules), along with whatever else I'm doing, a paused VLC video, steam, and any other background apps + whatever I'm working on currently. This isn't a problem in Win7, it's a problem of Leaving a Bunch of Shit open all the time.
moox. for a new generation.
If one byte takes 10^-9 s, a million bytes take 10^3 s.
Only if you do them one at a time, one after another, waiting till each had been cleared. That'd be... Wait this is Microsoft we're talking about here... Carry on.
Deleted
If Windows 7 actually uses that much memory it's not scaremongering, it's memory hogging. Whether it's using it on not is a pretty fine distinction, it's still using it just because it can. If something else needs it, Windows has to decide if it wants to let go of it or not.
So are you saying Linux, BSD, Mac OS X and pretty much every other modern desktop OS other than Windows XP are also memory hogs as well? Because they also do the exact same thing and use up all of the free memory for caching, marking it as available.
Both articles miss some very big and important points. Back in the day of Windows 2000 and XP, the Task Manager chart reported the memory comit charge. Basically, that was the amount of memory applications (and Windows) requested allocated. This does not mean that much memory was actually used, but with the exception of very badly written/buggy programs, it should be close. As a rule of thumb, if you look at that and see that your commit is significantly larger than your RAM, you know you're probably in trouble and will be very reliant on swap.
Windows Vista and 7 report something completely different. The chart shows ram memory used minus cache, an almost useless metric, but it does not indicate how much 'total' memory, real and virtual, is allocated. If you look at the screenshot in the ars aritcle, you will see that the commit charge is over 3GB. That's a lot of memory, and doesn't include cache!.
At the end of the day, however, a bare bones Windows XP would require about 120MB of memory, whereas Windows 7 is around 1GB. That sounds like a big difference, but we are talking several years of new features and eye candy. Ultimately, when you drill it down, it means that Windows 7 requires $20 more worth of memory. An insignificant issue, so long as you keep that in mind when designing a system for Vista / Windows 7. (ie, make sure that any computer or device destined for those OS's have at least 2GB of ram)
These days I rarely see people putting together a system with less than 3-4 GB of memory, often as much as 8GB - and this goes for laptops as well. So if windows 7 wants to do something useful with all this memory, I say let it. My laptop runs W7 with "only" 2 GB of ram, but it runs everything I throw at it in a heartbeat. It should be mentioned that I'm not a gamer at all (except for the occasional round of minesweeper ;)), but still; your game won't utilize those 8 gigs of ram, at least not for anything really useful...
Smoother user experience by caching those files accessed on a regular bacis is a big plus in my book.
As someone commented on the last story a couple of days ago about this, if you don't want all your memory to be actually used, pull some of it out and put it in your desk drawer. What, you do want it all used? Well, that's what Windows 7 is doing, using all of it all the time, rather than leaving some of it unused much of the time. Oh, you only want it used for certain purposes? Why? If it's not being used for anything at the moment, using it for something is clearly better than that. And that's what Windows 7 (and Linux) do! If a more important use for it comes along, it repurposes it for that.
> never needed swap space.
You, sir. misunderstand the basic concepts of an OS and thus the relevance of setting up a swap space.
Swap is used by my machine to swap out process that I haven't used for days as well as part of processes that haven't accessed the swapped part of their memory for days. I almost have no swap activity (exchange between disk swap and memory).
I am grateful that Linux is smarter than you seem to be, it figured out that it was more efficient to swap out those process and to regain the memory to use it as buffer/cache.
My system would run fine without a swap space, it would just run less efficiently, with less buffer/cache.
http://slashdot.org/comments.pl?sid=1557492&cid=31213314&art_pos=5
> I see you have like 2GB of swap, haha (moron). Your machine would grind to a halt thrashing the disks if you swapped out that much memory.
2 GB is the correct size for my setup to allow a safety margin for memory leaks and what not and to maintain an optimal amount of buffer/cache at all times. Linux would automatically swap zombie assigned memory that isn't used anymore. As a matter of fact, it probably already has ;-))
Everything I write is lies, read between the lines.
The constant disk trashing in Vista & Windows 7 - is the ultimate Achilles heel for these OS's. You can fany it up with your wiseness about coding until you turn blue from the waiting, it still makes the machine hopelessly slow, not to mention the mental pain aquired from the constant disk-trashing-sound. Not to mention the ever-lagging-soggy response you have because the harddisk is "doing something else all the time".
Why is it, that Linux with X11 & Gnome - takes less than 27 seconds to boot on a BRAND NEW computer, and the SAME brand NEW computer...Windows 7 fights itself through disk-trashing-hell+preload-to-infinity for 5-7 minutes? I was READY for windows 7, I heard good things about it, I tried it for a WHOLE WEEK...until I almost caved in, and even though it was HELL to get all my hardware up and running with Ubuntu 9.10 (which is the shitties Ubuntu yet, hardware wise)...I STILL prefer to run Linux...compared to almost wanting to KILL my computer over the constant disk-activity!
I know I can turn it off, but Microsoft turns it ON every freaking update anyway. I'm also tired of the constant nagging - on what I should have ON / activated / turned off etc...after every update (which is nearly every day), and constant nagging about my software trying to run (because I want to run it).....MY GOD WHY CANT MICROSOFT return to Windows 2000 days....?
What this world is coming to - is for you and me to decide.
My Xserves would run at 100% when they were doing a lot of postscript processing on the print queues, but on average the UNIX stuff there was loaded far more heavily than the Windows servers. (2003r2 at the time.)
The Windows guys would order more hardware when they got to 60% CPU load. This was hard for me to grasp at first when I took over the Citrix farms. Windows does actually have nice performance instrumentation and nice documentation to go with it.
The only person that loaded Windows servers harder than I did was my buddy who managed the MS-SQL OLAP cubes. When they processed a cube it would peg out 8 and 16 way Itaniums at 100% for several days.