Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Zram & SWAP - where is my memory?

Featured Replies

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?

Providing logs with 

armbianmonitor -u

 significantly raises chances that someone is looking at it.

 

// sent from mobile phone //

14 hours ago, Grass said:

Maybe i am doing something wrong?


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.

  • Author
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

  • Author

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

  • 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.  

 

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.