Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Gentoo on ARM is painful without a fast storage device.
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM
View previous topic :: View next topic  
Author Message
crocket
Guru
Guru


Joined: 29 Apr 2017
Posts: 558

PostPosted: Wed Sep 23, 2020 1:10 am    Post subject: Gentoo on ARM is painful without a fast storage device. Reply with quote

Without zswap or swap on a fast storage device like an M.2 SSD, even Raspberry Pi 4 8GB is going to struggle to compile packages in reasonable amounts of time.
I also tried qemu chroot and cross compilation which broke often. Cross distcc doesn't help much. Distcc isn't going to help much if your source packages don't support distcc.
Local compilation involves the least hassle. Each ARM device should be self-sufficient.

After becoming used to compiling everything on tmpfs on 32GB RAM with relatively fast CPU cores, I can't imagine upgrading source packages on slow storage devices.
For a server, 16GB RAM is recommended for tmpfs compilation. For a desktop, you need more than 16GB for tmpfs compilation.

You may want to look into armtix if you don't want to attach an M.2 SSD to your ARM SBC. If you want to make ends meet with just a microSD card, binary distros are your friends.
Back to top
View user's profile Send private message
Hund
Apprentice
Apprentice


Joined: 18 Jul 2016
Posts: 218
Location: Sweden

PostPosted: Wed Sep 23, 2020 4:52 am    Post subject: Reply with quote

I'm sorry, but the point of this thread is what?
_________________
Collect memories, not things.
Back to top
View user's profile Send private message
xaviermiller
Bodhisattva
Bodhisattva


Joined: 23 Jul 2004
Posts: 8718
Location: ~Brussels - Belgique

PostPosted: Wed Sep 23, 2020 8:29 am    Post subject: Reply with quote

This is not ARM related. I had an Acer Aspire One with a 8Go "SSD" that was awfully slow at writes. I replaced it with an iPod hard disk and it still rocks now.

Don't compile on slow mass storage devices ;-)
Also avoid multiple writes on SD cards
_________________
Kind regards,
Xavier Miller
Back to top
View user's profile Send private message
Etal
Veteran
Veteran


Joined: 15 Jul 2005
Posts: 1932

PostPosted: Thu Sep 24, 2020 12:30 am    Post subject: Reply with quote

SD cards are awful, they're not designed for that kind of workload.

eMMC are surprisingly much better in my experience.
Back to top
View user's profile Send private message
erm67
l33t
l33t


Joined: 01 Nov 2005
Posts: 653
Location: EU

PostPosted: Thu Oct 08, 2020 4:26 pm    Post subject: Reply with quote

I got a new box for 27€ shipped from china, supported by mainline kernel, with 4 CPU@1.9Ghz, 4 GB ram, USB3 & Gbit ETH port, a 64G EMMC5@100MB/s usable with some precautions, with bootblock protection and reset pins exposed (easy unbrick). Basically it is the same as the odroid C4. and yeah the emmc is faster .... and really cheap :-)
_________________
Ok boomer
True ignorance is not the absence of knowledge, but the refusal to acquire it.
Ab esse ad posse valet, a posse ad esse non valet consequentia

My fediverse account: @erm67@erm67.dynu.net
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3859

PostPosted: Thu Oct 08, 2020 4:54 pm    Post subject: Reply with quote

If I understood it well, I read somewhere about cross architecture memory sharing, e.g. an arm64 SBC accessing memory set at disposal on an amd64.
That would mean network media in between the two, bootleneck though.
I've unsuccessfully been trying to retrieve the source for the last few days.
@erm67: Do you have any product information to share?
Thks 4 ur attention, interest & support.
Back to top
View user's profile Send private message
erm67
l33t
l33t


Joined: 01 Nov 2005
Posts: 653
Location: EU

PostPosted: Thu Oct 08, 2020 5:58 pm    Post subject: Reply with quote

CaptainBlood wrote:

@erm67: Do you have any product information to share?

There are lots of clone boxes sold with various name as media player/kodi boxes based on the recent Amlogic S905X3, it's well supported by linux, the guys at Armbian really did a good job to support them. You will find more information in this thread:
https://forum.armbian.com/topic/12988-armbian-for-amlogic-s905x3/

Mine is a "Android 9.0 H96 MAX X3 1000M Smart TV Box Amlogic S905X3 8K 4GB 128GB 64GB 2.4G e 5G Wifi BT 4K Media Playe Andriod TV Set Top Box" from Aliexpress

If you get one of the boxes supported by Armbian installer, one with a dtb available, it is really easy, Armbian boot entry is installed as an upgrade and once it is booted it is possible to install it on the EMMC. Once the EMMC is repartitioned and mkfsed it is easy to replace Armbian with gentoo, Archlinux or whatever OS you like.
Just make sure that you backup the firmware and store the backup somewhere since it it required to unbrik, Amlogic stores some important data in non-standard locations and mkfs and fsck will overwrite them bricking the device. Armbian install script backup the bits, partition&format the drive and than restores the info on the EMMC. It is a bash script so it is easy do hack. Actually it doesn't make really sense to have multiple partitions an such a small drive or reformat it ;-) To unbrik some soldering is required .

I use it as a mysql server, and I bricked it making silly experiments, so I replaced it momentarily with oldish core I3 box with 2 cores@2.4Ghz 4Gb RAM and a rotational disk, to my surprise the intel box, sucking probably a couple hundred Watts, was actually slower than the arm box using 5-6 Watts :lol: :lol:
_________________
Ok boomer
True ignorance is not the absence of knowledge, but the refusal to acquire it.
Ab esse ad posse valet, a posse ad esse non valet consequentia

My fediverse account: @erm67@erm67.dynu.net
Back to top
View user's profile Send private message
Etal
Veteran
Veteran


Joined: 15 Jul 2005
Posts: 1932

PostPosted: Thu Oct 08, 2020 7:00 pm    Post subject: Reply with quote

Aside from the firmware blobs, does it work with a standard kernel? That's my biggest concern with these types of gadgets because if it doesn't at some point something requires a newer kernel and I can no longer update.

I've been using Rock64 as my home server and am really happy with it.
Back to top
View user's profile Send private message
crocket
Guru
Guru


Joined: 29 Apr 2017
Posts: 558

PostPosted: Thu Oct 08, 2020 11:59 pm    Post subject: Reply with quote

erm67 wrote:
I got a new box for 27€ shipped from china, supported by mainline kernel, with 4 CPU@1.9Ghz, 4 GB ram, USB3 & Gbit ETH port, a 64G EMMC5@100MB/s usable with some precautions, with bootblock protection and reset pins exposed (easy unbrick). Basically it is the same as the odroid C4. and yeah the emmc is faster .... and really cheap :-)


If it's the same as odroid c4, you better stick with odroid c4 because it's supported by hardkernel.
Back to top
View user's profile Send private message
crocket
Guru
Guru


Joined: 29 Apr 2017
Posts: 558

PostPosted: Fri Oct 09, 2020 12:04 am    Post subject: Reply with quote

I"m a bit hesitant about eMMC because I don't know much about it. I suspect M.2 SSD has more longevity than eMMC. I don't yet know whether different single board computers can use the same eMMC modules.
Back to top
View user's profile Send private message
crocket
Guru
Guru


Joined: 29 Apr 2017
Posts: 558

PostPosted: Fri Oct 09, 2020 2:51 am    Post subject: Reply with quote

Etal wrote:
Aside from the firmware blobs, does it work with a standard kernel? That's my biggest concern with these types of gadgets because if it doesn't at some point something requires a newer kernel and I can no longer update.

I've been using Rock64 as my home server and am really happy with it.


I think I can use Rock64 as a router by attaching a USB3 ethernet adaptor to it..
Back to top
View user's profile Send private message
erm67
l33t
l33t


Joined: 01 Nov 2005
Posts: 653
Location: EU

PostPosted: Fri Oct 09, 2020 6:54 am    Post subject: Reply with quote

crocket wrote:
erm67 wrote:
I got a new box for 27€ shipped from china, supported by mainline kernel, with 4 CPU@1.9Ghz, 4 GB ram, USB3 & Gbit ETH port, a 64G EMMC5@100MB/s usable with some precautions, with bootblock protection and reset pins exposed (easy unbrick). Basically it is the same as the odroid C4. and yeah the emmc is faster .... and really cheap :-)


If it's the same as odroid c4, you better stick with odroid c4 because it's supported by hardkernel.

Well, supported by Amlogic ... but also the Armbian guys have some contacts there ;-) the hardkernel box costs 3 times as much or maybe more.

crocket wrote:
Etal wrote:
Aside from the firmware blobs, does it work with a standard kernel? That's my biggest concern with these types of gadgets because if it doesn't at some point something requires a newer kernel and I can no longer update.

I've been using Rock64 as my home server and am really happy with it.


I think I can use Rock64 as a router by attaching a USB3 ethernet adaptor to it..

have a Gbit USB3 adapter (actually 2) but they tend to overheat under load and canno be used for intensive tasks. I use it to serve my friendica instance on the internet and at ADSL speed it works well.
crocket wrote:
I"m a bit hesitant about eMMC because I don't know much about it. I suspect M.2 SSD has more longevity than eMMC. I don't yet know whether different single board computers can use the same eMMC modules.


Well since there is no M.2 socket on ARM sbc it doesn't really matter wether they last longer or not ... Unfortunately there are a lot of differences between EMMC releases (4.X and 5.X for example) so no they are not really portable between SBC for the moment.
_________________
Ok boomer
True ignorance is not the absence of knowledge, but the refusal to acquire it.
Ab esse ad posse valet, a posse ad esse non valet consequentia

My fediverse account: @erm67@erm67.dynu.net
Back to top
View user's profile Send private message
crocket
Guru
Guru


Joined: 29 Apr 2017
Posts: 558

PostPosted: Fri Oct 09, 2020 7:16 am    Post subject: Reply with quote

For Rock Pi 4 and some Nano Pis, you can buy M.2 SSD adaptors. They even sell metal heatsink cases that can house SBC and M.2 SSD adaptors.

NanoPi R2S has two ethernet ports. One of them is USB3 ethernet adaptor. It would be too painful to use gentoo on NanoPi R2S. I may use armtix linux(arm version of artix linux) on NanoPi R2S.
Back to top
View user's profile Send private message
erm67
l33t
l33t


Joined: 01 Nov 2005
Posts: 653
Location: EU

PostPosted: Fri Oct 09, 2020 12:05 pm    Post subject: Reply with quote

Of course for SBCs that has a PCIe a M.2 adapter is a lot better and faster. Most EMMC work at 100MB/s some, like in the Odroid N2 @150MB/s and only recently some models that do 200MB/s appeared. My old SSD over SATA over USB3 can easily do >300MB, so even a usbsata is better than an emmc.
There are also M.2 USB3 adapter that can be used and are definitely faster than every EMMC out there.

But the emmc is a lot better than a SD card.

On all my boards booting from emmc (on a SDIO bus) is a lot faster than from a SATA on a usb3 bus, and probably also than a PCIe adapter, that is because, after all, the EMMC is just an advanced SD card and the SBC just boots over it just like it did before from the SD card without the need of configuring or scanning anything.
So the EMMC is a replacement fo the SD card, not a solution for storage problems.
_________________
Ok boomer
True ignorance is not the absence of knowledge, but the refusal to acquire it.
Ab esse ad posse valet, a posse ad esse non valet consequentia

My fediverse account: @erm67@erm67.dynu.net
Back to top
View user's profile Send private message
crocket
Guru
Guru


Joined: 29 Apr 2017
Posts: 558

PostPosted: Fri Oct 09, 2020 1:08 pm    Post subject: Reply with quote

UFS is going to replace microSD cards.

I don't know whether I can compile kernel on eMMC or UFS many times without wearing it out.
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3859

PostPosted: Fri Oct 09, 2020 2:07 pm    Post subject: Reply with quote

Isn't 4Gb RAM enough for /var/tmpfs compiling? (Never tried though...:P)
Thks 4 ur attention, interest & support.
Back to top
View user's profile Send private message
crocket
Guru
Guru


Joined: 29 Apr 2017
Posts: 558

PostPosted: Fri Oct 09, 2020 2:24 pm    Post subject: Reply with quote

CaptainBlood wrote:
Isn't 4Gb RAM enough for /var/tmpfs compiling? (Never tried though...:P)
Thks 4 ur attention, interest & support.


That's not enough for even a server. Try compiling rust on 4GB RAM.
For a desktop system, you may need 32GB RAM. Compiling tor browser on tmpfs consumes almost 90% of my 32GB RAM.
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3859

PostPosted: Fri Oct 09, 2020 2:43 pm    Post subject: Reply with quote

crocket wrote:
Compiling tor browser
8O, I only meant
crocket wrote:
whether I can compile kernel
You might be right though...
Will soon try it, e.g. as soon as my zswap activation script is ready.
Thks 4 ur attention, interest & support.
Back to top
View user's profile Send private message
erm67
l33t
l33t


Joined: 01 Nov 2005
Posts: 653
Location: EU

PostPosted: Sat Oct 10, 2020 8:47 am    Post subject: Reply with quote

crocket wrote:
UFS is going to replace microSD cards.

I don't know whether I can compile kernel on eMMC or UFS many times without wearing it out.

UFS is a faster competitor but it isnot sure it will replace eMMC. eMMC are a lot cheaper and that is why they are market leader now and UFS price probably not worth the speed increase, after all both have P/E cycle of 3000 and wear out relatively quickly. If I have to replace it often a cheaper model is better. At the same price UFS is better of course but that is not the case now, and with billions of smartphones shipping with emmc on board it will take some time until UFS will replace eMMC.
_________________
Ok boomer
True ignorance is not the absence of knowledge, but the refusal to acquire it.
Ab esse ad posse valet, a posse ad esse non valet consequentia

My fediverse account: @erm67@erm67.dynu.net
Back to top
View user's profile Send private message
erm67
l33t
l33t


Joined: 01 Nov 2005
Posts: 653
Location: EU

PostPosted: Sat Oct 10, 2020 8:49 am    Post subject: Reply with quote

CaptainBlood wrote:
, e.g. as soon as my zswap activation script is ready.

What script? /etc/defaults/grub
_________________
Ok boomer
True ignorance is not the absence of knowledge, but the refusal to acquire it.
Ab esse ad posse valet, a posse ad esse non valet consequentia

My fediverse account: @erm67@erm67.dynu.net
Back to top
View user's profile Send private message
pa4wdh
l33t
l33t


Joined: 16 Dec 2005
Posts: 882

PostPosted: Sat Oct 10, 2020 9:33 am    Post subject: Reply with quote

CaptainBlood wrote:
Isn't 4Gb RAM enough for /var/tmpfs compiling? (Never tried though...:P)
Thks 4 ur attention, interest & support.

It depends on what you want to compile. I'm using a RPi2B as a NTP server and it runs gentoo, and besides it's 1GB ram i gave it 512MB swap on the sdcard. It has a 512MB tmpfs for /var/tmp/portage and there are only 4 exceptions to that:
- binutils can still be compiled but only with -j1
- gcc, raspberry-sources and linux-headers need more space so they use the sdcard
_________________
The gentoo way of bringing peace to the world:
USE="-war" emerge --newuse @world

My shared code repository: https://code.pa4wdh.nl.eu.org
Music, Free as in Freedom: https://www.jamendo.com
Back to top
View user's profile Send private message
crocket
Guru
Guru


Joined: 29 Apr 2017
Posts: 558

PostPosted: Sat Oct 10, 2020 10:20 am    Post subject: Reply with quote

pa4wdh wrote:
- gcc, raspberry-sources and linux-headers need more space so they use the sdcard


You are going to wear your microSD card soon.
Back to top
View user's profile Send private message
pa4wdh
l33t
l33t


Joined: 16 Dec 2005
Posts: 882

PostPosted: Sat Oct 10, 2020 10:26 am    Post subject: Reply with quote

Could be. Since it doesn't have a lot of packages i can update 4 times a year without any problems, so i don't update too often. On the other hand, i make full backups after every update, and if the card fails it's cheap to replace. My previous sdcard lasted 4 years and got replaced because it was very slow (class4), not because it failed.
_________________
The gentoo way of bringing peace to the world:
USE="-war" emerge --newuse @world

My shared code repository: https://code.pa4wdh.nl.eu.org
Music, Free as in Freedom: https://www.jamendo.com
Back to top
View user's profile Send private message
crocket
Guru
Guru


Joined: 29 Apr 2017
Posts: 558

PostPosted: Sat Oct 10, 2020 10:45 pm    Post subject: Reply with quote

pa4wdh wrote:
Could be. Since it doesn't have a lot of packages i can update 4 times a year without any problems, so i don't update too often. On the other hand, i make full backups after every update, and if the card fails it's cheap to replace. My previous sdcard lasted 4 years and got replaced because it was very slow (class4), not because it failed.


How many days does it take to upgrade gentoo on your setup? 2 weeks? A month?

Do you compile everything including linux kernel on raspberry pi?
Back to top
View user's profile Send private message
pa4wdh
l33t
l33t


Joined: 16 Dec 2005
Posts: 882

PostPosted: Sun Oct 11, 2020 12:47 pm    Post subject: Reply with quote

Yes, i do all compiling on the Pi itself, including the kernel (basic kernel with all required drivers compiled into the kernel, no modules). I just checked my emerge.log, and my last update of 112 packages took 55 hours of emerging, add about an hour to compile the kernel, so that's 56 hours. Add some time for additional manual actions (sync'ing, re-starting emerge when needed, configuring the kernel, etc) and a typical update takes about 3 or 4 days from --sync to the finished update.
_________________
The gentoo way of bringing peace to the world:
USE="-war" emerge --newuse @world

My shared code repository: https://code.pa4wdh.nl.eu.org
Music, Free as in Freedom: https://www.jamendo.com
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum