3 ms·
I wonder if Windows 7 behaves like Linux in that by default, when faced with memory pressure, it will much prefer to swap out application pages rather than aban
by spudlyo 17y ago
I wonder if Windows 7 behaves like Linux in that by default, when faced with memory pressure, it will much prefer to swap out application pages rather than abandon buffer cache.
This is really annoying when this memory pressure is due to trying to fit more (and potentially useless) things into the buffer cache. Let's say you're performing a backup of a 100+ GB directory to another machine using rsync. Linux will want to jam that entire directory into buffer cache, which of course won't fit. Instead of immediately pitching out the existing disk cache, it will aggressively (depending on the value of swappiness) swap out application pages, (potentially owned by Oracle or MySQL) rather than lose existing buffer cache.
This is a real problem, and one that's a pain to fix.
- sid0 17y agoNo, Windows 7 and Vista always abandon the Superfetch cache before paging out anything else -- this is verified in the comments section. It's the sensible thing to do, since a. Superfetch data is heuristic and application pages are mostly not. b. Superfetch data always has a backing store (the actual file on disk), so it's really cheap to forget about it. This may or may not be true for application pages.
- nkurz 17y agoCould you clarify how the problem is hard to fix under Linux? If you set swappiness to 0, does it still swap out application pages?
- spudlyo 17y agoYes. Even with swappiness at zero, Linux will still swap when you don't want it to.