DesktopECHO / Pi-hole-for-Android

Pi-hole/Unbound Raspbian APK Installer for Android 5.0+ devices (requires root)
415 stars 33 forks source link

Number of cpu cores not recognized, resulting in numerous high load notifications #19

Closed x2k13 closed 2 years ago

x2k13 commented 2 years ago

My setup: Samsung Galaxy S4 (GT-I9505) (Snapdragon 600, quadcore SoC) crDroid 7.21 (LOS 18.1/Android 11) Magisk 25.2 Linux Deploy 2.60 BusyBox (meefik) 1.34.1

Pi-hole is set up and running, resolving & blocking, all good so far.

The only thing that's a bit frustrating is the constantly popping up "high load" notifications.

It seems that Pi-hole (or one of its sub-systems) doesn't recognize all usable cores provided by the device, like 1 cpu/4 cores, instead sees just 1 cpu/1 core but the load values indicate that all cores are indeed used, but somehow Pi-hole doesn't understand this and panics because the 1 cpu/1 core it sees is always on ~4x load.

Any ideas how to change this behaviour? I don't have that on a RPi running Pi-hole.

Thank you for your time and effort!

Screenshot_20220913-072904_Vivaldi Browser

DesktopECHO commented 2 years ago

Hi... looks like a similar issue reported here: https://github.com/DesktopECHO/Pi-hole-for-Android/issues/2

Some Android devices will show strange load averages even if the device isn't busy.

x2k13 commented 2 years ago

Good to know. When I check average load on DevCheck, it correctly shows load values of all 4 cores. Might be interesting to find out what in the tool chain (Linux Deploy?) is having problems with handing that info over to Pi-hole, though. Anyway, thanks for the reply!

DesktopECHO commented 2 years ago

Turns out there's an option to disable FTL load average checking, it's easy enough to deal with:

Edit /usr/local/bin/p4a-install

Go to the # Fixups section and add the following line:

sed -i 's/config.check.load = read_bool(buffer, true)/config.check.load = read_bool(buffer, false)/g' src/config.c

x2k13 commented 2 years ago

Thanks for the detailed info! 🙂