On Thu, 5 May 2022 18:47:48 -0000 (UTC), alister wrote:
On Wed, 4 May 2022 21:23:19 -0000 (UTC), Martin Gregorie wrote:
On Wed, 4 May 2022 18:14:53 -0000 (UTC), alister wrote:
try Free -h so see how much memory is used the amount of swap used on
You can also see this information on the 'top' display along with other
useful stuff about what process(es) are hogging memory and/or CPU time
and how much memory is being occupied by file buffering (often more
than is occupied by executable code).
Linux is designed to use spare memory as buffers whenever possible,
it is released if it is needed for other purposes.
Of course: I thought that was worth pointing out because it can be a
surprise to a Linux newbie. Its also where the speed comes from, and is particularly noticeable when writing code in C or Java on a slowish
machine with a decent amount of RAM, say an i5-based laptop with 8GB RAM.
The first compilation in a code writing session can be very much faster
than subsequent recompiles because the first one needs to load make, the C compiler and linker (or the JVM, ant and the Java compiler) as well as the source code, while subsequent compiler runs will be anything up to 400%
faster because the compiler chain binaries and the source files you're
working on will still be in RAM from the previous compilation run.
I've timed it for Java: one fairly large project (a duty roster building
visual application for a sport club took noticeably longer for the first compilation of the day. I got intriqued, so I measured it to be sure it
wasn't a subjective effect by running the compilation under 'time'. It was real: the first compilation of the day took 4 seconds and subsequent compilations took less than a second.
That said, I don't see the same speedup effect on any Pi I use, but I
don't have a Pi 4, but I would expect to see it on a Pi 4 that is maxed-
out on RAM.
--
--
Martin | martin at
Gregorie | gregorie dot org
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)