=== Wyly4 is now known as Wyly | ||
=== esj4 is now known as esj | ||
=== tsimonq2_ is now known as tsimonq2 | ||
=== tomreyn_ is now known as tomreyn | ||
=== alucardromero9 is now known as alucardromero | ||
=== sdeziel_ is now known as sdeziel | ||
POQDavid | Hey guys, I want to add an 8GB swap file to my server, which runs Ubuntu 24.04.1 LTS. The server has 16GB of RAM and a 6-core CPU. I was wondering if I should go with zswap or zram. | 15:01 |
---|---|---|
tuxick | i'd go with adding ram | 15:15 |
oerheks | swapfile, if ssd | 15:16 |
POQDavid | tuxick: I can't add more RAM sadly at the moment | 15:18 |
POQDavid | oerheks: Yah but i am not sure if i should use zram or something else | 15:19 |
tuxick | It Depends [tm] | 15:19 |
oerheks | zram, compressed swap space in RAM | 15:20 |
tuxick | sounds like a bad plan | 15:20 |
oerheks | you could with a 4 or more core cpu | 15:20 |
oerheks | but 8 out of 16... | 15:20 |
oerheks | no, stick with traditional swap, if ssd | 15:20 |
oerheks | 4/16 is doable | 15:21 |
POQDavid | Alright so normal swap file and whats wrong with 8GB swap file? | 15:23 |
patdk-lap | I dislike zram, as it cannot be swapped | 15:25 |
patdk-lap | and perfer zswap as it will compress the ram, but also let that compressed ram get swapped out if needed | 15:26 |
POQDavid | Does zswap use a lot of CPU? | 15:26 |
patdk-lap | if you tell it to, sure | 15:27 |
oerheks | compression and decompression takes some clockcycles yes | 15:27 |
patdk-lap | if you tell it to use lz4 it shouldn't be | 15:27 |
oerheks | there is no benefit for high load and compression imho | 15:27 |
oerheks | you win and loose the same again | 15:27 |
patdk-lap | highly depends on the workload | 15:28 |
POQDavid | Ah fair and if i go with normal swap are these settings vm.swappiness=10, vm.vfs_cache_pressure = 50 good? | 15:31 |
oerheks | cannot tell wrong from right, without load | 15:33 |
oerheks | basicly yes | 15:33 |
patdk-lap | swappiness just depends on how *smooth* you want your system to fell when you are running out of memory | 15:34 |
patdk-lap | lower means the system is going like pause/stutter when memory is tight | 15:34 |
POQDavid | So maybe I should leave them default for now and if i see any problems then I would like lower cause i thnk by default its 60 | 15:37 |
patdk-lap | the default is made more for desktop usage, so you dont feel it | 15:38 |
patdk-lap | but that can also be good for a server, where response latency matters also | 15:38 |
POQDavid | Ok could 60 caaue problem for server at all like what should i look in to? why some suggest 10? | 15:39 |
patdk-lap | if you feel it's pushing too much stuff onto ram, and it's constantly swapping in | 15:40 |
patdk-lap | stuff onto swapfile | 15:40 |
oerheks | swapfile, my idea, on ssd | 15:41 |
oerheks | c/my idea too | 15:41 |
patdk-lap | u.2 | 15:41 |
oerheks | ELO .. but that is offtopic | 15:42 |
POQDavid | Alright will go wtih normal swapfile :) also i was thinking would it better for IO to make small swap files instead one 4GB or 8GB swap file | 15:47 |
oerheks | on disk it does not matter that much | 15:49 |
POQDavid | Ah ok tyvm :) | 15:54 |
=== patrick_ is now known as patrick | ||
=== patrick is now known as Guest1302 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!