3 ms·
I experimented with LXD containers on Linux recently, but I found the technology it builds on (cgroups) too hard to wrap my head around, and tutorials leave me
by amelius 4y ago
I experimented with LXD containers on Linux recently, but I found the technology it builds on (cgroups) too hard to wrap my head around, and tutorials leave me in the dark.
E.g. here is page 2 of one tutorial: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/resource_management_guide/sec-relationships_between_subsystems_hierarchies_control_groups_and_tasks https://access.redhat.com/documentation/en-us/red_hat_enterp...
All these rules made no sense to me, and while I suppose they become clear at some point, I like my tutorials to be clear from the start.
- mekster 4y agolxd is so much easier than alternatives like systemd-nspawn. 3 minutes search reveals an easy to follow tutorial. https://ubuntu.com/server/docs/containers-lxd https://ubuntu.com/server/docs/containers-lxd
- amelius 4y agoThanks but I wasn't talking about lxd, but about the underlying technology.
- deleted 4y ago[deleted]
- Izkata 4y ago> underlying technology I'm guessing bocker would be more useful for that: https://news.ycombinator.com/item?id=33218094 https://news.ycombinator.com/item?id=33218094
- e12e 4y agoYour initial comment mentions experimentation with lxd - did you mean experiment with lxc? The level of abstraction is very different (this is the raison-d'être for lxd, after all!). Lxc is somewhat to lxd as jails are to ezjails...
- yrro 4y agoThat's documentation for RHEL 6 which is now 12 years old. It pertains to cgroups v1 which was horribly complex. It was replaced by cgroups v2 which is much simpler; there's now a single hierarchy of cgroups. https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/monitoring_and_managing_system_status_and_performance/setting-limits-for-applications_monitoring-and-managing-system-status-and-performance https://access.redhat.com/documentation/en-us/red_hat_enterp... That said I don't remember having to learn all that much about cgroups when I last looked at lxc...
- amelius 4y agoThanks! Well, I started looking into it because there were all these mounted filesystems that I couldn't unmount, even as root. I guess I will have to look into namespaces also.
- yrro 4y agoYeah, it's pretty much an implementation detail - the thing running your containers likely exposes knobs like 'memory limit' and 'cpu limit' and under the hood it takes care of manipulating the files within the mounted cgroup filesystem. You'll be pleased that at least with cgroups v2 there's only a single /sys/fs/cgroup instead of half a dozen filesystems mounted underneath that path. :)