View previous topic :: View next topic |
Author |
Message |
thegrind n00b
Joined: 22 Sep 2024 Posts: 11
|
Posted: Sun Oct 20, 2024 4:56 am Post subject: Is Gentoo bad for a microSD |
|
|
I have a microSD on a Rpi5. I am looking to compile a kernel and headless chromium. Will all this emerging and compiling really chew up my card? I bought a better performing but I'd like to move it over after I'm done with some heavy compiling/emerging. Thoughts? |
|
Back to top |
|
|
Zucca Moderator
Joined: 14 Jun 2007 Posts: 3655 Location: Rasi, Finland
|
Posted: Sun Oct 20, 2024 6:08 am Post subject: |
|
|
I'd maybe use an USB stick to store Portage temporary files (PORTAGE_TMPDIR). _________________ ..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote: | I am NaN! I am a man! |
|
|
Back to top |
|
|
Banana Moderator
Joined: 21 May 2004 Posts: 1694 Location: Germany
|
|
Back to top |
|
|
pa4wdh l33t
Joined: 16 Dec 2005 Posts: 880
|
Posted: Sun Oct 20, 2024 9:20 am Post subject: |
|
|
I have been running a Raspberry Pi 2 based NTP server since 2016 running Gentoo from a microSD card. It's biggest compile job is gcc (running the job from disk and using lots of swap because it only has 1GB of memory). So far i've replaced the SD card twice, but never because it failed. I usually get low on space for the rootfs and wait for nice discounts on cards.
Now it has a 128GB Samsung card i bought for about 20 euros using f2fs as a filesystem. As far as i know sdcards don't have smart-like functions so i can't tell how much has been read/written on the card. _________________ 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 |
|
|
Naib Watchman
Joined: 21 May 2004 Posts: 6061 Location: Removed by Neddy
|
Posted: Sun Oct 20, 2024 10:56 am Post subject: |
|
|
Things have improved but the old trope still exists (but is still something to be mindful of)... >100,000writes means you are likely to face physical failure before bit failure.
Gentoo and linux does increase the number of writes but there are some things you can do to prolong it
1. disable atime
2. disable logging - or selectively
3. use a non-journaled FS (or use FSFS)
4. use gentoo binhost _________________
Quote: | Removed by Chiitoo |
|
|
Back to top |
|
|
flysideways Guru
Joined: 29 Jan 2005 Posts: 485
|
Posted: Sun Oct 20, 2024 11:56 am Post subject: |
|
|
With the Pi 5 comes the option of using an nvme adapter.
This is from an sd card in a Pi 5
Code: | mirror ~ # hdparm -tT /dev/mmcblk0
/dev/mmcblk0:
Timing cached reads: 3392 MB in 2.00 seconds = 1696.44 MB/sec
Timing buffered disk reads: 272 MB in 3.01 seconds = 90.43 MB/sec
|
and this is from my Gentoo Desktop Pi 5 using an nvme ssd in a Pimoroni NVMe Base.
Code: | funf ~ # hdparm -tT /dev/nvme0n1
/dev/nvme0n1:
Timing cached reads: 4472 MB in 2.00 seconds = 2236.43 MB/sec
Timing buffered disk reads: 1708 MB in 3.00 seconds = 569.12 MB/sec
|
I had been using external usb ssd drives before the Pi 5 for the faster read/write, they are faster than usb flash drives but more cumbersome.
The NVMe Base makes for an aesthetically appealing package along with the stock cooling fan.
It continues to amaze me how the Pi 5 outperforms probably the first ten years of Gentoo boxes that I have had. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54563 Location: 56N 3W
|
Posted: Sun Oct 20, 2024 1:02 pm Post subject: |
|
|
Personally, if you must use an SD card, choose a good quality card, not a noname one and over provision it.
Many SD cards do wear levelling now, so F2FS will fight the inbuilt wear levelling, if you have it.
Does fstrim -av trim your card, or is trim not supported for you?
That's a good thing to do once a month to keep free space erased to keep write speeds up.
if trim is supported, you probabably have wear levelling too but there is no way to be sure.
I use a 512Gb Sandisk card with a desktop install. It want's to build Chromium every week.
Its a ~arm64 install except Chromium, which is stable.
The only reason I don't use NVMe is that Pi5 has to be silent, so passively cooled.
Maybe I could do some metalwork to use a bottom NVMe but that's for the future. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
pingtoo Veteran
Joined: 10 Sep 2021 Posts: 1201 Location: Richmond Hill, Canada
|
Posted: Sun Oct 20, 2024 2:33 pm Post subject: |
|
|
I use RPI5 for my daily drive. It is gentoo based on SD card. However I seldom compile on it. I use other nodes on my network that provide NBD then I pool those NBD with LVM and mount the lv as /var/tmp. Just give you some idea for possible workaround the SD card write concern. |
|
Back to top |
|
|
Goverp Advocate
Joined: 07 Mar 2007 Posts: 2146
|
Posted: Sun Oct 20, 2024 7:13 pm Post subject: |
|
|
NeddySeagoon wrote: | ...
Many SD cards do wear levelling now, so F2FS will fight the inbuilt wear levelling, if you have it.
... |
I must nail this particular canard, as it keeps appearing. F2FS does nothing about wear levelling - it leaves it to the underlying hardware.
AFAIK it's main tricks are to do with trimming and improving file deletion processing; IIUC it puts files into separate buckets by type (I think just the ".jpg"/".tgz" type, not MIME), trying to manage file component sizes to match the hardware's allocation units.
For more info, though way out of date, the Linux Weekly News tear-down is informative.
While I'm at it, another canard I see on Reddit "it doesn't journal like Btrfs/ext4". A bit of a strange claim, given it's a journal filesystem. Note, not journaling, journal - the filesystem IS a journal, nothing else.
Also people continue to recycle claims of unreliability from 10 years ago, when it was very new. I've used it on my desktop NVMe, laptop SSD and several Raspberry Pi SD cards, and not had a problem for probably 5 years - the last time I had an issue was when an SD card went irreparably read-only, which I think is actually a hardware failure state probably brought on by writing the systemd journal to the card at the wrong level, and generating far too much IO.
Rant over. _________________ Greybeard |
|
Back to top |
|
|
pingtoo Veteran
Joined: 10 Sep 2021 Posts: 1201 Location: Richmond Hill, Canada
|
Posted: Sun Oct 20, 2024 7:23 pm Post subject: |
|
|
Goverp,
Thank you for sharing your f2fs experience. I think I will try it for my next stage4 build for rpi5. However I have one concern. I remember from somewhere it suggest f2fs are tie to kernel. i.e change kernel version may cause the file system on disk not usable. Is this true? or it was but changed so now it no longer is the case? |
|
Back to top |
|
|
Ralphred l33t
Joined: 31 Dec 2013 Posts: 609
|
Posted: Sun Oct 20, 2024 8:34 pm Post subject: |
|
|
NeddySeagoon wrote: | Maybe I could do some metalwork to use a bottom NVMe but that's for the future. | I've messed with these hats extensively, my "passive cooling" preference is the double bottom hat, the long pcie cable kit (folded to get access to m.2 slots) and the hat fitted upside down (at an angle) on top of ~30/40mm of modified* nylon standoffs - it looks like a tuk tuk, but stays pretty cool on both boards.
*modified with a two pairs of pliers, a tiny blowtorch, and a 99p protractor from the corner shop |
|
Back to top |
|
|
|