[talk] Does swap still matter?

James K. Lowden jklowden at schemamania.org
Wed Mar 16 14:48:07 EDT 2022


On Wed, 16 Mar 2022 11:03:26 -0400
George Rosamond <george at ceetonetechnology.com> wrote:

> Do certain applications/OS functions still use swap as opposed to RAM 
> for some reason? 

1.  Where does mmap MAP_ANON go? 

2.  I assume swap is necessary because Linux defaults to overcommitted
memory.  Because of that default, now a decade old at least, C
libraries are being written to allocate gobs of memory that they'll
never use. On systems without swap, that means real memory.  

Of course, you need *enough* swap.  On the NetBSD system I was using, I
think it was ndm that was the culprit. I don't remember anymore what I
was doing, some webbish thing, ISTR.  Died repeatedly in the middle of
the night until I tracked it down.  

In case it's not obvious, swap that provides memory that is never used
doesn't slow the system down, because it's never paged in.  

--jkl



More information about the talk mailing list