3 ms·
One memory leak and your cache is gone. [edit] Not sure if ramdisks are pinned though.
by FeepingCreature 9y ago
One memory leak and your cache is gone.
[edit] Not sure if ramdisks are pinned though.
- ars 9y ago> Not sure if ramdisks are pinned though. Ramdisks will go to swap. A memory leak will force the entire ramdisk into swap, and reading it back into memory afterward is 10 to 100 times slower than reading normal files off of a disk.
- majewsky 9y ago> Ramdisks will go to swap. Assuming that you have swap. I don't; I want my SSD to stay alive.
- mavhc 9y agoDoes anyone have actual data on swap on SSDs in 2017?
- ars 9y agoIf you have a memory leak, and a ramdisk, and no swap then the OOM killer will trigger. Hopefully it will target the program with the memory leak, but this is not guaranteed. Swap is useful because you can shift unused memory onto disk. There are many programs that allocate (and write) a lot of memory that they never afterward use. By having swap you make more room for cache in memory. SSD doesn't matter here - this is not swap thrashing, but rather occasional writes.