>> So swap isn't treated exactly like RAM.  It actually has special
>> handling in Linux which makes it beneficial to have on almost any
>> Linux system?  According to Alan, things get very bad when a Linux
>> system hits swap.  How can behavior like this be beneficial:
>>
>> "When a linux machine hits swap, it does so very aggressively, there
>> is nothing nice about it at all. The entire machine slows to a
>> painstaking crawl for easily a minute at a time while the kernel
>> writes pages out to disk, and disk is thousands of times slower than
>> RAM.
>>
> This is not entirely true.  There's regular swapping and there is
> "thrashing".  Thrashing is indicative of a memory-starved system, i.e.
> when many processes are trying to access memory, but there just isn't
> enough and the system is frantically swapping in/out.  I'm talking about
> your normal day-to-day swapping that you probably don't even notice.
>
>> It gets so bad that you can't even run a shell properly to try and see
>> what's going on and kill the actual memory hog."
>
> Again, that is thrashing.  I'm talking about "normal" swappage.  Dont
> throw the baby out with the bath water.
>
>> Also, aren't you likely to wear out your hard disk sooner using swap?
>
> Is this coming from someone who uses Gentoo linux, which is constantly
> downloading/compiling/linking object files?   Syslog and other loggers
> writing everything under the sun to a log file.  Backups, journal
> writes, database transactions, etc.  Compare how many disk transactions
> take place during your normal Gentoo usage versus a few megabytes
> here/there being swapped in/out.  Again, I'm talking about regular
> swapping, not "oh my god I has no RAM and my hard drive won't stop"
> Even so, we're talking about modern drives here.  This isn't the 1960s.

If I understand correctly, an out-of-memory condition that would lock
up a system without swap, will cause it to thrash with swap.  A remote
system of mine was locked up for many hours due to running out of
memory without swap.  If I had enabled swap, the system would have
thrashed for those hours?

- Grant

Reply via email to