Sujet : Re: What do I need to go with a Pi 4
De : news (at) *nospam* druck.org.uk (druck)
Groupes : comp.sys.raspberry-piDate : 09. Apr 2024, 21:43:13
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <uv4991$efer$2@dont-email.me>
References : 1 2 3
User-Agent : Mozilla Thunderbird
On 09/04/2024 16:30, Adrian wrote:
In message <uv3jsh$l8h$1@dont-email.me>, David Taylor
<david-taylor@blueyonder.co.uk.invalid> writes
When you say "starting to struggle" what have you measured? Are you
running out of memory, CPU power, disk I/O, or network I/O? I think
it would be useful to know what exactly in your system needs changing.
The Pi is run headless in the normal way of things, but being able to
connect a keyboard, mouse and monitor is helpful for the initial set up.
I monitor (every minute), CPU usage and temperature, as well as free
memory (in addition to time to ping the router, space used on the SD
card and SSD, bytes in/out and logical block access on the SSD). I can
also see (using ls) how long it takes for the graphs (as png files) to
be created.
I do the similar data gathering on my 16 Raspberry Pi's (a mix of 0W,
02W, 2B, 3A, 3B, 3B+, 4B and 5B), each runs Python services which make
frequent readings of CPU and environment temperatures, network latencies
and various physical sensors and creates a rolling 15 minute average
with min and max values. They also run Python flask web servers allowing
all the data to be read every 15 minutes by a master Pi 4 using curl
commands (much faster than ssh'ing to each box).
Only the single core Pi Zeros show any significant latency when reading
a few dozen DS18B20 single wire temperature sensors, the Pi Zero 2W and
Pi 2B run at the same clock rate, but benefit from the extra cores.
On Sunday, I updated matplotlib (hoping, and failing, to fix a rendering
problem). The previous version was ~2.5 years old. Since then, the
time taken to generate graphs has risen enormously. What had taken ~5
minutes is now taking 12, which isn't good when you do it at a 10 minute
interval.
That's quite a lot of time for rendering. What I do is on the Pi is run
a Python uwsgi program which process all the data which has been stored
in sqlite3 databases, producing a bit of HTML and Javacript which
utilises google charts to the the plotting. The processing takes the Pi
4B under a second, and can plot the data itself in Chromium in a few
seconds, but I mainly access it from faster Linux boxes, where rendering
of the google charts in almost instant.
Perhaps you could also perform the rendering on a meatier machine too.
---druck