Zram & SWAP - where is my memory?


Recommended Posts

Hi!

OS - Armbian bionic

Board - Orange pi one

I dont understand where goes 20-25% of 512mb ram.

 

18MB goes to video and wlan share. OK...

 

root@OrangePiPBX:~# zramctl
NAME       ALGORITHM DISKSIZE  DATA COMPR TOTAL STREAMS MOUNTPOINT
/dev/zram1 lzo          98.2M 19.8M 10.2M   11M       4 [SWAP]
/dev/zram0                50M 17.7M  2.5M  2.9M       4 /var/log

 

Now we see - 150MB go's to swap and small partition for "logs".

 

root@OrangePiPBX:~# free
                         total        used        free      shared      buff/cache      available
Mem:         502932      242376       26380   20008      234176      232640
Swap:        100584       21504       79080
Here we see ram now in total(used and free) - 250MB

250+150 = 400

 

And now... can someone answer me - where is my 100MB ram?

 

Here is config for ZRAM:

nano /etc/default/armbian-zram-config

ENABLED=true

ZRAM_PERCENTAGE=20

 

Here is config for Ram-log:

nano /etc/default/armbian-ramlog

ENABLED=true
SIZE=50M
USE_RSYNC=true

 

root@OrangePiPBX:~# df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            177M     0  177M   0% /dev
tmpfs            50M  5.4M   44M  11% /run
/dev/mmcblk0p1  7.1G  3.8G  3.3G  54% /
tmpfs           246M     0  246M   0% /dev/shm
tmpfs           5.0M   12K  5.0M   1% /run/lock
tmpfs           246M     0  246M   0% /sys/fs/cgroup
tmpfs           246M  380K  246M   1% /tmp
/dev/zram0       49M   18M   28M  40% /var/log
tmpfs            50M     0   50M   0% /run/user/0
 

That's all.

Maybe i am doing something wrong?

Link to post
Share on other sites
Donate and support the project!

6 hours ago, Tido said:

Providing logs with 


armbianmonitor -u

 significantly raises chances that someone is looking at it.

 

// sent from mobile phone //

Here is output:

http://ix.io/25rM

 

3 hours ago, Igor said:


Probably not. Kernel is changing, features are added, something that we might not want gets in by mistake. I suspect 3D driver reservations or just something, which could be seen from the logs. Or not and a deep investigation is needed.

I think i have a problem with some default settings of Zram.

Like i see in doc's - Zram and swap is "preninstalled". And from first run i have only 50% of RAM

Link to post
Share on other sites

One more interesting thing!

nano /etc/default/armbian-zram-config

ENABLED=true

#ZRAM_PERCENTAGE=20

i comment ZRAM_PERCENTAGE=20

and what we see now:

root@OrangePiPBX:~# swapon --show
NAME       TYPE        SIZE USED PRIO
/dev/zram1 partition 245.6M   0B    5

 

root@OrangePiPBX:~# zramctl
NAME       ALGORITHM DISKSIZE  DATA COMPR TOTAL STREAMS MOUNTPOINT
/dev/zram1 lzo         245.6M    4K   78B   12K       4 [SWAP]
/dev/zram0                50M 21.2M  2.9M  3.4M       4 /var/log

 

 

root@OrangePiPBX:~# df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            177M     0  177M   0% /dev
tmpfs            50M  1.7M   48M   4% /run
/dev/mmcblk0p1  7.1G  3.8G  3.3G  54% /
tmpfs           246M     0  246M   0% /dev/shm
tmpfs           5.0M   12K  5.0M   1% /run/lock
tmpfs           246M     0  246M   0% /sys/fs/cgroup
tmpfs           246M  4.0K  246M   1% /tmp
/dev/zram0       49M   22M   24M  48% /var/log
tmpfs            50M     0   50M   0% /run/user/0

Link to post
Share on other sites
  • Igor locked this topic
  • Igor unlocked this topic

Same issue here on Bullseye beta on N2+.    If a new thread is wanted just say so.

Armbian 20.11.0-trunk.9 Bullseye with Linux 5.8.12-meson64

 

df -h shows no /dev/zram(x)    zramctl shows nothing    same for fdisk -l     swap.target is active loaded.

sudo nano /etc/default/armbian-zram-config  ENABLED=TRUE  is only param set here.

 

Per Igor request:   armbianmonitor -u    at       http://ix.io/2z9h

 

All I got.  Any ideas to get this running ?

 

EDIT:  May be this  wasn't run at some point      sudo systemctl start  armbian-zram-config

 

per this thread https://forum.armbian.com/topic/15268-zswap-or-zram

 

I'll call this fixed after a few tweaks to the armbian-zram-config file.  

 

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...