OE compile 1,662 packages in 1 day, 16 hours and 15 minutes
Amazing. I posted in December 20, 2022, compiling the packages
for the Kirkstone-series in OpenEmbedded, on an Acer Ryzen5
laptop, and it took 4 days and 3 hours
to compile 1,620 packages:
https://bkhome.org/news/202212/radical-experiment-to-cool-the-laptop.html
Since then, I replaced the 8GB RAM module with 16GB, giving a
total of 24GB, of which about 4GB has to be taken away as it is
used by the GPU.
I haven't accurately timed a complete OE build with that extra RAM
(and tweak of CPU clock speed and number of cores), but did do a
complete recompile and it was a similar time, maybe a little bit
quicker.
One of the reasons I bought that laptop was so could just let the
OE compile chug away, no matter how long it takes, and my main
workhorse PC is free for normal use.
However, after a recent holiday in Brisbane, have been rethinking
the strategy. I took that laptop along. It has a 1TB NVME SSD, and
I found really didn't have everything I wanted on it.
Another holiday coming soon, about 3 weeks, and this time want to
have everything, absolutely everything, on a SSD. All of my
projects, especially the OE builds, may require up to 3TB, so I
bought a 4TB SSD.
I bought a Samsung 870 EVO 4TB SATA3 SSD and put it into a USB
type-c 3.1 gen1 caddy.
Why not buy a NVME SSD? Well, the main reason is that NVME SSDs
draw about twice the power of a same-capacity SATA SSD, about 8W
versus 4W. A lot of variation on those figures, they are just
ball-park approximations. NVME SSDs run hot!
Having a background as an electrical engineer, I am acutely aware
of the current limitations of those tiny USB plug/socket contacts.
Even though they are rated higher, I do not want to draw more than
about 1A. Probably less.
For that reason, I would prefer to stay with a SATA SSD. It's just
my thing, feel more comfortable sucking less current out of the
USB socket.
My Lenovo Ideacentre desktop PC has two USB type-a 3.1 gen2
sockets. The caddy I have used is only gen1. Gen1 has a data
transfer speed of 500MB/sec, whereas gen2 is about 1,000MB/sec
(that's bytes, not bits). Now, SATA3 can only do 600MB/sec, and
the 870 EVE SSD is claimed to do a bit less than that; sequential
read 560MB/sec and sequential write 530MB/sec.
So it would seem that the 3.1 gen1 USB caddy is a good match for
the SSD speed. Though, I think that the negotiating between the
two will result in a slower throughput. This means that a 3.1 gen2
caddy would probably be better, would allow the SATA3 interface to
go full-blast.
However, the local computer parts shop does not stock a 3.1 gen2 caddy. They do have a 3.2 gen2 caddy, which, if memory serves me right, can do about 2,000MB/sec. But, also if memory serves me right, 3.2 must have type-c sockets on both ends. No no, I just checked at Tom's Hardware:
https://www.tomshardware.com/news/usb-3-2-explained
...this has refreshed my memory. gen2, regardless of being 3.1 or
3.2, is 1,000MB/sec. It is gen2x2 that does 2,000MB/sec (and must
have usbc-c sockets on both ends).
So, will pop down to the local computer parts shop soon and buy
the gen2 caddy. But for now, using the gen1 caddy to do the OE
compile. Which brings me to the surprising result as stated in the
title of this post...
This new 4TB SSD has a 63MiB fat16 boot partition, about 3.5TiB
ext4, and some small ext4 partitions for installing various OSs --
I did that with Gparted. The fat16 partition has the Limine
booloader. I have got EasyOS Kirkstone 5.1.1 and Dunfell 4.5.5
installed in the third partition.
To keep this post fairly short, will do a follow-up as to why a
complete OE recompile was required. For this post, just reporting
on how long it took.
I booted the 4TB SSD on the Lenovo Ideacentre. This has a Intel
i3 8th gen CPU and 32GB RAM, and a 62GB swap partition on an
internal NVME SSD.
This time, 1,662 packages were compiled, more than before. The
build took 1 24-hour day, 16 hours and
15 minutes. Why so much faster? That's incredibly
faster!
The build on the laptop was on an internal NVME SSD, and even if
it is a budget SSD it is going to be faster than a SATA3 SSD. You
would think so, but then, that Samsung 870 EVO has marvelous
features. Apart from top-of-the-range speed, for SATA anyway, it
also has a long life -- 2,400TBW -- that's the number of terabytes
that can be written to it before it dies. I did some maths on that
-- you would have to write 1.3TB to it every day for 5 years to
kill it. Anyway, I digress; why is the OE build time so quick?
The Lenovo has 32GB RAM, versus 24GB on the laptop. CPU speed
would have to be a factor. Then there is RAM bus-width. Anyway, it
is good. If I buy a 3.1 gen2 caddy, the build is likely to be even
faster. In the past, I have always thought of the USB interface as
being a speed-bottleneck, but that is not the case. Now, the
limitation is the SATA3 interface.
Ah, there is one other difference. After partitioning the 4TB SSD
with Gparted, I disabled the ext4 journal in the 3.5TB partition:
# tune2fs -O ^has_journal /dev/sdb2
...apart from the fact that I am increasingly considering the
ext4 journal as unnecessary, the lack of journal is going to
reduce writes and reduce compile time. The NVME SSD in the laptop
has the journal enabled.
The intention now is to bootup from the 4TB SSD on every
computer, not just when on holiday. When at home, will leave it
permanently plugged into the Lenovo PC. When away from home, just
take the SSD along. No more issues with syncing between different
machines, but of course will still have to do backups. That's the
plan anyway.
Tags: easy