disoriented
Level: Smitemaster
Rank Points: 2397
Registered: 08-07-2007
IP: Logged
|
Re: PC falling asleep without swap file (+3)
http://superuser.com/questions/810170/should-i-disable-swap-file-if-i-have-lots-of-ram-or-should-i-move-it-to-a-virtua
Excerpt:
No matter how much RAM you have, you want the system to be able to use it efficiently. Having no paging file at all forces the operating system to use RAM inefficiently for two reasons. First, it can't make pages discardable, even if they haven't been either accessed or modified in a very long time, which forces the disk cache to be smaller. Second, it has to reserve physical RAM to back allocations that are very unlikely to ever require it (for example, a private, modifiable file mapping), leading to a case where you can have plenty of free physical RAM and yet allocations are refused to avoid overcommitting.
Consider, for example, if a program makes a writable, private memory mapping of a 4GB file. The OS has to reserve 4GB of RAM for this mapping, because the program could conceivably modify every byte and there's no place but RAM to store it. So immediately, 4GB of RAM is basically wasted (it can be used to cache clean disk pages, but that's about it).
You need to have a page file if you want to get the most out of your RAM, even if it's never used. It acts as an insurance policy that allows the operating system to actually use the RAM it has, rather than having to reserve it for possibilities that are extraordinarily unlikely.
The people who designed your operating system's behavior are not fools. Having a paging file gives the operating system more choices, and it won't make bad ones.
There's no point in trying to put a paging file in RAM. And if you have lots of RAM, the paging file is very unlikely to be used (it just needs to be there) so it doesn't particularly matter how fast the device it is on is.
____________________________
34th Skywatcher
Best to PM me, since I might miss your message on CaravelNet chat.
|