The Notebook Review forums were hosted by TechTarget, who shut down them down on January 31, 2022. This static read-only archive was pulled by NBR forum users between January 20 and January 31, 2022, in an effort to make sure that the valuable technical information that had been posted on the forums is preserved. For current discussions, many NBR forum users moved over to NotebookTalk.net after the shutdown.
Problems? See this thread at archive.org.

    vista caches all my ram :(

    Discussion in 'Windows OS and Software' started by weogy104, Sep 20, 2007.

  1. weogy104

    weogy104 Notebook Guru

    Reputations:
    0
    Messages:
    51
    Likes Received:
    0
    Trophy Points:
    15
    ive had a google around on this topic and have noticed that it is normal. but i was just wondering if anyone could explain why vista caches all my memory? and why leave me with like 5mb free.
     
  2. Eallan

    Eallan Notebook Consultant

    Reputations:
    0
    Messages:
    258
    Likes Received:
    0
    Trophy Points:
    30
  3. talz13

    talz13 Notebook Guru

    Reputations:
    0
    Messages:
    55
    Likes Received:
    0
    Trophy Points:
    15
    Because if it didn't cache as much as it could, it would be going to the hard drive for EVERYTHING (30-60MB/s) compared to having commonly used files residing in memory (5330MB/s). If you have free ram, the operating system isn't doing its job. Just take a look at linux to see that it does pretty much the same thing.

    Anyway, the number you should concern yourself with is the amount of memory shown on the memory graph of task manager. This is memory that is actually being used by active applications and does not show the memory taken up by caching. It's perfectly safe to ignore the amount of "free" memory under the physical memory section.
     
  4. AKAJohnDoe

    AKAJohnDoe Mime with Tourette's

    Reputations:
    1,163
    Messages:
    3,017
    Likes Received:
    0
    Trophy Points:
    105
    That sort of is one of the primary functions of an operating system: managing memory. Another is task and program management. Think about it ... what else on your PC is going to use memory and start and stop tasks and programs other than the operating system? Therefore, there is no point in not having all your PC's available memory allocated to the operating system, or at least controlled by it.
     
  5. Eallan

    Eallan Notebook Consultant

    Reputations:
    0
    Messages:
    258
    Likes Received:
    0
    Trophy Points:
    30
    Vista already does sit there and thrash my hard drives even at the login screen (all 4 of my hard drives). It's super annoying.
     
  6. Jalf

    Jalf Comrade Santa

    Reputations:
    2,883
    Messages:
    3,468
    Likes Received:
    0
    Trophy Points:
    105
    Ah, you don't want your memory to be used. Luckily there's a very simple fix.

    Open your computer, take out a ram stick, wrap it in one of those antistatic plastic things you always get hardware in, and put it in a drawer in your desk.

    As long as the RAM is in your computer, your OS assumes it is there to be used, and to speed things up.
    Do you particularly want lower performance?
    What good is unused memory?

    The important thing isn't how much memory is free when it isn't needed, but how much memory can be allocated to applications that need it. So it's fine for Vista to eat all your RAM, as long as it can let go once an application needs it.

    Luckily, that is precisely what Vista does.
     
  7. talz13

    talz13 Notebook Guru

    Reputations:
    0
    Messages:
    55
    Likes Received:
    0
    Trophy Points:
    15
    Of course it does, it has to load the data into ram from somewhere (hint: your hard drive) since ram is volatile storage and is cleared of its contents on shutdown (and effectively on reboot).

    It's just doing as much loading of files up front as possible so that by the time you need it, it's loaded in memory already. Now, if you're doing something that's not part of the caching process on bootup, you will probably suffer a bit of delay as the cache is being built.
     
  8. ikovac

    ikovac Cooler and faster... NBR Reviewer

    Reputations:
    872
    Messages:
    1,637
    Likes Received:
    0
    Trophy Points:
    55
    People think of RAM as a "resource" that needs to be "free". I believe it is actually a huge cache between disk and CPU cache. It should be always full. :)

    Cheers,

    Ivan
     
  9. Firov

    Firov Notebook Consultant

    Reputations:
    109
    Messages:
    113
    Likes Received:
    0
    Trophy Points:
    30
    I really do love this feature. With Vista my spare RAM is actively being used to increase system performance, rather than just sitting there going to waste as it did on XP and 2k. The only thing that would make it better would be if I could find out which applications it was caching (just because I'm the curious type) and if I could tell it to always cache certain programs (when free memory permits, that is.)
     
  10. moon angel

    moon angel Notebook Virtuoso NBR Reviewer

    Reputations:
    2,011
    Messages:
    2,777
    Likes Received:
    15
    Trophy Points:
    56
    To kill the thrashing turn off superfetch.
     
  11. AKAJohnDoe

    AKAJohnDoe Mime with Tourette's

    Reputations:
    1,163
    Messages:
    3,017
    Likes Received:
    0
    Trophy Points:
    105
    I did not find that to be all that effective.

    It is possible to turn off both PreFetch and Superfetch via a registry tweak via Run/Regedit.

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PrefetchParameters\
    • Double click EnableSuperfetch and change the value from three to zero
    • It works for EnablePreFetcher, too
    • Reboot, of course, after changing these values

    The values for EnablePreFetcher are:
    • 0 - Disable Prefetcher
    • 1 - Application Prefetching
    • 2 - Boot Prefetching
    • 3 - Both Application and Boot Prefetching

    The values for EnableSuperFetch are:
    • 0 - Disable Superfetch
    • 1 - Boot Superfetching
    • 2 - Application Superfetching
    • 3 - Both Application and Boot Superfetching

    I tried setting both of these to zero and ran that way for awhile, but reset them both to three as I did not notice any improvement nor degradation at either setting.

    However, I do delete all the .pf files ( C:WINDOWS\PREFETCH\*.PF) now and again (with CCleaner), but I exclude the supporting databases and indexes that are also present in that folder.
     
  12. Jalf

    Jalf Comrade Santa

    Reputations:
    2,883
    Messages:
    3,468
    Likes Received:
    0
    Trophy Points:
    105
    It sometimes amazes me the lengths people are willing to go to to degrade the performance of their OS.

    It's quite a lot easier to just let Windows deal with prefetching. It'll give you better performance too.

    And unused RAM is wasted. No application performs better because you have more unused RAM. On the contrary, the more RAM is in use, the better. Let Windows do its thing.

    And for heaven's sake, don't delete the prefetch files unless you specifically want to ensure slower load times of everything.
    I'd be hard pressed to create a slower Windows installation than you guys are coming up with.
     
  13. AKAJohnDoe

    AKAJohnDoe Mime with Tourette's

    Reputations:
    1,163
    Messages:
    3,017
    Likes Received:
    0
    Trophy Points:
    105
    I toyed with it because of the I/O involved. I determined that it was not a performance problem on my system. It reloads the programs it knows about in anticipation of them being reused. It would seem that I defeat that up-front performance hit by deleting the .pf files, but by keeping the indexes the relocating of the programs, when they are re-initiated for reuse, is still quicker.

    If prefetch/superfetch had some purging process to clean out .pf cache that had not been re-accessed in some number of days, rather than the rudimentary MRU/LRU apparently in place it would not be neccessary.
     
  14. baia

    baia Notebook Consultant

    Reputations:
    1
    Messages:
    124
    Likes Received:
    0
    Trophy Points:
    30
    Indeed, I actually don't like it when vista still gives me 25 mb of free RAM :D
    Why won't vista cash the remaining 25 mb :) I paid for it, use it! :D
     
  15. AKAJohnDoe

    AKAJohnDoe Mime with Tourette's

    Reputations:
    1,163
    Messages:
    3,017
    Likes Received:
    0
    Trophy Points:
    105
    Cache is only useful if it is re-accessed. That is the flaw in the prefetch and superfetch caching scheme; it presumes to know what to pre-load into cache based on prior patterns. Cache is best implemented as either a dynamic entity (built on the fly and used until discarded), or as an entity that is explicitly constructed (e.g.: I know I will alway start up Firefox, so I should be able to tell Vista to pre-load that for me at boot-up). The presumption and premise that prior patterns will persist is probably accurate for a large percentage of users, but without a cache invalidation process, whereby old unused cache entries are discarded, it simply becomes the computer equivalent of a glutton.
     
  16. surfasb

    surfasb Titles Shmm-itles

    Reputations:
    2,637
    Messages:
    6,370
    Likes Received:
    0
    Trophy Points:
    205
    What a great post. I wish XP used ALL my memory.
     
  17. Eallan

    Eallan Notebook Consultant

    Reputations:
    0
    Messages:
    258
    Likes Received:
    0
    Trophy Points:
    30
    I'm aware of how ram and computers work.

    I'm saying vista is accessing my hard drives constantly even if it's sitting idle. It's annoying and something that doesn't happen in other OSes.

    My 10k raptor annoys me grinding all the time.
     
  18. surfasb

    surfasb Titles Shmm-itles

    Reputations:
    2,637
    Messages:
    6,370
    Likes Received:
    0
    Trophy Points:
    205
    Switch back to XP then.

    I personally wanna switch to Vista if it is seriously utilizing idle time like this! That would be great. Unlike XP, which doesn't actually read the WHOLE file into memory (good and bad thing). Come to think of it, Vista doesn't either, but Vista actually utilizes all your RAM.
     
  19. ikovac

    ikovac Cooler and faster... NBR Reviewer

    Reputations:
    872
    Messages:
    1,637
    Likes Received:
    0
    Trophy Points:
    55
    :D true!

    Today my Vista leaves 29MB free out of 2GB. No - 31 by now. And I started 4 applications more! Damn! :)

    Joking...

    But - If you ever click on Resource monitor in Task Manager - you could learn very interesting things about your memory and how Vista handles it.
    Check the column Hard faults - you should get a lot of zeros there. It is a number of accesses to the pagefile or disk per minute in order to run that process because it was not in ram anymore. You'll see some processes really like your disk! Bad processes! :mad:

    Check the disk tab also if you are having issues. You'll see what is causing it. Ntuser.dat and all kinds of logs seem to be usually guilty for the constant traffic. But in normal work I see that once apps are loaded - very little disk activity goes on. I mean of course disk reads and writes but less than in XP if I remember correctly.

    On idle - my xp machine used to check the disk now and then so I couldn't use NHC ability to turn off disk for example. It would go off, and in 10 secs XP would need it and it would go on again. Vista seems to be more happy with the disk off for a longer time.

    So the real performance comes from ram that is always (almost) full and once disk finishes loading it - it remains silent.

    Cheers,

    Ivan
     
  20. Jalf

    Jalf Comrade Santa

    Reputations:
    2,883
    Messages:
    3,468
    Likes Received:
    0
    Trophy Points:
    105
    Doesn't matter. At worst, it gives you nothing and you lose nothing.
    At best, it speeds up loading of applications.
    The thing about this cache is that it's 100% redundant. Windows can safely overwrite it at a moment's notice. So it doesn't prevent this amount of RAM from being used.

    (That's for the RAM cache only, not for the prefetch files Windows saves. These seem to be purged out regularly as well though)

    There is such a process. When memory is required, it overwrites the least used entries.
     
  21. Eallan

    Eallan Notebook Consultant

    Reputations:
    0
    Messages:
    258
    Likes Received:
    0
    Trophy Points:
    30
    Don't get me wrong, I like vista a LOT better than xp.

    It's just a minor annoyance due in part to my hard drive speed.
     
  22. ScuderiaConchiglia

    ScuderiaConchiglia NBR Vaio Team Curmudgeon

    Reputations:
    2,674
    Messages:
    6,039
    Likes Received:
    0
    Trophy Points:
    205

    WOW!! Thanks for the tip on the Resource Monitor, I had never even noticed it was there. A real eye opener and great way to peek under the hood.

    Gary
     
  23. ikovac

    ikovac Cooler and faster... NBR Reviewer

    Reputations:
    872
    Messages:
    1,637
    Likes Received:
    0
    Trophy Points:
    55

    I hope it helped Gary! It is really very powerful.

    Cheers,

    Ivan
     
  24. moon angel

    moon angel Notebook Virtuoso NBR Reviewer

    Reputations:
    2,011
    Messages:
    2,777
    Likes Received:
    15
    Trophy Points:
    56

    Superfetch etc. might be designed to make Vista faster but if you have 1GB ram, in real terms especially with a new install it makes it all glacially slow.
     
  25. Firov

    Firov Notebook Consultant

    Reputations:
    109
    Messages:
    113
    Likes Received:
    0
    Trophy Points:
    30
    No it doesn't. If another application needs RAM then Vista will instantly free up the cache and make it available to that application. And while I admit that one gigabyte of RAM isn't exactly ideal for Vista, this isn't because Vista caches RAM.