[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology

Name
Options
Comment
Verification
4chan Pass users can bypass this verification. [Learn More] [Login]
File
  • Please read the Rules and FAQ before posting.
  • You may highlight syntax and preserve whitespace by using [code] tags.

08/21/20New boards added: /vrpg/, /vmg/, /vst/ and /vm/
05/04/17New trial board added: /bant/ - International/Random
10/04/16New board for 4chan Pass users: /vip/ - Very Important Posts
[Hide] [Show All]


[Advertise on 4chan]


File: 1764721465061324.png (41 KB, 400x81)
41 KB
41 KB PNG
Why aren't you using zswap?
>>
>>107876382
I got 8 GB (enough) of RAM, so no swap, Zswap, Nswap or so needed
>>
>>107876410
There 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 RAM
Some people live in another world, I kept running out of memory at 16
>>
4gb ram is enough for me
>>
>>107876445
you gotta close some of your blacked.com tabs
>>
>>107876382
i do, lz4 compression
>>
File: 1759327256697.jpg (46 KB, 474x474)
46 KB
46 KB JPG
>>107876483
>>
>>107876382
i do use zswap
i'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
>32go
no need for swap
>>
>>107876382
I am. We all are. It comes enabled by default in the kernel
>>
File: shazhupan.png (113 KB, 1157x706)
113 KB
113 KB PNG
>>107877144
for some reason, it's not enabled by default on Void x86_64-musl
>>
legit asking why zswap rather than zram
>>
>>107877249
they're different technologies
zram is a RAM-based block device that is intended to replace a swap device or swap file
zswap speeds up physical swap by caching data in RAM until it becomes full, then writing to the physical swap
zram = replaces swap
zswap = serves as a kind of fast RAM-based cache that backs up to swap as needed
>>
>>107876422
just don't run out of RAM
>>
>16GB
no need for swap
>>
File: file.png (56 KB, 918x772)
56 KB
56 KB PNG
>>107876382
I've got 40 gigs of ram and all of that put into zram also
>>107877302
isn'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.
>>
>>107877418
not 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.
>>
>>107877302
What? 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
>>
>>107876382
i don't need it
>>
>>107877144
>>107877246
it's not enabled by default on debian either

>>107877249
https://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
>>
>>107877509
Why exactly wouldn't you just have both zram and zswap?
>>
>>107877583
they are different things for different purposes,
zswap , system avoids performance penalty from exceeding ram size , without disabling swap in the event it is needed

zram , 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.
>>
>>107877705
You don't need to disable swap when you enable zram.
>>
>>107876422
O 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.
>>
>>107877729
zram 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
>>
>>107877249
I use zram as well.
>>
>>107877766
"There's no reason to do that" is fair enough.
>>
ive used zram a lot
whats zswap?
>>
>>107876382
i am running it. how did you get that output in pic related?
>>
>>107877864
I'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?
>>
>>107877509
be seen by:
>>107877864
>>
>>107877884
>be using zram
>anon suggests getting more ram
>ok i got more ram
>...
>still be using zswap
>>
>>107877903
I 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
>>
>>107877923
zram 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



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.