WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: zswap not enabled by default?  (Read 6097 times)

Offline nitram

  • Hero Member
  • *****
  • Posts: 1054
zswap not enabled by default?
« on: September 14, 2016, 10:50:01 AM »
In dCore-jessie zswap does not appear enabled by default. Nothing in dmesg and no zswap listed in /sys/module/. This appears different from TC6 where zswap is active at boot. Is there a kernel module or something i need to activate?

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: zswap not enabled by default?
« Reply #1 on: September 14, 2016, 11:12:40 AM »
I disabled zswap in tc-config in the early days of dCore as there was an issue then, been meaning to revisit it.   I will soon.

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: zswap not enabled by default?
« Reply #2 on: September 14, 2016, 09:30:06 PM »
Tested and commands and setup a zram swap on both kernels 3.16.6-tinycore and 4.2.9-tinycore.  I will upload the corrections and without the "nozswap" boot code, zram swap will be used.


Offline nitram

  • Hero Member
  • *****
  • Posts: 1054
Re: zswap not enabled by default?
« Reply #3 on: September 15, 2016, 01:42:45 AM »
Pretty fast turn-around, thanks! First test boot with zswap, dmesg indicates zswap, free -m reflects the addtional swap and system appears to be functioning as expected. One thing i noticed, however, is the /etc/fstab output. There is no space/line seperation for /dev/zram. Maybe just cosmetic, anywhoo just wanted to report, thanks.
Code: [Select]
devtmpfs       /dev         devtmpfs mode=0755,nosuid    0     0/dev/zram0  swap         swap    defaults,noauto   0       0

Offline netnomad

  • Hero Member
  • *****
  • Posts: 1026
Re: zswap not enabled by default?
« Reply #4 on: September 15, 2016, 02:07:17 AM »
works fine for me, too! :-)

no cosmetic problem for me:

user@dcore:~$ cat /etc/fstab
# /etc/fstab
proc            /proc        proc    defaults          0       0
sysfs           /sys         sysfs   defaults          0       0
devtmpfs       /dev         devtmpfs mode=0755,nosuid    0     0
/dev/zram0  swap         swap    defaults,noauto   0
/dev/sdb1       /mnt/sdb1       vfat     noauto,users,exec,umask=000 0 0 # Added by TC
/dev/sdb2       /mnt/sdb2       ext3     noauto,users,exec    0 0 # Added by TC
/dev/sr0        /mnt/sr0        auto     noauto,users,exec    0 0 # Added by TC

Offline nitram

  • Hero Member
  • *****
  • Posts: 1054
Re: zswap not enabled by default?
« Reply #5 on: September 15, 2016, 11:55:29 AM »
Still an issue on reboot but does appear cosmetic only. Not sure which dCore you're using netnomad. My system is dCore-jessie (3.16.6-tinycore). Not sure it matters, booting with kernel modules:
  graphics-3.16.6-tinycore
  alsa-modules-3.16.6-tinycore
  netfilter-3.16.6-tinycore

For context, should have pasted the entire fstab:
Code: [Select]
tc@box:~$ cat /etc/fstab
# /etc/fstab
proc            /proc        proc    defaults          0       0
sysfs           /sys         sysfs   defaults          0       0
devtmpfs       /dev         devtmpfs mode=0755,nosuid    0     0/dev/zram0  swap         swap    defaults,noauto   0       0
/dev/sda1       /mnt/sda1       ntfs-3g  noauto,users,exec    0 0 # Added by TC
/dev/sda2       /mnt/sda2       ext3     noauto,users,exec    0 0 # Added by TC
/dev/sda5       none            swap     defaults             0 0 # Added by TC
/dev/sdb1       /mnt/sdb1       ext2     noauto,users,exec    0 0 # Added by TC
/dev/sdb2       /mnt/sdb2       ntfs-3g  noauto,users,exec    0 0 # Added by TC
/dev/sdb3       /mnt/sdb3       ext2     noauto,users,exec    0 0 # Added by TC
/dev/sdb4       /mnt/sdb4       ext2     noauto,users,exec    0 0 # Added by TC
/dev/sr0        /mnt/sr0        auto     noauto,users,exec    0 0 # Added by TC


Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: zswap not enabled by default?
« Reply #6 on: September 15, 2016, 01:42:42 PM »
I will look into the cosmetic issue, thanks.

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: zswap not enabled by default?
« Reply #7 on: September 17, 2016, 11:56:52 PM »
Cosmetic issue should be fixed in latest RC.

Offline nitram

  • Hero Member
  • *****
  • Posts: 1054
Re: zswap not enabled by default?
« Reply #8 on: September 18, 2016, 05:32:06 AM »
The line seperated zram entry is much more readable. Minor spacing issue but essentially fixed. Thanks again.
Code: [Select]
# /etc/fstab
proc            /proc        proc    defaults          0       0
sysfs           /sys         sysfs   defaults          0       0
devtmpfs       /dev         devtmpfs mode=0755,nosuid    0     0
/dev/zram0  swap         swap    defaults,noauto   0       0
/dev/sda1       /mnt/sda1       ntfs-3g  noauto,users,exec    0 0 # Added by TC
/dev/sda2       /mnt/sda2       ext3     noauto,users,exec    0 0 # Added by TC
/dev/sda5       none            swap     defaults             0 0 # Added by TC
/dev/sdb1       /mnt/sdb1       ext2     noauto,users,exec    0 0 # Added by TC
/dev/sdb2       /mnt/sdb2       ntfs-3g  noauto,users,exec    0 0 # Added by TC
/dev/sdb3       /mnt/sdb3       ext2     noauto,users,exec    0 0 # Added by TC
/dev/sdb4       /mnt/sdb4       ext2     noauto,users,exec    0 0 # Added by TC
/dev/sr0        /mnt/sr0        auto     noauto,users,exec    0 0 # Added by TC

Offline nitram

  • Hero Member
  • *****
  • Posts: 1054
Re: zswap not enabled by default?
« Reply #9 on: September 18, 2016, 11:51:52 PM »
Impeccable !

Code: [Select]
tc@box:~$ cat /etc/fstab
# /etc/fstab
proc            /proc           proc     defaults             0 0
sysfs           /sys            sysfs    defaults             0 0
devtmpfs        /dev            devtmpfs mode=0755,nosuid     0 0
/dev/zram0      swap            swap     defaults,noauto      0 0
/dev/sda1       /mnt/sda1       ntfs-3g  noauto,users,exec    0 0 # Added by TC
/dev/sda2       /mnt/sda2       ext3     noauto,users,exec    0 0 # Added by TC
/dev/sda5       none            swap     defaults             0 0 # Added by TC
/dev/sdb1       /mnt/sdb1       ext2     noauto,users,exec    0 0 # Added by TC
/dev/sdb2       /mnt/sdb2       ntfs-3g  noauto,users,exec    0 0 # Added by TC
/dev/sdb3       /mnt/sdb3       ext2     noauto,users,exec    0 0 # Added by TC
/dev/sdb4       /mnt/sdb4       ext2     noauto,users,exec    0 0 # Added by TC
/dev/sr0        /mnt/sr0        auto     noauto,users,exec    0 0 # Added by TC