Zram


#1

Please add zram support for Vero 4k

thx


#2

What are you doing that would need that much memory? The 4K should have more than enough.


#3

Nothing special, just a big database.
3409 movies, 10072 TV episodes, 333276 songs, 22326 musicvideos

              total           used            free         shared  buff/cache   available
Mem:        1832388     1635216       65660        3700      131512      101624
Swap:       2097148       52328     2044820

total 468840
-rwxrwxrwx 1 root root 28672 Aug 9 19:20 ADSP0.db
-rwxrwxrwx 1 root root 1765376 Aug 9 20:16 Addons27.db
drwxrwxrwx 2 root root 4096 May 19 07:47 CDDB
-rwxrwxrwx 1 root root 16826368 Aug 10 06:31 Epg11.db
-rwxrwxrwx 1 root root 279015424 Aug 9 19:20 MyMusic72.db
-rwxrwxrwx 1 root root 72491008 Aug 9 20:15 MyVideos110.db
-rwxrwxrwx 1 root root 122880 Aug 9 19:20 TV32.db
-rwxrwxrwx 1 root root 38965248 Aug 10 06:31 Textures13.db
-rwxrwxrwx 1 root root 20480 Aug 9 19:20 ViewModes6.db
-rwxrwxrwx 1 root root 70844416 Aug 9 20:16 emby.db


#4

We need to figure out what is using your memory, while you still have about 101M free, that seems low. Mine runs with about 760M free.

Before doing anything, you should turn swap off as that will cause extra wear on the eMMC, possibly leading to an early death of the 4K.

Posting logs may help us see what you have that could be using memory.

Try looking at top to get an idea of what process is using the memory.

If it is the database causing the problem, you might consider switching to a MySQL database.


#5

Hi,

As @bmillham says, it’s quite surprising to see a request for zram when the device has 2GB of memory.

I’ve added ZRAM support as per your request:

It will be in the next update.

Sam


#10

Thank you :slight_smile:
I will also investigate if the ram usage is based on an issue, or just normal behaviour under my special circumstances.


#11

I tried a couple of workaround to save memory, but still running out.

zram is not stable. I guess caused of the really old kernel…

[ 190.692476] Call trace:
[ 190.692482] [] memcpy+0x110/0x180
[ 190.692486] [] zram_make_request+0x1fc/0x2e8 [zram]
[ 190.692492] [] generic_make_request+0x90/0x118
[ 190.692496] [] submit_bio+0x88/0x190
[ 190.692501] [] __swap_writepage+0x1b4/0x258
[ 190.692505] [] swap_writepage+0x4c/0xb8
[ 190.692509] [] shrink_page_list+0x610/0x918
[ 190.692513] [] shrink_inactive_list+0x1b4/0x560
[ 190.692516] [] shrink_lruvec+0x308/0x5b8
[ 190.692519] [] shrink_zone+0x6c/0x1a8
[ 190.692522] [] balance_pgdat+0x340/0x560
[ 190.692525] [] kswapd+0x15c/0x3c0
[ 190.692530] [] kthread+0xd4/0xf0
[ 190.692534] Code: a8c12027 a8c12829 a8c1302b a8c1382d (a88120c7)
[ 190.692539] —[ end trace 76eab16c503422c7 ]—


#12

Hi,

I suggest you provide some logs:

How to submit a useful support request - General - OSMC

It may shed some light on why you have such high ram usage.

Thanks Tom,.


#14

The issue is not the high ram usage, cause this is just related to massive databases.
3840 movies, 12136 tvshows, 22578 musicvideos and 332844 songs.


#15

Without logs, we have no way to help you further. Please supply them so we can help!


#16

I can think of compressed pages being a problem about a year ago, but you’d need to be on a very old version of OSMC (middle of 2017 IIRC) for this to be an issue.

Sam