Linux Containers (LXC)

Running our Appliance (ZCA), ZCS on VMware, or any other virtual machine software? Post your thoughts here.
Post Reply
gtr33m
Advanced member
Advanced member
Posts: 96
Joined: Fri Sep 12, 2014 11:32 pm

Linux Containers (LXC)

Post by gtr33m »

Just a quick note to let people know that I've managed to get zimbra up and running on lxc.
Host is an older poweredge 6600, 4xdual core xeon 2.6 with 12 gb ram running ubuntu 10.04 x86.
Container is ubuntu 8.04 x86 6.0.7_GA_2473.UBUNTU8 UBUNTU8 FOSS.
No real issues except for jvm which needed to have it's percentage decreased. More optimizing can be done, but I haven't needed to yet.
Just another option if anyone is looking for and open source vm solution.
Mark
uxbod
Ambassador
Ambassador
Posts: 7811
Joined: Fri Sep 12, 2014 10:21 pm

Linux Containers (LXC)

Post by uxbod »

Interesting as we are considering LXC as a replacement to vserver so we can stay with stock distro kernels. How mature is LXC now ?
gtr33m
Advanced member
Advanced member
Posts: 96
Joined: Fri Sep 12, 2014 11:32 pm

Linux Containers (LXC)

Post by gtr33m »

In a word, not very.
The documentation is weak and the community is still very small, so there are a limited number of ressources you can draw on, and most users are learning as they go. The tools available are still a bit light on and though satisfy my needs, they are in their infancy and not yet very polished.
That being said, the design principle seems very good, and my experience so far has been all but problem free.
Boiled down, it's almost a chrooted environment that can run anything that can use the same kernel. You can still restrict ressources, but has none of the container limitations that you have under vm type environments. Nothing is emulated so everything runs as fast as the host does.
The thing I like best about it is that it is so easy to backup, copy, move, etc. There's no special distros or kernels that you need have on the host, so testing or disaster recovery is very simple.
If I want to test an upgrade or a change, I just shutdown the live container, copy it, change the network to a different subnet (so I can play with it without interfering with the live system), and bring it back up as a new container.
You can do this of course with any vmserver, but there are a few more steps, and you need to create seperate virtual drives which are one big file, so you can't sync them up without copying the entire file or bringing both vms up and doing the sync within the active environment, so even then some stuff can't be sync'ed while running. LXC uses the filesystem of the host, so you can access the files directly from the host.
This may not seem that beneficial, but it means that you can have a complete remote backup of a running server, not just of your zimbra install, and keep them completely in sync without having to transfer the entire container every time.
I haven't done any testing yet, but I would think that you could even write a backup script to sync up the servers while running, ignoring open files, then shutdown just long enough to backup the open files, and come back up. I've not done any testing, but at a guess you would only be down for a few minutes if you could do it this way.
I'm certainly no expert on LXC, but I'm happy to share my experiences if any one is interested.
Mark
gtr33m
Advanced member
Advanced member
Posts: 96
Joined: Fri Sep 12, 2014 11:32 pm

Linux Containers (LXC)

Post by gtr33m »

Just a quick update now that we've been running for about 3 months.
So far, not a single issue with running zimbra. No forced reboots in 3 months. I've taken it down once and reboot as I've setup the container to autostart in case the vm/lxc server is rebooted.
The only issues with lxc have been with updates. I didn't create the container perfectly and it has been trying to update udev, which doesn't work in lxc. No real issue, just an error message when updates are performed, but no impact on usage or performance.
dik23
Outstanding Member
Outstanding Member
Posts: 264
Joined: Sat Sep 13, 2014 1:44 am

Linux Containers (LXC)

Post by dik23 »

Sorry to dig up this (fairly) old thread but does lxc have any of the memory issues than OpenVZ does when dealing with Java ?
I can't seem to find anything written on it.
dave_kempe
Outstanding Member
Outstanding Member
Posts: 200
Joined: Fri Sep 12, 2014 9:55 pm

Linux Containers (LXC)

Post by dave_kempe »

I don't think LXC has anywhere near the number of parameters you can configure as OpenVZ. We are also considering moving to LXC on OpenStack.
gtr33m
Advanced member
Advanced member
Posts: 96
Joined: Fri Sep 12, 2014 11:32 pm

Linux Containers (LXC)

Post by gtr33m »

I couldn't tell you for sure, but I highly doubt it.
Unlike OpenVZ, LXC does not use a special kernel, and as such *should* suffer/not suffer in the same way that the host does. If you host doesn't have an issue, then your guest shouldn't either.
This is not hard and fast, but generally true.
I've been running zimbra on lxc with 20 users for over 6 months without any Java issues.
Post Reply