Boston Linux & UNIX was originally founded in 1994 as part of The Boston Computer Society. We meet on the third Wednesday of each month, online, via Jitsi Meet.

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss] SSD drives vs. Mechanical drives



> From: discuss-bounces+blu=nedharvey.com at blu.org [mailto:discuss-
> bounces+blu=nedharvey.com at blu.org] On Behalf Of Dan Ritter
> 
> For a modern server, swap should be an emergency usage only.

Incorrect.

On a modern (linux) server, the kernel is able to balance stale application memory just like cache.  If there is some idle process whose memory is colder than the coldest cache page, then it's actually *more valuable* to keep the cache in memory and swap out the process.  The linux kernel can do this, if an only if there exists swap available.  By swapping out the idle process and keeping cache in-memory, the kernel improves system performance.

But you're correct that swap should never be actively used.  The practice that I like to follow is:  Give the system a small amount of swap.  1G at most, regardless of how much ram is present in the system.  That way, the kernel can improve performance by gaining up to 1G ram by swapping out idle processes, yet if a process runs away and starts hogging ram, the system won't let it run *too* long before giving it "cannot allocate memory" and thus usually causing the errant process to die and free its memory.



BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org