8 ms·
I never understood the rule of thumb where swap space was proportional to the amount of physical RAM. It seem to me it should be the size of your largest expect
by phkahler 10y ago
I never understood the rule of thumb where swap space was proportional to the amount of physical RAM. It seem to me it should be the size of your largest expected allocation (system wide) minus the amount of physical RAM or something like that. If you had a nicely configured system and took out half the RAM it doesn't make sense that you'd want less swap space.
- ordu 10y agoBut you choose amount of RAM dependant on maximum memory usage. Therefore swap space (being proportional to RAM) becomes dependant on largest expected allocation also. It wouldn't be wise to build system with 2Gb of RAM and 4Gb of swap space, when you need 6Gb of memory at peaks: such a system would be slooow. It may be not wise to buy 8Gb of RAM when 5Gb is the maximum that might be needed.
- Someone 10y agoA system that has way more swap than RAM will run out of 'performance is acceptable' way before it runs out of memory. That was different in the early days, but that was because people accepted worse performance (GC that stops the world for seconds can be better than no GC, even when running a GUI). Certainly nowadays, if you take out half the RAM, you will want to take out half the processes, too.
- AckSyn 10y agoThe rule made sense when your system had fewer than 128-256 MB of ram. These days it doesn't.
- cbhl 10y agoI think it made a lot more sense in the mid-90s, where a system would have 32 MB of RAM and people read the RAM requirements of the software they'd buy. So the size of your largest expected allocation was proportional to the size of RAM only because if you had more RAM you'd run more RAM-intensive software. Now, desktops can have 32 GB of RAM, but everyone just uses it to run Chrome.
- CGamesPlay 10y agoChrome, Slack, Spotify and Atom, which each bundle their own Chrome. On my computer right now Chrome is using about 1.5 GB of RAM (on Darwin, much of it is compressed). Slack is using 0.75 GB of RAM, Spotify is using another 0.5. We write very memory-hungry software to make up for our copious amount of RAM.
- fb03 10y ago> Now, desktops can have 32 GB of RAM, but everyone just uses it to run Chrome. .... which will happily chew away your 32 GB of RAM if you let it run for enough time :)
- NeutronBoy 10y agoIt makes supporting hibernate a lot easier - your system can just dump the contents of memory to the swap partition.