Re: Fedora 33 System-Wide Change proposal: swap on zram

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This laptop with 8GiB RAM is running two VMs at the same time: Windows
10 and Fedora Workstation 32. The host is Fedora Workstation 32. And
there is only swap-on-zram sized to 50% RAM. At this compression
ratio, it wouldn't ever end up using more than 25% RAM. I don't expect
to hold a compression ratio of nearly 3:1 over time, the initial
evictions seem to be pretty highly compressible. Not sure why that is.
Anyway 2:1 is a fairly safe bet for the general case.

$ free -m
              total        used        free      shared  buff/cache   available
Mem:           7863        7038         131          30         693         529
Swap:          3930         778        3152
$ swapon
NAME       TYPE      SIZE USED PRIO
/dev/zram0 partition 3.9G 778M   -2
$ zramctl
NAME       ALGORITHM DISKSIZE  DATA  COMPR  TOTAL STREAMS MOUNTPOINT
/dev/zram0 lzo-rle       3.9G  777M 240.4M 249.6M       8 [SWAP]
$

In this example, the system evicts 777M, at a cost of 250M, for a
total gain of ~527M.

Quit all VM's...

$ free -m
              total        used        free      shared  buff/cache   available
Mem:           7863         678        6283          30         901        6892
Swap:          3930         229        3701
$ swapon
NAME       TYPE      SIZE   USED PRIO
/dev/zram0 partition 3.9G 229.5M   -2
$ zramctl
NAME       ALGORITHM DISKSIZE   DATA COMPR  TOTAL STREAMS MOUNTPOINT
/dev/zram0 lzo-rle       3.9G 228.6M   74M 105.1M       8 [SWAP]
$

We see here that it has free'd up swap and memory, having dropped
pages in swap. But there is some zram metadata overhead that is not
dropped for whatever reason. But the net gain is still better than
50%.

--
Chris Murphy
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux