LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Containers (https://www.linuxquestions.org/questions/linux-containers-122/)
-   -   Using LXC containers in embedded systems (https://www.linuxquestions.org/questions/linux-containers-122/using-lxc-containers-in-embedded-systems-4175621397/)

SamLinux4 01-10-2018 11:33 PM

Using LXC containers in embedded systems
 
Hi,

I’m new to LXC containers. I’m wondering whether LXC containers could be utilized in embedded Linux systems without less overhead. This container would have one service running along with one background process.

Also, can using containers cost performance in embedded systems?

simosx 01-15-2018 04:23 AM

There are people that use LXD (LXC containers managed by the LXD hypervisor) on embedded systems.
I think it gives the best performance / easy of use. Since you have a very specific use-case, you can customize quite a bit.

Some things to note:

1. When installing LXD, you select the storage backend, which is the location to store the container files.
The simplest storage backend is dir, which means that it does not use some special filesystem (like ZFS or btrfs).
Because your use-case is very specific, you might be OK with dir. A disadvantage of dir is that the creation of a container can be slow; you would not mind because you create just a single container.

2. LXD works best if your Linux kernel has proper AppArmor support. If you can select Ubuntu for the host, it would be the easiest choice.
The alternative is to use LXD as a snap package. See at https://docs.snapcraft.io/core/install on how to install the snap package mananger, then install LXD by running snap install lxd.

sundialsvcs 01-16-2018 10:23 AM

Containers would only need to come into play if one or the other process needs isolation from the host environment or other containers. Because, that's really what container technology is all about: containers marshal several exotic features that have been engineered into the Linux kernel and makes them manageable.

Containers really don't have a "performance" impact because a container is basically a very clever illusion: a set of rose-colored glasses and a straitjacket that the applications don't even know (care ...) that they are wearing. :) Underneath the hood, the processes are actually being run directly by the host Linux system.


All times are GMT -5. The time now is 03:56 PM.