/srv/irclogs.ubuntu.com/2024/12/20/#ubuntu-server.txt

=== 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
POQDavidHey 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
tuxicki'd go with adding ram15:15
oerheksswapfile, if ssd15:16
POQDavidtuxick: I can't add more RAM sadly at the moment15:18
POQDavidoerheks: Yah but i am not sure if i should use zram or something else 15:19
tuxickIt Depends [tm]15:19
oerhekszram, compressed swap space in RAM15:20
tuxicksounds like a bad plan15:20
oerheksyou could with a 4 or more core cpu15:20
oerheksbut 8 out of 16...15:20
oerheksno, stick with traditional swap, if ssd15:20
oerheks4/16 is doable15:21
POQDavidAlright so normal swap file and whats wrong with 8GB swap file?15:23
patdk-lapI dislike zram, as it cannot be swapped15:25
patdk-lapand perfer zswap as it will compress the ram, but also let that compressed ram get swapped out if needed15:26
POQDavidDoes zswap use a lot of CPU?15:26
patdk-lapif you tell it to, sure15:27
oerhekscompression and decompression takes some clockcycles yes15:27
patdk-lapif you tell it to use lz4 it shouldn't be15:27
oerheksthere is no benefit for high load and compression imho15:27
oerheksyou win and loose the same again15:27
patdk-laphighly depends on the workload15:28
POQDavidAh fair and if i go with normal swap are these settings vm.swappiness=10, vm.vfs_cache_pressure = 50 good?15:31
oerhekscannot tell wrong from right, without load15:33
oerheksbasicly yes15:33
patdk-lapswappiness just depends on how *smooth* you want your system to fell when you are running out of memory15:34
patdk-laplower means the system is going like pause/stutter when memory is tight15:34
POQDavidSo 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 6015:37
patdk-lapthe default is made more for desktop usage, so you dont feel it15:38
patdk-lapbut that can also be good for a server, where response latency matters also15:38
POQDavidOk could 60 caaue problem for server at all like what should i look in to? why some suggest 10?15:39
patdk-lapif you feel it's pushing too much stuff onto ram, and it's constantly swapping in15:40
patdk-lapstuff onto swapfile15:40
oerheksswapfile, my idea, on ssd15:41
oerheksc/my idea too15:41
patdk-lapu.215:41
oerheksELO .. but that is offtopic15:42
POQDavidAlright 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 file15:47
oerhekson disk it does not matter that much15:49
POQDavidAh 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!