Best practice for continous operation of the BeagleBone ?

Anyone having good advice on optimal configuration settings for the BeagleBone, to facilitate continous operation of the device?
I just need a “bare bones” BB which can communicate using SSH and SCP and read/write some stuff on the GPIO pins, that’s all.

I’ve done away with the bone101 and cloud9 services, as I don’t need them. Still, I’m experiencing that the amount of available memory is “eaten” after several days of operation. Starting out from a fresh boot, top reports some 80 MB being used. After some 5-10 days of operation, some 180 MB is occupied. It’s not my simple Python program which eats chunks of memory. systemd-journald seems to take up a bit, but I’ve also noticed that the amount of “buffered” and “cached” memory increases dramatically.

Any ideas or advice?

Anyone having good advice on optimal configuration settings for the
BeagleBone, to facilitate continous operation of the device?
I just need a "bare bones" BB which can communicate using SSH and SCP
and read/write some stuff on the GPIO pins, that's all.

Have you tried building a customized system instead of just reusing the
existing one with parts pulled out?

I've done away with the bone101 and cloud9 services, as I don't need
them. Still, I'm experiencing that the amount of available memory is
"eaten" after several days of operation. Starting out from a fresh
boot, top reports some 80 MB being used. After some 5-10 days of
operation, some 180 MB is occupied. It's *not* my simple Python
program which eats chunks of memory. systemd-journald seems to take
up a bit, but I've also noticed that the amount of "buffered" and
"cached" memory increases dramatically.
Any ideas or advice?

Don't worry about it :slight_smile:

Linux will manage your memory for you, it'll grow the buffers and cache
as it needs to in order to stay performant. Unless you're getting
eaten by the out of memory killer, you're not running out of memory.

-Andrew

Torkel M. Jodalen <la6vja@gmail.com> [12-10-02 18:40]:

Anyone having good advice on optimal configuration settings for the
BeagleBone, to facilitate continous operation of the device?
I just need a "bare bones" BB which can communicate using SSH and SCP and
read/write some stuff on the GPIO pins, that's all.

I've done away with the bone101 and cloud9 services, as I don't need them.
Still, I'm experiencing that the amount of available memory is "eaten"
after several days of operation. Starting out from a fresh boot, top
reports some 80 MB being used. After some 5-10 days of operation, some 180
MB is occupied. It's *not* my simple Python program which eats chunks of
memory. systemd-journald seems to take up a bit, but I've also noticed that
the amount of "buffered" and "cached" memory increases dramatically.

Any ideas or advice?

--

Hi Torkel,

I dont know whether I understood you correctly -- I am no native
English speaker.

Linux always "eats up" all memory available for caching (for example)
inode informations and buffering stuff. If it won't do that your would
have paid for memory, which dont get used.
BUT: These caches and buffers get freed as soon a process needs
memory.

Only if a task aks for more memory available if nearly all temporarily
aquired mem is freed AND you dont have initialized a swap device, the
task will be killed by the kernel.

After a fresh boot there have simply too less things happen, which
requieres to cache their I/O.

Experiment:
Boot your beagle, log in and do (as root)

    find / -ls

let the command run and after it has finished all memory "eaten up"
... but there is (nearly) no task running. There are lots of inode
informations cached, which gets freed as soon you start another task.

If you want a small system I would suggest Gentoo.

With Gentoo you can choose exactly, what applications you want.
There is a prebuyild, so called "stage3"-image available.

I would suggest to take a clean SD-Card, initialize it and put
the stage3-image on it. It will have no X, no windowmanager but
ethernet and a console. I cant remember exactly, but chances are,
that sshd is already installed also.

Gentoo builds from source on the Beagle natively. This takes some
time (the beagle are no rockets when it comes to compiling) but as
you want a "simple" system, this will be not that bad.

For the ease of handling and for the quality I would suggest to
use the kernel maintained by Robert Nelson. For building the kernel
you need a crossdev toolchain.

HTH!
Good luck!
Best regard,
mcc

If you want a small system I would suggest Gentoo.

With Gentoo you can choose exactly, what applications you want.
There is a prebuyild, so called "stage3"-image available.

I second the Gentoo recommendation:

http://dev.gentoo.org/~armin76/arm/beaglebone/install.xml

I would suggest to take a clean SD-Card, initialize it and put
the stage3-image on it. It will have no X, no windowmanager but
ethernet and a console. I cant remember exactly, but chances are,
that sshd is already installed also.

No sshd by default but it's only an 'emerge openssh' away. I think
you need to create the /etc/init.d/net.eth0 link yourself for ethernet
but I'm not sure about that.

Gentoo builds from source on the Beagle natively. This takes some
time (the beagle are no rockets when it comes to compiling) but as
you want a "simple" system, this will be not that bad.

The compile times are not nearly as bad as I expected.

For the ease of handling and for the quality I would suggest to
use the kernel maintained by Robert Nelson. For building the kernel
you need a crossdev toolchain.

I know of someone who is working on licensing issues so he can make
the compiled /boot files publicly available so you wouldn't need to
bother with crossdev. Then you can be up and running in no time and
recompile the /boot files yourself if you like.

- Grant

Thanks for the great advice. Will definitely look into Gentoo this winter and try building a system with only the components required instead of tearing down the default Ångström image that came with the BB.

Thanks again.

Torkel M. Jodalen <la6vja@gmail.com> [12-10-03 11:28]:

Thanks for the great advice. Will definitely look into Gentoo this winter
and try building a system with only the components required instead of
tearing down the default Ångström image that came with the BB.

Thanks again.

--

You'r welcome!

You won't regret it! :slight_smile:

Happy Gentooing! 8)

Best regards,
mcc

You do realize that Angstrom is customizable, right?
It's about the same amount of compiling as Gentoo.

-Andrew

Debian too… Fedora too… whatever distro suits you.

In development stage just pick the distro you know best and get your application running; then you can even build your own distro from scratch and make it fit on a couple of MB.

On other product I started with a full blown Debian on a 2GB uSD, after I got my application running I stripped the Debian image and now its running on a 512MB NAND with UBIFS and it just uses 200MB of the filesystem (UBIFS is compressed). The guys of OpenWRT fits all that stuff in a quarter space :slight_smile:

The same stuff can be done with any distro you choose. Just removing locales will save you a lot of space.

Debian too.... Fedora too.... whatever distro suits you.

In development stage just pick the distro you know best and get your
application running; then you can even build your own distro from
scratch and make it fit on a couple of MB.

On other product I started with a full blown Debian on a 2GB uSD,
after I got my application running I stripped the Debian image and
now its running on a 512MB NAND with UBIFS and it just uses 200MB of
the filesystem (UBIFS is compressed). The guys of OpenWRT fits all
that stuff in a quarter space :slight_smile:

The same stuff can be done with any distro you choose. Just removing
locales will save you a lot of space.

If small Debian is what you're after, look at Emdebian [1]. It's
smaller. But it still has apt and friend and all their dependencies,
like perl, which is where the bloat of Debian comes from. It still
clocks in measured in hundreds of MB.

[1]: http://emdebian.org

Emdebian Crush is smaller but currently Crush is only available
for Lenny (old-stable, about to get even older when Wheezy comes out)
and won't be revived for some time (I don't think the plan is for
Wheezy to be Crushed, maybe Jessie?).

Just regular Debian, build with multistrap, fits easily in a few hundred
MB on a microSD card.