Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #187368

Re: How to use zram ?

From Pierre Couderc <pierre@couderc.eu>
Newsgroups linux.debian.user
Subject Re: How to use zram ?
Date 2017-09-28 16:50 +0200
Message-ID <uuIit-1KL-1@gated-at.bofh.it> (permalink)
References <uuDCa-7kq-15@gated-at.bofh.it> <uuDLR-7o2-47@gated-at.bofh.it> <uuEeS-7MF-11@gated-at.bofh.it> <uuFXk-sz-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On 09/28/2017 02:11 PM, David Baron wrote:
>>
>> ... But It seems to work :
>>
>> root@nous:~# modprobe zram num_devices=2
>> root@nous:~# zramctl --find --size 1024M
>> /dev/zram0
>> root@nous:~# zramctl --find --size 1024M
>> /dev/zram1
>> root@nous:~# free -th
>>                 total        used        free      shared buff/cache
>> available
>> Mem:           3.8G         73M        3.6G        5.5M 146M        3.5G
>> Swap:            0B          0B          0B
>> Total:         3.8G         73M        3.6G
>> root@nous:~# mkswap /dev/zram0
>> Setting up swapspace version 1, size = 1024 MiB (1073737728 bytes)
>> no label, UUID=66e3aa01-a4b8-4308-b317-608c6a072810
>> root@nous:~# free -th
>>                 total        used        free      shared buff/cache
>> available
>> Mem:           3.8G         73M        3.6G        5.5M 146M        3.5G
>> Swap:            0B          0B          0B
>> Total:         3.8G         73M        3.6G
>> root@nous:~# swapon /dev/zram0
>> root@nous:~# free -th
>>                 total        used        free      shared buff/cache
>> available
>> Mem:           3.8G         73M        3.6G        5.5M 147M        3.5G
>> Swap:          1.0G          0B        1.0G
>> Total:         4.8G         73M        4.6G
>> root@nous:~# mkswap /dev/zram1
>> Setting up swapspace version 1, size = 1024 MiB (1073737728 bytes)
>> no label, UUID=69b8070b-3b8d-4234-a773-a59812e54552
>> root@nous:~# swapon /dev/zram1
>> root@nous:~# free -th
>>                 total        used        free      shared buff/cache
>> available
>> Mem:           3.8G         74M        3.6G        5.5M 147M        3.5G
>> Swap:          2.0G          0B        2.0G
>> Total:         5.8G         74M        5.6G
>> root@nous:~#
>>
>> Now I suppose I shouls put that in a systemd script...
>>
>> Thank you very much.
>>
>> PC
> Did all this.
> All my free -th results looked the same.
> Could it be it was already there?
>
> Assuming there is an advantage to this, how does one get it going on startup.
> I HAD a sysinit script for it at one time, before the new days of systend.
>
I have decided to use the following script and it seems to work :

git  clone https://github.com/Jiab77/systemd-zram
cd systemd-zram
./install.sh

You can the remove systemd-zram directory.

Here you can modify /etc/systemd/zram.conf from 33% to 50 for next 
reboot… But it is only to adopt the same policy as Ubuntu,  but the 
original prefers 33%...





Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

How to use zram ? Pierre Couderc <pierre@couderc.eu> - 2017-09-28 11:50 +0200
  Re: How to use zram ? <tomas@tuxteam.de> - 2017-09-28 12:00 +0200
    Re: How to use zram ? Pierre Couderc <pierre@couderc.eu> - 2017-09-28 12:30 +0200
      Re: How to use zram ? <tomas@tuxteam.de> - 2017-09-28 14:10 +0200
      Re: How to use zram ? David Baron <dbaron770@gmail.com> - 2017-09-28 14:20 +0200
        Re: How to use zram ? Pierre Couderc <pierre@couderc.eu> - 2017-09-28 16:50 +0200
      Re: How to use zram ? Richard Owlett <rowlett@cloud85.net> - 2017-09-28 17:00 +0200
  Re: How to use zram ? <tomas@tuxteam.de> - 2017-09-28 16:00 +0200
    Re: How to use zram ? Gene Heskett <gheskett@shentel.net> - 2017-09-28 16:20 +0200
      Re: How to use zram ? <tomas@tuxteam.de> - 2017-09-28 16:40 +0200
        Re: How to use zram ? Gene Heskett <gheskett@shentel.net> - 2017-09-28 17:50 +0200
          Re: How to use zram ? Greg Wooledge <wooledg@eeg.ccf.org> - 2017-09-28 17:50 +0200
        Re: How to use zram ? Pascal Hambourg <pascal@plouf.fr.eu.org> - 2017-09-28 18:10 +0200
          Re: How to use zram ? <tomas@tuxteam.de> - 2017-09-28 19:20 +0200
      Re: How to use zram ? Pierre Couderc <pierre@couderc.eu> - 2017-09-28 17:00 +0200
        Re: How to use zram ? Nicholas Geovanis <nickgeovanis@gmail.com> - 2017-09-28 17:20 +0200
    Re: How to use zram ? Pascal Hambourg <pascal@plouf.fr.eu.org> - 2017-09-28 18:00 +0200
  Re: How to use zram ? Gene Heskett <gheskett@shentel.net> - 2017-09-28 16:00 +0200
    Re: How to use zram ? Pierre Couderc <pierre@couderc.eu> - 2017-09-28 17:00 +0200

csiph-web