swap config

Lorenzo Salvadore phascolarctos at protonmail.ch
Mon Sep 10 09:08:35 UTC 2018

> I have 16GB or ram and 24GB of swap. I used swap for two reason. The
> first is to mitigate any slow memory leaks, the second is to back tmpfs.
> Neither of these rely on anything being particularly fast.

Thanks for giving examples of why one might need such big swap space
(well, big from my point of view). I will give an example why I use only very
little swap to help OP decide which case is more similar to his situation.

I deal with mathematical software which has to do very fast computations
on huge amount of data. If this amount is less than the RAM available, then
one of my computations can take 21 hours: this only depends on CPU speed
and RAM access speed. If on the contrary the amount of data does not fit in
RAM and swap is used, since those computations consist of loops involving
all of the data for most of the time, the problem becomes impossibile do deal
with (I have not waited enough to know how much time would be needed,
surely days, probably weeks and maybe even months).
In such a situation, swap is definitely not an option: you must add RAM
instead. And if you cannot add RAM, you must wait very long (and hope that
you did not make any mistake in what you asked the computer to do!).

I would be curious to know if you actually use the swap space you reserved:
in particular, do you ever fill the whole 16 GB of RAM? Do you happen to use
an application with slow memory leaks in it as far as you know? If yes, which

More information about the freebsd-questions mailing list