Comment 12 for bug 1449678

Revision history for this message
Mélodie (meets) wrote :

Hi,

I have found a way to make it work right.

While zram was loaded, with one block device created only instead of two as I have a dual-core, and with a priority 100 instead of 5 as the zram-config brings I did this:

$ sudo swapoff /dev/zram0
$ sudo rmmod zram

then edited /etc/modprobe.d/blacklist.conf and added this:

blacklist zram

since the other day, I had no more zram loaded nor zram virtual device loaded. Just now I thought of a test while zram is not loaded at boot time:

$ sudo apt-get install zram-config
.......
.......
Réception de : 1 http://archive.ubuntu.com/ubuntu/ vivid-proposed/universe zram-config all 0.3.1 [4 266 B]
........
.......
$

$ sudo systemctl enable zram-config
$ sudo systemctl start zram-config
$

While I'm here: Could the zram-config script come with some outputs there? Confirmation "we have created a symlink blabla... " and after, "we have started zram-config successfully" ? That would be nice. :)

Result:
$ cat /proc/swaps
Filename Type Size Used Priority
/dev/sda6 partition 4607996 0 -1
/dev/zram0 partition 947216 0 5
/dev/zram1 partition 947216 0 5
$

Now it works as it's supposed to!

Some more tests to be sure, with the systemctl commands "status", "restart", "start", and "stop":

***************
[melodie@bento64:~]$ sudo systemctl status -l zram-config.service
● zram-config.service - Initializes zram swaping
   Loaded: loaded (/lib/systemd/system/zram-config.service; enabled; vendor preset: enabled)
   Active: active (exited) since dim. 2015-06-21 18:33:11 CEST; 9min ago
  Process: 4906 ExecStart=/usr/bin/init-zram-swapping (code=exited, status=0/SUCCESS)
 Main PID: 4906 (code=exited, status=0/SUCCESS)

juin 21 18:33:11 bento64 systemd[1]: Starting Initializes zram swaping...
juin 21 18:33:11 bento64 init-zram-swapping[4906]: Setting up swapspace version 1, size = 947216 KiB
juin 21 18:33:11 bento64 init-zram-swapping[4906]: pas d'étiquette, UUID=6c74759b-83cd-47a1-b911-f5242c125979
juin 21 18:33:11 bento64 init-zram-swapping[4906]: Setting up swapspace version 1, size = 947216 KiB
juin 21 18:33:11 bento64 init-zram-swapping[4906]: pas d'étiquette, UUID=3e6fce71-7773-40e4-9dcb-3dfe509ec23d
juin 21 18:33:11 bento64 systemd[1]: Started Initializes zram swaping.
[melodie@bento64:~]$ sudo systemctl restart zram-config
[melodie@bento64:~]$ sudo systemctl status -l zram-config.service
● zram-config.service - Initializes zram swaping
   Loaded: loaded (/lib/systemd/system/zram-config.service; enabled; vendor preset: enabled)
   Active: active (exited) since dim. 2015-06-21 18:43:44 CEST; 4s ago
  Process: 4985 ExecStop=/usr/bin/end-zram-swapping (code=exited, status=0/SUCCESS)
  Process: 4996 ExecStart=/usr/bin/init-zram-swapping (code=exited, status=0/SUCCESS)
 Main PID: 4996 (code=exited, status=0/SUCCESS)

juin 21 18:43:44 bento64 systemd[1]: Starting Initializes zram swaping...
juin 21 18:43:44 bento64 init-zram-swapping[4996]: Setting up swapspace version 1, size = 947216 KiB
juin 21 18:43:44 bento64 init-zram-swapping[4996]: pas d'étiquette, UUID=13e90b6a-1f85-40d3-b468-a77332c14f97
juin 21 18:43:44 bento64 init-zram-swapping[4996]: Setting up swapspace version 1, size = 947216 KiB
juin 21 18:43:44 bento64 init-zram-swapping[4996]: pas d'étiquette, UUID=1864b236-4b6f-433d-b3e3-5ae7c3b8a88a
juin 21 18:43:44 bento64 systemd[1]: Started Initializes zram swaping.
[melodie@bento64:~]$ sudo systemctl stop zram-config
[melodie@bento64:~]$ sudo systemctl status -l zram-config.service
● zram-config.service - Initializes zram swaping
   Loaded: loaded (/lib/systemd/system/zram-config.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since dim. 2015-06-21 18:44:00 CEST; 2s ago
  Process: 5031 ExecStop=/usr/bin/end-zram-swapping (code=exited, status=0/SUCCESS)
  Process: 4996 ExecStart=/usr/bin/init-zram-swapping (code=exited, status=0/SUCCESS)
 Main PID: 4996 (code=exited, status=0/SUCCESS)

juin 21 18:43:44 bento64 systemd[1]: Starting Initializes zram swaping...
juin 21 18:43:44 bento64 init-zram-swapping[4996]: Setting up swapspace version 1, size = 947216 KiB
juin 21 18:43:44 bento64 init-zram-swapping[4996]: pas d'étiquette, UUID=13e90b6a-1f85-40d3-b468-a77332c14f97
juin 21 18:43:44 bento64 init-zram-swapping[4996]: Setting up swapspace version 1, size = 947216 KiB
juin 21 18:43:44 bento64 init-zram-swapping[4996]: pas d'étiquette, UUID=1864b236-4b6f-433d-b3e3-5ae7c3b8a88a
juin 21 18:43:44 bento64 systemd[1]: Started Initializes zram swaping.
juin 21 18:44:00 bento64 systemd[1]: Stopping Initializes zram swaping...
juin 21 18:44:00 bento64 systemd[1]: Stopped Initializes zram swaping.
[melodie@bento64:~]$ sudo systemctl start zram-config
[melodie@bento64:~]$ sudo systemctl status -l zram-config.service
● zram-config.service - Initializes zram swaping
   Loaded: loaded (/lib/systemd/system/zram-config.service; enabled; vendor preset: enabled)
   Active: active (exited) since dim. 2015-06-21 18:44:18 CEST; 2s ago
  Process: 5031 ExecStop=/usr/bin/end-zram-swapping (code=exited, status=0/SUCCESS)
  Process: 5050 ExecStart=/usr/bin/init-zram-swapping (code=exited, status=0/SUCCESS)
 Main PID: 5050 (code=exited, status=0/SUCCESS)

juin 21 18:44:18 bento64 systemd[1]: Starting Initializes zram swaping...
juin 21 18:44:18 bento64 init-zram-swapping[5050]: Setting up swapspace version 1, size = 947216 KiB
juin 21 18:44:18 bento64 init-zram-swapping[5050]: pas d'étiquette, UUID=6ab6c3ad-6380-4190-af69-c9aedae3e1c2
juin 21 18:44:18 bento64 init-zram-swapping[5050]: Setting up swapspace version 1, size = 947216 KiB
juin 21 18:44:18 bento64 init-zram-swapping[5050]: pas d'étiquette, UUID=99b8b1d5-2873-43a4-9130-551000a5832f
juin 21 18:44:18 bento64 systemd[1]: Started Initializes zram swaping.
[melodie@bento64:~]$

***************

They all show it works correctly.

Again, after "restart" "stop" and "start" some confirmation messages for success would be nice.

One more: I'd like to have some direct mean to setup the size of the block devices to my liking. A /etc/default/zram configuration file for this purpose, for example, would be nice.

Best regards,
Mélodie