Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Earlyoom works only with zram ? #307

Open
Augusto7743 opened this issue Feb 16, 2024 · 3 comments
Open

Earlyoom works only with zram ? #307

Augusto7743 opened this issue Feb 16, 2024 · 3 comments
Labels

Comments

@Augusto7743
Copy link

Hello.
Thanks for reading my topic.

I want understand if is possible configure Earlyoom for works only when zram is 10 % free and not needing any ram percentage settings.

The configuration below not works
EARLYOOM_ARGS="-s 10,10 -r 0"

What is the correct configuration ?
Have an nice day.

@rfjakob
Copy link
Owner

rfjakob commented Apr 9, 2024

Is zram reported as swap? What does free report?

@Augusto7743
Copy link
Author

Augusto7743 commented Apr 10, 2024

Thanks for your reply.

cat /proc/meminfo

MemTotal: 4010556 kB
MemFree: 151892 kB
MemAvailable: 1422776 kB
Buffers: 24 kB
Cached: 1573952 kB
SwapCached: 1516 kB
Active: 2345580 kB
Inactive: 638028 kB
Active(anon): 1466864 kB
Inactive(anon): 76332 kB
Active(file): 878716 kB
Inactive(file): 561696 kB
Unevictable: 12408 kB
Mlocked: 12408 kB
SwapTotal: 2935804 kB
SwapFree: 2072316 kB
Zswap: 0 kB
Zswapped: 0 kB
Dirty: 52 kB
Writeback: 0 kB
AnonPages: 1420640 kB
Mapped: 693088 kB
Shmem: 126852 kB
KReclaimable: 65972 kB
Slab: 206956 kB
SReclaimable: 65972 kB
SUnreclaim: 140984 kB
KernelStack: 11920 kB
PageTables: 26752 kB
SecPageTables: 0 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 4941080 kB
Committed_AS: 5826280 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 95768 kB
VmallocChunk: 0 kB
Percpu: 6528 kB
HardwareCorrupted: 0 kB
AnonHugePages: 0 kB
ShmemHugePages: 0 kB
ShmemPmdMapped: 0 kB
FileHugePages: 0 kB
FilePmdMapped: 0 kB
Unaccepted: 0 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
Hugetlb: 0 kB
DirectMap4k: 692928 kB
DirectMap2M: 3500032 kB
DirectMap1G: 0 kB

command report
zramctl

NAME ALGORITHM DISKSIZE DATA COMPR TOTAL STREAMS MOUNTPOINT
/dev/zram0 lzo-rle 2,8G 813,9M 272,1M 301,6M 6 [SWAP]

DISKSIZE is total maximum data allowed to be compressed not being exactly the total buffer size in ram.
DATA is total data swapped in zram buffer.
TOTAL is the RAM memory area used for compression buffer.
Streams number of cpu core allowed to compress and decompress data.

@jmakov
Copy link

jmakov commented Jun 27, 2024

With ZRAM, earlyoom is unexpectedly killing processes with the setting EARLYOOM_ARGS="-s 5":
earlyoom[895]: mem avail: 0 of 3 MiB ( 0.00%), swap free: 500283 of 773101 MiB (64.71%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants