Why aren't you using zswap?
>>107876382I got 8 GB (enough) of RAM, so no swap, Zswap, Nswap or so needed
>>107876410There is never a situation where it makes sense to go without zswap or zram. Even on old computers with bad CPUs it is faster to compress/decompress than to run low on memory or swap to disk.
>>107876410>8 GB (enough) of RAMSome people live in another world, I kept running out of memory at 16
4gb ram is enough for me
>>107876445you gotta close some of your blacked.com tabs
>>107876382i do, lz4 compression
>>107876483
>>107876382i do use zswapi've gone on two autistic zswap vs zram deep dives and both times i ended up choosing zswap because it's considerably more sane than zram if you ever actually put shit in swap/try to put uncmpressible shit in swap
>>107876382>32gono need for swap
>>107876382I am. We all are. It comes enabled by default in the kernel
>>107877144for some reason, it's not enabled by default on Void x86_64-musl
legit asking why zswap rather than zram
>>107877249they're different technologieszram is a RAM-based block device that is intended to replace a swap device or swap filezswap speeds up physical swap by caching data in RAM until it becomes full, then writing to the physical swap zram = replaces swapzswap = serves as a kind of fast RAM-based cache that backs up to swap as needed
>>107876422just don't run out of RAM
>16GBno need for swap
>>107876382I've got 40 gigs of ram and all of that put into zram also>>107877302isn't zswap just compressed swap? what you're describing sounds like zram+zswap
Funny how my brain refuses to understand any of this, because it knows I have no use case for it.
>>107877418not exactly, zswap is compressed swap that is first stored in ram , and when the amount of compressed pages exceeds a defined limit, it is backed by actual swap, where as zram is not.
>>107877302What? Zram is just ram compressed by the OS. Most system configurations with zram (like fedora out of the box) use zram and swap.Compressing and decompressing memory adds overhead though. Compressing only stuff that lands on swap is zswap and is better if you have plenty of ram, and it improves SSD lifespan
>>107876382i don't need it
>>107877144>>107877246it's not enabled by default on debian either>>107877249https://wiki.archlinux.org/title/Zswap>zswap is a kernel feature that provides a compressed RAM cache for swap pages. Pages which would otherwise be swapped out to disk are instead compressed and stored into a memory pool in RAM. Once the pool is full or the RAM is exhausted, the least recently used (LRU) page is decompressed and written to disk, as if it had not been intercepted. After the page has been decompressed into the swap cache, the compressed version in the pool can be freed.>The difference compared to zram is that zswap works in conjunction with a swap device while zram with swap created on top of it is a swap device in RAM that does not require a backing swap device. as far as i understand they do similar stuff until the compressed partition or whatever in ram runs out of space. then they differ. zram does some process killing or whatever, and zswap writes out to old school swap. it does actually do some swapping back and forth if the pages are hot i think. the usecase for zswap over zram is i believe when you routinely go well over your ram and into swap. i use it on this craptop because it has 4 gigs of ram and just loading gnome takes like 2 gigs of it. i routinely have a couple hundred megs at least in the swap
>>107877509Why exactly wouldn't you just have both zram and zswap?
>>107877583they are different things for different purposes, zswap , system avoids performance penalty from exceeding ram size , without disabling swap in the event it is neededzram , replaces swap entirely, presumably for devices that don't have suitable storage for swap.the two wouldn't make sense to use together.also you owe me 10$ for using this reply to train your shitty bot.
>>107877705You don't need to disable swap when you enable zram.
>>107876422O rly? On my system with integrated gpu, zswap on causes some games to stutter and freeze up annoyingly all the time. With zswap off, it's buttery until the screen fills with projectiles or something, at which point the cpu speed is the bottleneck.
>>107877729zram acts as a swap device, meaning that you don't have to use real swap, where as zswap does need real swap.You can like you say use it in conjuction with a real swap device , since you can have as many swap devices as you please , but I'm not sure why you would want to do that instead of using zswap
>>107877249I use zram as well.
>>107877766"There's no reason to do that" is fair enough.
ive used zram a lotwhats zswap?
>>107876382i am running it. how did you get that output in pic related?
>>107877864I'm curious, why? Why would you want to use part of your RAM as swap, instead of just having more RAM and not needing to swap it in the first place?
>>107877509be seen by:>>107877864
>>107877884>be using zram>anon suggests getting more ram>ok i got more ram>...>still be using zswap
>>107877903I don't mean buy more ram, I mean that using zram means sacrificing some of your RAM to use as swap. I get zswap, it's compressed and it can be unloaded to disk swap, but I don't get zram, it seems to me like you're just jumping through hoops to get a worse result than simply not having swap
>>107877923zram is also compressed. if i have 8gb ram, and zram has a 2:1 compression, and i allocate 4gb to zram, i now effectively have 12gb ram. 4gb will be full speed, and 8gb will be slightly slower with some cpu overhead
It's enabled by default on Arch, so I am using it. (At least I don't remember enabling it myself.)
>>107878018zswap>Eviction (The "Write-Behind" Logic): If the zswap pool in RAM gets too full, it identifies the Least Recently Used (LRU) data, decompresses it, and moves it to the SSD.zram>he "LRU Inversion" Problem: This is the biggest drawback. Because they are separate devices, the "old" data that filled up your zram first stays in your fast RAM, while "newer" data (which might be more important) gets pushed to the slower SSD because the zram "disk" is already full.
>>107877583you are expressly not supposed to use both because they fuck each other up. you can use zram with a backing device (ie, old school swap) but it requies extra setup. zswap just works with your normal swap.
you guys still bother with swap?just set swappiness to 0 and it will only use swap when absolutely needed
>>107878498don't use 0
swap? more liek swap.avii've had swap completely disabled for years now and i have yet to have any issuesjust buy more ram fagets