Linked by Thom Holwerda on Tue 17th Nov 2009 16:13 UTC
Windows Microsoft's Professional Developers Conference is currently under way, and as usual, the technical fellows at Microsoft gave speeches about the deep architecture of Windows - in this case, Windows 7 of course. As it turns out, quite some seriously impressive changes have been made to the very core of Windows - all without breaking a single application. Thanks to BetaNews for summarising this technical talk so well.
Thread beginning with comment 395074
To read all comments associated with this story, please click here.
by Bill Shooter of Bul on Tue 17th Nov 2009 18:09 UTC
Bill Shooter of Bul
Member since:

"A lot of people might think, 'Wow, 97 megabytes doesn't seem like a lot of free memory on a machine of that size'," said Wang, "And we like to see this row actually be very small, 97 MB, because we figure that free and zero pages won't generally have a lot of use in this system. What we would rather do, if we have free and zero pages, is populate them with speculated disk or network reads, such that if you need the data later, you won't have to wait for a very slow disk or a very slow network to respond."

That is the ideal situation in which a user's applications do not use much memory, except that which is used for loading objects off disk. That is not my typical usage of an operating system. Why can't I just control the amount of memory it uses for cache? Do what you want for default, but let me tweak it, for heavens sake. If you're right that the default behavior of cache everything is so correct, then I'll admit I'm wrong after trying to improve upon it.

Reply Score: 1

RE: Arrggg!
by slight on Tue 17th Nov 2009 19:06 in reply to "Arrggg!"
slight Member since:

The nice thing about caches, generally speaking, is that if you need the space for something else you can just discard the cache, so when your programs need that space the cache will be used for the programs.

The chances that you can manage the memory better than the kernel are slim.

There is an argument for how to tune whether very old pages get swapped out though, which Linux exposes through its 'swappiness' parameter (great name that ;)

Reply Parent Score: 2

RE[2]: Arrggg!
by Bill Shooter of Bul on Tue 17th Nov 2009 23:44 in reply to "RE: Arrggg!"
Bill Shooter of Bul Member since:

I can set the size of the virtual memory page file in windows, or leave it to the default setting. Why can't I also tune this behavior that is essentially controlling similar behavior?

Reply Parent Score: 2

RE[2]: Arrggg!
by cb88 on Wed 18th Nov 2009 00:07 in reply to "RE: Arrggg!"
cb88 Member since:

Actually I'm pretty sure that exokernel designers would differ with your opinion on the kernel being the best at memory management. see here

The drawback is exokernels have an inherent bloaty tendency that could be avoided though...

Reply Parent Score: 0

RE: Arrggg!
by sbergman27 on Tue 17th Nov 2009 23:57 in reply to "Arrggg!"
sbergman27 Member since:

Why can't I just control the amount of memory it uses for cache?

I don't understand this. Any memory that is not being used right now for programs can be used for caching. And if programs suddenly have a need for more memory, that memory can simply be freed. Instantly. No disk activity required. Why would you *want* to limit what the kernel does with otherwise unused memory, which can be put to good use?

In the Linux world, we do have a bit of a conflict between those folks who think that programs' seldom-used pages should get swapped out to make more room for disk cache, and those who feel that program's pages are sacred, and should not be swapped out unless absolutely necessary. But that is a different issue.

Reply Parent Score: 4

RE[2]: Arrggg!
by sbenitezb on Wed 18th Nov 2009 03:02 in reply to "RE: Arrggg!"
sbenitezb Member since:

We have enough memory in today computers that swapping is mostly unneeded. If you have more than 1GiB of memory and you do a fair use of your computer, you'll see most of the time the swap isn't needed at all. I have 1GiB and my KDE desktop uses no more than half most of the time with browser, mail client, chat client and torrent client. Any program that's using more than that is probably misbehaving and ought to be terminated. When you have swap, say double your RAM, and a program goes rogue, it will start consuming all available memory, and then the kernel will allocate all available swap to it. That's gigabytes of swapping until the OOM kicks in, producing a lot of disk thrashing and the normal slowdown. The disk IO is producing the feeling that you need a new computer. Hopefully, in a few years swap will be totally unnecessary.

Reply Parent Score: 1