[GTALUG] Fedora 33 uses RAM for swap?

D. Hugh Redelmeier hugh at mimosa.com
Wed Nov 25 09:35:31 EST 2020


| From: Giles Orr via talk <talk at gtalug.org>

| I didn't set that up, and I don't think it was there on F32.  So the
| OS has, without asking, co-opted 1/4 of my 16G of RAM to use as swap
| space.  This system has an SSD, so when I initially set it up (Fedora
| 27), I made a conscious decision to go without swap space.  I rarely
| push the limits of 16G.

[I'm aware of zswap but haven't looked into it.  I'm too pressed for
time to do the proper research.  So I'll hypothesize, using common
sense.]

This doesn't surprise me.  Except for the "without asking" part.

I hypothesize that you got this with a fresh install where you opted
for the installer to decide on partitioning.  If you tell it how to
partition, I hope it would not give you zswap without your direction.

The zswap is compressed.  So things moved there take less RAM than they
would without swapping.  (I hope that it notices when things are
incompressable and hence would save no space.)

I have no idea whether it is truly pre-allocated RAM or it is just a
limit and that the actual RAM tied up reflects usage.  I would hope
that it shrinks and grows as needed.

It may be that, in terms of RAM, this is a pure win.  In terms of CPU,
this is another matter.

| Can someone please explain
| A) if I'm correct about this behaviour in the first place, and

Check the F33 Release Notes?  (I have not.)

I've certainly seeen discussion about ZSwap.  Unfortunately, I've
mostly ignored it.  Other distros have it too.  I don't know whether
they automatically configure it on installation.

| B) why it's useful?  Thanks.

See above.

- for sure, some running processes are almost never actual run.  ZSwap
  is a win for those.  Unless latency maters.

- I assume that when zswap fills up, old-fashioned disk swap is used.
  In this case, zswap is a win over having only swap.

  You could think of zswap as a kind of cache or intermediate stage
  for disk swap.


More information about the talk mailing list