serverinfo icon indicating copy to clipboard operation
serverinfo copied to clipboard

Pi2 Nextcloud Box - Server Info monitoring places high load, skewing load & CPU stats

Open cpsemmens opened this issue 9 years ago • 3 comments

The server info page, showing CPU and memory usage, hammers the Pi2 CPU. At rest (only admin user logged in to the Files view and one ssh session open to run top) load is about 0.1 - 0.2. Opening the Admin page and selecting 'Server info' spawns some 6 or so php-fpm processes and causes the load to increase dramatically. Over the space of a couple of minutes the load rises to over 2.2 before dropping back to 1.5 over the next 5 minutes or so, CPU usage rising to 33% and staying pretty constant. This means that the system load imposed by the 'server info' page, so distort the actual system load as to make the information meaningless. Naturally, this is a function of the low power of the Pi2, but a simpler page would really help to give more meaningful information. The graphics are nice, but they seriously distort the data being presented.

cpsemmens avatar Oct 20 '16 10:10 cpsemmens

I think this app is just not designed to be used on such environments. All the script does is check CPU, memory and disk every second. So on an environment like a rPI it does more then everything else, because it would basically idle all the time.

nickvergessen avatar Dec 21 '16 13:12 nickvergessen

@schiessle what do you think

nickvergessen avatar Dec 21 '16 13:12 nickvergessen

My suggestion would be to increase the delay for slower machines. Instead of updating once a second, maybe something like each 5 seconds would also be sufficient enough.

patschi avatar Feb 08 '17 11:02 patschi

I suspect this has gotten significantly better since #297, #183, #57, and some others.

Also the passage of time has probably helped a bit here with average hardware capability increasing...

If someone wants to experiment with different intervals for the front-end on low capacity machines to try to come up with some semi-reasonable defaults for the update intervals they're here:

https://github.com/nextcloud/serverinfo/blob/735b9421b7f9ce35461c92ba13c95671cd981315/js/script.js#L123 https://github.com/nextcloud/serverinfo/blob/735b9421b7f9ce35461c92ba13c95671cd981315/js/script.js#L182 https://github.com/nextcloud/serverinfo/blob/735b9421b7f9ce35461c92ba13c95671cd981315/js/script.js#L287

If some better intervals are found for low power hardware then someone could use them to do a PR that integrates a way of detecting/determining when to use them (or maybe just tossing them behind a config switch?).

That or someone with a lower power machine can say this is no longer applicable. You still using a Pi 2 @cpsemmens? :-)

joshtrichards avatar Jun 06 '23 14:06 joshtrichards

Likely fixed by https://github.com/nextcloud/serverinfo/pull/174

kesselb avatar Jun 06 '23 14:06 kesselb