eMMC support & concerns

Michael Neumann mneumann at ntecs.de
Mon Feb 13 22:31:09 PST 2023


On Mon, Feb 13, 2023 at 11:25:15PM +0000, Cláudio Vieira wrote:
> Hello Matt,
> 
> Thanks for your feedback!
> 
> I’m still waiting for a ZimaBoard to be delivered, but trying to plan ahead!
> 
> The idea is to use it as a tiny home server in always on operation mode.
> eMMC performance shouldn’t be an issue once the system has booted.

You could go fully "immutable", i.e. having a read-only base system. The
data obviously has to reside on some SSD. Our installer/live ISO for
instance is read-only. IMHO, most log files are not needed anyways or
there is no or little need to persist them across reboots, especially
for a HOME server.

If the eMMC is not supported, you can still use an USB stick. You can
modify `nrelease` (our build system to produce the ISO or IMG live
installers) accordingly to cover your configuration, pre-install some
packages. Think of it as a much much poorer version of a Dockerfile :)
With some work, you can have a small shell script that will produce a
full image that you can then copy to a usb stick (or eMMC) and are ready
to boot your system. If there are updates to DragonFly, just re-do the
whole step with a newer source tree (or else mount the eMMC/USB stick
read-write and do a `pkg upgrade`).  

For testing out modern hardware ("laptops") I sometimes configure a
nrelease-built USB stick containing X11 or enlarging the USB image so
that I can later install X11 on it. Usually, loading applications that
way is pretty slow, but works for testing.

Good luck!

Regards,

  Michael

> 
> I will play with it and try a standard DragonFly install with HAMMER2.
> Next step will be to make it eMMC friendly by applying your suggestions.
> 
> I will share my findings here as a follow-up to this thread...
> 
> Cheers,
> Cláudio Vieira
> 
> 
> > On 11 Feb 2023, at 05:05, Matthew Dillon <dillon at backplane.com> wrote:
> > 
> > Well, the first question is whether DFly can even probe the eMMC.  If you can boot DFly from a usb stick and play with it from there, that's the easiest way to check which resources are or are not supported.
> > 
> > We do have eMMC support and generally speaking your research is correct... it is not a good idea to do heavy writing to eMMC, and the transfer rate is very slow (it is literally a serial protocol that runs in the megabit range rather than the gigabit range).  eMMC is suitable for booting systems and reading, but writing should be minimized.   eMMC performance is poor regardless of the operating system.  That said, operating systems like Linux or the BSDs will extensively cache read data in memory so it is possible to have decent responsiveness.
> > 
> > Beyond that, DFly can be made relatively eMMC-friendly by not configuring any swap space (unless absolutely necessary), and using tmpfs filesystems for /tmp and /var/tmp (also /var/run/shm but that is typically already tmpfs based).  Hammer2 should work fairly well with it.  The larger the eMMC drive, the better.
> > 
> > -Matt
> 

-- 
Michael Neumann
NTECS Consulting
www.ntecs.de



More information about the Users mailing list