06-30-2017, 10:47 AM
Well, Chrome/Chromium is known to be rather RAM-hungry, but I rarely see similar slowdowns on my chromebook, which has less CPU and the same amount of RAM. tweaking vm.swappiness in /etc/sysctl.conf might help but to be honest, with a 3GB total memory footprint I just don't see it.
There's a page over at Ask Ubuntu about the matter - https://askubuntu.com/questions/259739/k...lot-of-cpu
And while it may well help to
as suggested, I think the cron script shown is probably not the right solution on the Pinebook for the following reasons:
1> performance tanks and kswapd0 bogs down the system without getting anywhere near 90+% CPU and
2> aside from having to start a new process every minute, the script shown has to launch at least one or two more.
I would lean toward a very light daemon written in bourne/bash that compares the most recent run queue, as such:
against some minimum number that definitely indicates that the machine is struggling (probably 4 is a good number as there are 4 CPU cores and when kswapd0 is hogging CPU that number seems to easily spike above 10 despite seemingly modest CPU usage - however, you could adjust the aggressiveness of the script by lowering or raising this number) and if the awk-derived number is greater than it, then use that drop_caches command. Keep it resident and put it in a while loop with a sleep statement and I would think it would be more responsive and definitely more effective on our machines.
Still, I think such a script would have limited effectiveness if you are using RAM-heavy apps like Chromium. I will probably order a small USB thumb drive like the sandisk or samsung fit models, write a small script to be called from /etc/rc.local that fires up the swap on said drive only when connected and places it at a lower priority than the better optimized zram swap. make it 4 gigs or so and I'm pretty sure things will run better.
There's a page over at Ask Ubuntu about the matter - https://askubuntu.com/questions/259739/k...lot-of-cpu
And while it may well help to
Code:
cat 1 > /proc/sys/vm/drop_caches
1> performance tanks and kswapd0 bogs down the system without getting anywhere near 90+% CPU and
2> aside from having to start a new process every minute, the script shown has to launch at least one or two more.
I would lean toward a very light daemon written in bourne/bash that compares the most recent run queue, as such:
Code:
awk '{print $1}' /proc/loadavg
against some minimum number that definitely indicates that the machine is struggling (probably 4 is a good number as there are 4 CPU cores and when kswapd0 is hogging CPU that number seems to easily spike above 10 despite seemingly modest CPU usage - however, you could adjust the aggressiveness of the script by lowering or raising this number) and if the awk-derived number is greater than it, then use that drop_caches command. Keep it resident and put it in a while loop with a sleep statement and I would think it would be more responsive and definitely more effective on our machines.
Still, I think such a script would have limited effectiveness if you are using RAM-heavy apps like Chromium. I will probably order a small USB thumb drive like the sandisk or samsung fit models, write a small script to be called from /etc/rc.local that fires up the swap on said drive only when connected and places it at a lower priority than the better optimized zram swap. make it 4 gigs or so and I'm pretty sure things will run better.
------
it doesn't get happy
it doesn't get sad
it just runs programs
it doesn't get happy
it doesn't get sad
it just runs programs