Make OpenWrt use more RAM

Sure, but even pfSense says the minimum storage required is 4GB.

Is that an issue? Decent USB sticks are like 10$ or so....
You can also get dirt cheap SSDs.

1 Like

No it started over organizational and communication issues.

That's not the main target of OpenWrt. You can run normal Linux distros there, and as I said even normal distros are pretty efficient too.

Nothing is stopping anyone from adding such packages to the (official) community package feed.

I quite frankly think this is your own hardware selection issue, not a widespread problem.

On many x86 embedded devices you can expand storage with CF cards, SD cards (industrial), or more commonly in modern stuff with mSata SSDs. There are tightly integrated ones with eMMC too, but they are not really the only option.

What are these "IOT NUC" devices you have? Are you sure they can't just boot off USB or mSata or whatever?

What.
How.
A normal Debian minimal installation is less than 1GB (and it still has stuff you may or may not need).

If a glorified DVR server application (which is what UniFi Video is) requires 2 GB of storage space you should really run far, FAR from it.

Also I hear that UniFi Controller is resource intensive for no real reason (like needing 512MB of ram to be a glorified IoT fleet C&C with web interface).

2 Likes

A minimal Ubuntu Server 18.06 LTS install, with the only optional package selected being OpenSSH ended up being 2.8G (size on disk). I can't get it smaller than this using the public installer. Maybe I am using the wrong distro, but all my experience has been with Ubuntu.

Unifi Video itself is about 200mb, but requires Java8, and also MongoDB for it's database, which has a load of library dependencies which take the whole thing up to around 700MB in total.

Of course they can boot off USB. It's just a case of making the most of the hardware available (and saving the, albeit minimal, cost of a USB).
Of course in the NVR I have a separate HDD for the actual video recordings anyway. What I ended up doing ultimately was mounting /var on a 5GB partition on the HDD, which will also help reduce writes to the eMMC chip through daily use.

Use Debian, it's definitely smaller than 2.8G. and its the basis for Ubuntu so it will feel familiar.

3 Likes

1a. check if you have a swap file on root partition and delete it (optionally you can move it to the data partition in the external drive) https://www.cyberciti.biz/faq/ubuntu-linux-create-add-swap-file/

1b. check if you have a swap partition on the eMMC and delete it, then reclaim that space (afaik Ubuntu shouldn't create this anymore and use swap files instead)

--
2. you can delete packages you know you don't need (library packages mostly) to make more space. I'm assuming the default Ubuntu install is installing by default a ton of libraries and tools you don't need on an embedded system, as Debian default minimal install is less than a GB and it still works perfectly fine.
Don't worry if you delete libraries you will need later, they will be installed again when you install the applications you want to run.

--
3. I suggest to at least try out a minimal Debian install somewhere to see if they did a better job with the default package list and other package dependencies.
Ubuntu is a re-branded Debian so 99% of the commands and tutorials work exactly the same.

1 Like

I will certainly give these a go.

Thanks!

Skip the ā€œGUI desktopā€ as well.

There is no GUI on the server edition. The Desktop Ubuntu with GUI takes it to well over 4GB before you've even started.

I have a VMWare ESXi "lab machine" sitting on my desk at work.

ESXi doesn't really support wifi cards, so I've got an OpenWRT x86 VM installed on it almost solely for "lighting up" the onboard WLAN card so that the machine can be used wirelessly. OpenWRT is perfect for that application. Running OpenWRT "bare metal" on that machine (as opposed to in a VM) just seems to be a waste - as others have said, OpenWRT is simply not designed for such use cases, and that's why other distros exist.

It sounds like the OP's use case might be for something that's more "sub-NUC" than a NUC product, as most NUC products have significantly more storage than what they're using. It sounds like they're trying to find something for that rather niche spectum of extrmely low-end x86 devices like a sub-$100 z8350 device? Even the $99 ones have 16-32GB eMMC and it looks like the OP has found a device with only 4GB of eMMC???

older Industrial and embedded boards have less than 16GB usually.

He does not seem to be using a consumer NUC because they don't have eMMC at all. Chinese things aren't called NUC.

Intel pushed embedded/IOT "NUC" branding too, but they are available from industrial/embedded OEMs so most people (that don't dabble in the IoT/embedded world) never heard of them.
Some examples:
http://www.embeddedintel.com/news.php?article=2718
https://www.logicsupply.com/ag960/
https://www.seco.com/us/products/off-the-shelf/embedded-nuc.html

He's definitely not talking about the sort of stuff Logic Supply sells. Even the lower-end ML100s are legitimate full-blown NUCs with much more storage. (The unit I'm running OpenWRT in a VM on is, in fact, one of their NUC products, which is an Intel NUC motherboard repackaged into a fanless enclosure with a beefy heatsink.)

The closest things I can think of are things like the Chinese z8350 boards and the UPBoard - but all of these have 16GB+ of eMMC. 4GB eMMC + x86 is a rare niche...

I said older.

These embedded things are expensive and usually not sold to end users.

It's entirely feasible he bought some older boards/devices that were scrapped or became obsolete while still in the warehouse (i.e. "new old stock").

You know, ebay and craigslist and all that are a thing to get rid of such hardware.

Base install on VirtualBox VM for Debian 9.8.0, "SSH server", "standard system utilities", no "Debian desktop environment" -- 1.1 GB

FreeBSD is under 400 MB for a base install and consumes even less if you're running ZFS with on-the-fly compression.

(Debian also supports ZFS)

Intel made an enormous amount of these type devices. They were intended to be used in factory environments as sudo embedded edge devices for IOT.

They have a lot of positives, super compact, very low power, fitted with industrial market chipsets (so extended temp operating range, higher reliabilty), Atom processors with AES-NI and space for an internal SSD/HDD as needed. As @bobafetthotmail correctly deduces they went obsolete before the IOT space really took off and now can be picked up very cheaply. I got four of them for $60. I'm probaby pushing the limit of what they were intended to do, but for $15 each... can't really complain. I can route/firewall 900Mbps through these with OpenWRT and a USB3 dongle NIC for 2nd ethernet.

Single-thread Bay Trail is going to be a limiting factor. For $15, I would just be happy with what youā€™ve got.

Indeed. Perhaps my assumption that many other people would be digging the gold-mine of just-obsolete cheapo hardware was a stretch!

In any case, I have learned something. My blinkered view of the world was that there was OpenWRT then full-blown distros like Redhat and Ubuntu and nothing inbetween.

I will certainly be trying Debian/FreeBSD for future projects.

Having said that... I still haven't seen anything out there as 'flash friendly' as OpenWRT.

Ubuntu/Debian still can't even install on F2FS, let alone J2FFS overlay type setups.

It's possible to move an existing Debian install onto a F2FS partition with some effort, but it seems hit and miss at best.

with Debian install onto btrfs and it has some optimizations for flash