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."
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.
I really wonder when people will get this. In the earlier thread I saw people commenting that Windows 95 didn't need so much memory and so on..
To state it again. This is not RAM memory you need, use or have purpose for. IF you do need it, it is zeroed-out and free'd to application in like 30ms (one frame in usual FPS games).
If you have fast memory, do use it to it's full extend.
Really? 30ms. Shit that's slow.
This IS RAM we're talking about here, right? y'know nanosecond stuff, 10^-9 not 10^-3 seconds.
Deleted
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.
Sure, I know if my compiles seem to be slow there's nothing better for improving my productivity than diving into the cache.
In any case, if you want to compare OS cache performance you might at least try to use the same compiler and the same language on both machines.
As I understand it, it doesn't cache data, it caches applications (and I think also fonts and other often-used things). So startup time for your web browser, e-mail client, IM client, and any other applications you use often will be much faster. For example, Google Chrome loads almost instantaneously on my system, from a cold start. It won't keep a memory cache of things that applications do, and hence it won't speed up compilation, rendering, etc.
For that matter, 2GB of RAM isn't a whole lot to cache with when you think about it. The sweet spot for Vista/Win7 is really around 4GB or higher for SuperFetch to really shine.
Screw the rules, I have green hair!
This is completely offtopic, but you seem to come with this message in every thread so I answer you one time here - I am from sweden, not uk.
Seems to use 1.3 gig no matter what I do. It's got 4 gig total. Boots in less than 2 minutes. It makes mistakes a lot faster than the old machine, which was just shy of a brick when I switched.
How about a moderation of -1 pedantic.
It's not "hogging" memory if it dumps it the second you start up a program that needs it... It also doesn't make your system "appear" faster, it makes it faster. I paid for all that RAM, I don't mind it being taken advantage of; that's why it's there in the first place...
Linux uses available memory for cache, and rather aggressively. All available memory can be filled with cached file blocks. This happens routinely on systems which have big randomly-accessed files open, like databases.
There's nothing wrong with this, except that, once in a while, Linux hits a race condition in prune_one_dentry, causing an "oops" crash, when there's an unblockable need for a memory page and something is locking the file block cache.
This is one of the Great Unsolved Mysteries of Linux. Linus wrote about it in 2001 ("I'll try to think about it some more, but I'd love to have more reports to go on to try to find a pattern.. "). As of 2009, this area is still giving trouble. The locking in this area is very complex.
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
Windows 7 is sucking up your system memory to make Windows appear faster.
So windows has a feature which makes everything run faster and yet it only "makes Windows appear faster", instead of making it actually faster?
It seems to me that windows is only using hardware in a rather intelligent way: if it's not being otherwise used or needed, it uses it to boost performance.
Linux does the same thing, as far as I know, and you don't see anybody calling Linux a memory hogging OS.
Everyone knows there's a shadow-bus on the motherboard that only open source operating systems have access to.
Describing caching as a way Windows makes your computer "appear" faster is really a little disingenuous. If that is the only metric for your complaint then you should be angry that your processor caches as well. After all, your processor takes the time to check two or three caches every time it issues a move instruction. If it misses every time, then it has to pick what to throw out of the cache and read directly from memory. Wouldn't it be so much better if it just made a fetch to ram every time there was a move instruction? After all, your processors caches only "appear" to make your processor faster right? The question that people should be asking if they want to get upset about SuperFetch is does this approach to ram use benefit the user enough to be worth the extra complexity in the operating system's memory allocator.
People always mix up Sweden and Swindon
rewriting history since 2109
Programs and compilers have nothing to do with disk read/write caches, this is handled at the OS level.
Programs ask to read/write from/to disk and they have no idea where the OS get the data from.
You and the GP might be confusing CPU cache that has its own dedicated memory and disk cache that uses the OS RAM.
Everything I write is lies, read between the lines.
if everyone is so afraid of their computer memory being used to the fullest, why do these people install so much of it?
I've got 8GB of ram in the machine I'm on at the moment, and I want the OS and applications to use it to the fullest and most efficient extent possible at all times. I didn't install a 64-bit OS and 8GB of ram so that I can see 6GB free at all times.
I want a new quote. One that won't spill. One that don't cost too much. Or come in a pill.
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.
If Windows refused to use your RAM that you had installed, now that would be an issue. But fully using RAM? This, on its own, is not something to complain about.
The last article specifically said RAM was nearly exhausted and there was excessive paging to disk. No one cares if RAM is full or not, if it's unused it's wasted anyway. The concern is having 85% memory utilization and then paging memory out to the pagefile.
Or perhaps he was comparing proficiency at second languages ... (english as a second language vs spanish as a second language).
At boot, Windows is doing other things not prefetching. Turn superfetch on and monitor your active processes at boot, you'll see that the superfetch PID is sittng all the way at the bottom of everything. Its IO is negligible as is its CPU usage until AFTER everything else has loaded and your system has gone back to twiddling its bits for a few hundred thousand processor cycles.
Keep on knockin'
https://robbiecrash.me
The only data in the article you refer to was captured data from XPnet that said that >90% of RAM was in use in Windows 7 machines. There was no data saying it led to swapping, that was supposition.
http://www.computerworld.com/s/article/9158258/Most_Windows_7_PCs_max_out_memory
http://lkml.org/lkml/2005/8/20/95
fflush() just flushes stdio's buffer, so that any data written to the file is sent to the operating system (via write() on *nix), making it visible to other programs. It does not flush anything in the operating system's own buffers/caches. Also, fclose() calls fflush() automatically, so calling both is redundant.
You're probably thinking of fsync(), a system call that does actually force data to disk. And should almost never be used, unless you enjoy waiting through several seconds of disk grinding and general unresponsiveness.
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)
Actually, even XP had a disk cashe (like all the other OSes you mention, it was post-caching - storing data in case you need it again soon, rather than pre-caching things that you are probably about to use). However, as I understand it, the disk cache in XP was relatively small, and XP was (at release) used extensively on machines that really didn't have the kind of RAM it wanted. Therefore, it implemented an extremely aggressive paging algorithm, constantly writing memory pages to disk but not recovering them until it absolutely had to (even if there was un-allocated RAM). Not only did this increase I/O, but it meant that switching out of one long-running application (which has been allocating and freeing memory for so long that *everything* else got paged out) takes ages.
The up-side of this is that the main running program still looks pretty fast, even on a low-memory computer. That was the goal for XP. Unfortunately, it also makes XP hopelessly bad at managing systems with the kindof RAM you see today - it will still super-aggressively swap out memory pages for inactive applications, even if it could leave stuff in main memory and just re-use a portion of the RAM. Once that RAM is freed - perhaps because the program is closed - it lacks the sense to fill it up again with cached data that you might want soon (quite possibly including chunks of the pagefile holding data for one of the background processes the user is just about to click on and would rather see activate without 4 seconds of delay to pull paged memory in again).
That said, your point stands. XP's memory management is terrible for modern systems, and aside from the difference between pre- and post-caching, all other major OSes are "memory hogs" in this manner too. Unused RAM is wasted RAM.
There's no place I could be, since I've found Serenity...
The issue is not a simple one.
On the one hand it's potentially a good idea to use "unneeded" RAM to pre-fetch possibly useful in the future disk data.
But a whole lot of apps were written without that "feature", so a lot of them already pre-fetch data. Now you have twice the amount of RAM tied up, for no benefit.
And nobody can predict the future, so the pre-fetching is speculative at best, and has no way to compensate for other tasks the user may double-click into competion with ones being pre-fetched.
Worse yet, a lot of apps look at the amount of free RAM when they decide whether to prune their working set or make other cache/purge decisions.
If all of a sudden the OS reports less free RAM, all those apps are going to make the wrong decision.
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.
All good operating systems do this. My Mac, for instance has "inactive memory", which is not exactly the same as Windows, but close enough. If your memory is free, it's not doing anything for you. End of story.
I still cannot find the droids I am looking for...
While catering to the Apple fan-base a little too much for my tastes -- hits it right on.
It is scaremongering.
.
Cache is there for a reason -- idle RAM is useless RAM. Now, do I think that Windows allocation mechanism for idle RAM is right on? Of course not. It could use some tuning. It could have used some tuning since XP -- but is idle RAM stupid? Yes.
Anything that can update the pipeline between process/thread interaction with data before it has to go to disk -- is preferred.
However, Windows needs to be smart about what it caches and keeps in the pre-fetch. Frequently used and accessed rather than conditional stale.
That's the point.
Sort of.
The issue with ext4 had to do with dirty cache not being written to disk in a timely manner. This meant that you could have disk writes you thought had already happened and certain actions could get out of sync because of they way they'd been written.
The cache in this case is not dirty(in fact it's read only) so there's no risk of losing data (since most of the time the data on the disk and the data in memory are identical and when they're not the disk is right).
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.
Except it simply doesn't do that as you can easily demonstrate with test case programs. Memory used for cache is used but not reserved, so if a program needs it, it will simply free some of the cache and give it to the program. No swapping required. Swapping programs in order to maintain the cache would be idiotic, but Windows doesn't do this.
If you don't know where you are going, you will wind up somewhere else.