1 |
On 19/10/2019 16:24, Mick wrote: |
2 |
> On Saturday, 19 October 2019 14:11:26 BSTmad.scientist.at.large@××××××××.com |
3 |
> wrote: |
4 |
>> Do systems run different memory management when swap is on versus no swap? |
5 |
|
6 |
> The answer to this question is an unqualified yes, although you do not define |
7 |
> your meaning of "different memory management". The existence of swap space |
8 |
> and the kernel's swappiness setting will change the way memory is dynamically |
9 |
> allocated to processes at runtime and may affect the responsiveness of your |
10 |
> system. |
11 |
|
12 |
Memory management was massively rewritten roundabout kernel 2.4. |
13 |
|
14 |
The original swap algorithm NEEDED twice ram as swap. And when Linus |
15 |
ripped out all the "optimisation", the vanilla kernels only needed to |
16 |
touch swap, and if they didn't have twice ram they would crash. |
17 |
|
18 |
At that point, the recommendation changed to "no swap is fine, twice or |
19 |
more is fine, just don't have swap less than twice ram". |
20 |
|
21 |
My personal rule is to take the motherboard's max ram, double it, and |
22 |
create a swap partition that size on every disk. So my current desktop |
23 |
system has 80GB of ram/swap - 4x4GB slots times 2 disk drives. And my |
24 |
new system has 4x8GB so that'll be 160GB!!! HOWEVER - Richard Brown of |
25 |
SUSE said that's dangerous - if somebody fork-bombs you it'll take a |
26 |
long time to fill that much swap and regaining control of your system |
27 |
could well be a big red switch job. |
28 |
|
29 |
Cheers, |
30 |
Wol |