geckolinux / geckolinux-project

GeckoLinux bug tracker and documentation
https://geckolinux.github.io
209 stars 17 forks source link

earlyoom spamming the logs #289

Closed b3taman closed 2 years ago

b3taman commented 2 years ago

After making the (major) decision to switch to openSUSE for everything I was very happy to discover GeckoLinux, especially to use for my parents-in-law in an old age home, since KDE is now relatively light-weight, it has the requisite eye candy for my iPad-using mother-in-law, and their ancient ex-XP box should be sufficient to run it all, even though it has only 4 GB RAM (usage limited pretty much to watching YouTube in Firefox).

Just before delivery I discovered this line every three seconds in the journal:

Oct 09 08:00:13 joplin earlyoom[925]: mem avail:  2398 of  3633 MiB (66 %), swap free: 4145 of 4145 MiB (100 %)

Between 04:59:41 and 08:00:13 there were 3,611 such entries in the journal, but system resources seemed absolutely fine to me:

# free
              total        used        free      shared  buff/cache   available
Mem:        3720708      865884     1690988      174416     1163836     2406792
Swap:       4244988           0     4244988

# df -h
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        4.0M     0  4.0M   0% /dev
tmpfs           1.8G     0  1.8G   0% /dev/shm
tmpfs           727M   82M  646M  12% /run
tmpfs           4.0M     0  4.0M   0% /sys/fs/cgroup
/dev/sda1       150G  8.6G  140G   6% /
/dev/sda1       150G  8.6G  140G   6% /swap
/dev/sda1       150G  8.6G  140G   6% /home
tmpfs           364M   40K  364M   1% /run/user/1000
tmpfs           364M   32K  364M   1% /run/user/0

top reported load average: 0.00, 0.05, 0.06, so what is going on with earlyoom and its defaults?

geckolinux commented 2 years ago

Hi there, thanks for the reporting this, and I'm glad that GeckoLinux and openSUSE are otherwise meeting your needs.

The earlyoom log thing is indeed rather irritating, although it's just a harmless report, not a warning. I found the same report here: https://github.com/rfjakob/earlyoom/commit/e1c74d918c3951e0ec20bd8817ab55530e020491 Since Leap uses an older version of earlyoom that improvement isn't included yet by default. But it can be adjusted in the /etc/sysconfig/earlyoom file, change the number after -r to something much higher or put 0 to disable the log report completely.

b3taman commented 2 years ago

Thank you! My file had -f 3, which is hardly useful except, perhaps, in testing.

I changed it to every 5 minutes (-r 300) and ran systemctl restart earlyoom, which unfortunately put the following in the journal:

Oct 09 15:10:36 joplin earlyoom[4678]: Could not set priority: Permission denied. Continuing anyway
Oct 09 15:10:36 joplin earlyoom[4678]: Could not set oom_score_adj: Permission denied. Continuing anyway

It seems to be working, but those two errors were unexpected.