=== 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 [15:01] 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:15] i'd go with adding ram [15:16] swapfile, if ssd [15:18] tuxick: I can't add more RAM sadly at the moment [15:19] oerheks: Yah but i am not sure if i should use zram or something else [15:19] It Depends [tm] [15:20] zram, compressed swap space in RAM [15:20] sounds like a bad plan [15:20] you could with a 4 or more core cpu [15:20] but 8 out of 16... [15:20] no, stick with traditional swap, if ssd [15:21] 4/16 is doable [15:23] Alright so normal swap file and whats wrong with 8GB swap file? [15:25] I dislike zram, as it cannot be swapped [15:26] and perfer zswap as it will compress the ram, but also let that compressed ram get swapped out if needed [15:26] Does zswap use a lot of CPU? [15:27] if you tell it to, sure [15:27] compression and decompression takes some clockcycles yes [15:27] if you tell it to use lz4 it shouldn't be [15:27] there is no benefit for high load and compression imho [15:27] you win and loose the same again [15:28] highly depends on the workload [15:31] Ah fair and if i go with normal swap are these settings vm.swappiness=10, vm.vfs_cache_pressure = 50 good? [15:33] cannot tell wrong from right, without load [15:33] basicly yes [15:34] swappiness just depends on how *smooth* you want your system to fell when you are running out of memory [15:34] lower means the system is going like pause/stutter when memory is tight [15:37] 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:38] the default is made more for desktop usage, so you dont feel it [15:38] but that can also be good for a server, where response latency matters also [15:39] Ok could 60 caaue problem for server at all like what should i look in to? why some suggest 10? [15:40] if you feel it's pushing too much stuff onto ram, and it's constantly swapping in [15:40] stuff onto swapfile [15:41] swapfile, my idea, on ssd [15:41] c/my idea too [15:41] u.2 [15:42] ELO .. but that is offtopic [15:47] 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:49] on disk it does not matter that much [15:54] Ah ok tyvm :) === patrick_ is now known as patrick === patrick is now known as Guest1302