Slashdot Mirror


Windows 8 To Reduce Memory Footprint

bheer writes "Microsoft's Windows 8 blog has a good post about the work being done to reduce Windows 8's memory footprint. The OS will use multiple approaches to do this, including combining RAM pages, re-architecting old bits of code and adding new APIs for more granular memory management. Interestingly, it will also let services start on a trigger and stop when needed instead of running all the time."

12 of 306 comments (clear)

  1. About friggin' time... by DaneM · · Score: 4

    ...especially the bit about the services.

    1. Re:About friggin' time... by tech4 · · Score: 5, Insightful

      Except for the services part, Windows memory management has been improving a lot with each version. It made a huge difference when they let the OS decide more intelligently where to put resources not in use to.

      Most people who don't really understand memory management will just look at the processes and start bitching how much memory each program uses, or how Windows shows there isn't any memory available (while in fact it's just used for caching things). They're only half-intelligent, which hurts them even more than not knowing at all. The fact is, non used memory goes to waste. Every time there's memory that's free, well, it's just wasting it. It's much better approach that OS tries to use it all intelligently.

      This same pattern of stupid comments can be seen in browser comparisons too. It's always full of people going "omg Firefox/Opera/IE is using this much memory!" while it shows that they don't understand what is really happening. The browser and OS reserves that memory because it speeds up things. If the memory is needed elsewhere, it can and will free it up. That's something that seems to be really hard for people to understand, as the same thing always happens in every browser story or story about memory management.

    2. Re:About friggin' time... by torako · · Score: 4, Insightful

      By what mechanism can a browser know when the memory it has reserved is needed elsewhere in the system? I don't think it works that way.

      When people complain about browsers needing excessive amounts of memory they usually refer to memory leaks, not to intelligent use of memory through caching.

      The bit about how some people misinterpret the amount of free memory the OS reports is totally true, though.

  2. CPM by ArgumentBoy · · Score: 4, Funny

    My first self-owned computer was a Kaypro 4-84. The OS was CPM and the machine came with 64K (yes, K) of RAM. When it booted up the screen said it had 63K of RAM. I thought I had been ripped off so I called the company. The tech explained that the other 1K was being used by the OS. So I don't think Windows 8 is going to impress me.

  3. "let services start on a trigger" by Rufty · · Score: 5, Insightful

    So windows is finally getting inetd?

    --
    Red to red, black to black. Switch it on, but stand well back.
    1. Re:"let services start on a trigger" by mustangsal66 · · Score: 5, Funny

      So windows is finally getting inetd?

      and I hear Windows 8 SP1 will run the 2.6 kernel

      --
      Why worry? Each of us is wearing an unlicensed "nucular" accelerator on his back.
      Sig changed for readability by G.W.
  4. Hope so... by IANAAC · · Score: 5, Interesting
    It's been a long time since I've dealt with Windows other than XP in a VM, and even that is rare.

    My old Asus netbook recently died, so I was forced to go out and buy another. I bought an Aspire One loaded with W7S. I really wanted to like W7. Really. I liked the interface. But damn, it was really slow and memory hungry. With no pgms running, it was taking up about 560-580M of memory, compared to Ubuntu (11.04) taking 260-270M with no pgms running.

    I really couldn't have more than two programs running in W7 without hitting 900M memory use. Granted, they were big pgms - Thunderbird and Firefox, both latest versions. But contrast that with Ubuntu where I ran TB, FF, Pidgin, Hotot, Tobmoy, LibreOffice and Rhythmbox all at the same time and never go above the 850M mark in memory use (at least not yet).

    This release of Ubuntu has its own set of problems (Compiz, anyone?), but I much prefer it to W7. If MS can get Window's memory usage down I'd be more inclined to use the latest version.

    1. Re:Hope so... by tgd · · Score: 5, Informative

      The vast majority of people -- even those who think they know how to interpret windows memory statistics -- don't know how to interpret Windows memory statistics. The common tools (like Task Manager) give meaningless numbers for both process and total system usage. Sysinternal's Process Explorer is better, but you still need to understand how the Windows kernel and memory management works to properly interpret the numbers.

      I wouldn't read anything at all into the numbers you were seeing. 900M memory usage for two programs in Task Manager is just fine -- you quite literally *can't* get the real information through Task Manager.

      Modern OS memory management is one of the most complicated things an OS does, and unfortunately no one has ever come up with a good way to distill all the information about what is really going on in your physical memory into a single number or statistic that lets people know if something is wrong. The only real statistic that matters is the percentage of pages that the total sum of processes are actively using relative to the commit charge... a process with a gigabyte of memory mapped files, or a hundred megabytes of shared code pages, or hundreds of megabytes of allocated and populated pages that only infrequently use them is running just fine.

      Reducing memory usage in Windows 8 is more about reducing the churn of pages through the various kernel data structures in the memory manager. As the article says, that involves things like optimizing old code to not trigger page faults all the time, or to suspend threads or otherwise idle background services that aren't being used. (A thread waking up, and going immediately back to sleep because it has nothing to do will still potentially cause a page to be re-loaded from disk.)

      The Russinovich/Ionescu book "Windows Internals" has some pretty good sections that talk about how Windows memory management really works, if you're curious about it -- it would likely be enlightening about some of the misunderstands that people have about Windows.

    2. Re:Hope so... by Runaway1956 · · Score: 4, Interesting

      I find it difficult to believe that people are buying new machines with less than 4 gig of ram. Memory was cheap by the time Win7 came out - cheap enough to load a new machine with 4 gig, anyway. Maybe I'm something of an asshole, but anyone who invests hundreds of dollars in a new machine, and decides to go cheap on the memory deserves to have a shitty running machine. I don't care if it's an Apply fanboy, a Windows drone, or a Linux nut. BUY MEMORY, or don't complain about performance!

      Now, if you had said that you installed all the memory that the mainboard would support, and you were getting 60% to 80% usage before you even started any programs, THEN I would agree that there was a problem, I would sympathize with you, and I would be willing to look for the problem.

      A couple of guys have commented on how much memory their browsers use. Well, I've seen FF using around 1.5 gig, while at the same time, Chromium was using in excess of a gig of memory. As someone else commented - the memory is there, why not use it? It's better than waiting for "virtual memory" to thrash the hell out of my hard disks!

      --
      "Windows is like the faint smell of piss in a subway: it's there, and there's nothing you can do about it." - Charlie Br
    3. Re:Hope so... by IANAAC · · Score: 4, Interesting

      The Russinovich/Ionescu book "Windows Internals" has some pretty good sections that talk about how Windows memory management really works, if you're curious about it -- it would likely be enlightening about some of the misunderstands that people have about Windows.

      I will fully admit to not knowing the internals of memory management. But I can say without a doubt that W7 definitely takes more of a performance hit than Ubuntu with the same programs. Thunderbird and Firefox bring the machine to a crawl in W7, while they don't in Ubuntu. Memory management is the only reasonable cause I can think of. It certainly not the processor - it's an Atom 570 dual core running at 1.66GHz. Add a third largish program (Media Monkey in my case) and W7 becomes unresponsive - REALLY unresponsive.

      I don't get this behavior at all under Ubuntu, with more programs running, Granted, Ubuntu makes it slightly easier for me to see how memory is being used - probably because I'm a bit more familiar with it - by showing me buffers/cache. So as a layperson, I come to the conclusion that it's memory management.

  5. Re:Services by Daltorak · · Score: 4, Informative

    > it will also let services start on a trigger and stop when needed instead of running all the time.

    Nice.

    Although I have to wonder, why are "services" treated differently than other programs, in this context or any other? Does it have any positive effect?

    First of all, it's worth noting that Service trigger events shipped with Windows 7.... they're just making better use of this capability in Windows 8. (This is a common flaw with Microsoft's development process for Windows.... they include some really smart new APIs but then take another 5 years to start really using them thoroughly in Windows itself.)

    But to your main question -- why are services different from other programs? A service is actually a regular program, with one exception -- it hooks into the operating system to receive events telling it to pause, continue or stop its operation.

    Why do this? Management. You don't want 20 different programs with 20 different ways of starting & stopping them.

    A feature the Windows Service Control Manager offers is the ability to run your service in a single pooled process alongside other services that require roughly the same privileges on the system. You can see this at work in the Windows 7 task manager -- go to the Services tab and sort the list by PID. If you ever wondered what "svchost.exe" is on a Windows system, or why there are several running on your system, each under different user accounts...... there you go.

  6. And this matters? by grasshoppa · · Score: 4, Interesting

    With windows 7, memory has become less an issue to me. I just don't care that much; I have 4 gigs, and stuff starts right up when I click on it. As a user, that's all I care about. I could obsess about how much memory is being used at all times, I guess, but what does that metric even mean? I currently have fo:nv, mstsc, 10tabs in ie and ~20 in chrome, everything is still snappy. What does it matter that the system is showing high ram utilization?

    What I'd like to see them focus on instead is the file system, and making searches work at least as well as they did in XP. Vista utterly broke file searching ( which is amazing in and of itself ), and while w7 brought back some of the functionality, it's still a crap shoot.

    --
    Mod me down with all of your hatred and your journey towards the dark side will be complete!