Home » Linux » What is the difference between lmctfy and lxc

What is the difference between lmctfy and lxc

Posted by: admin November 30, 2017 Leave a comment


Recently Google has open sourced lmctfy, Google’s container stack. I don’t understand it much, I have a few questions.

What are the differences between lmctfy and lxc and docker?
What problem does Google solve with lmctfy?



One of the lmctfy developers here. I’ll try to start with one-liners and put in some more details later.

Linux kernel supports cgroups for resource isolation (cpu, memory, blockio, network, etc) that doesn’t require starting Virtual machines. It also provides namespaces to completely isolate application’s view of the operating environment (process trees, network, user ids, mounts).

LXC combines cgroup and namespace support to provide an isolated environment for apps. Docker build over LXC to add image management and deployment services to it.

lmctfy works at the same level as LXC. The current release builds on cgroups and the next release will add namespace support.

Given that Docker works at a higher level, I’ll just focus on differences between lmctfy and lxc.

  • Resource management API: LXC API is built for namespace support and exports cgroup support almost transparently. Linux cgroup API is unstable and hard to deal with. With lmctfy, we tried to provide an intent-based resource configuration without users having to understand the details of cgroups.

  • Priority – Overcommitment and sharing: lmctfy is built to provide support for resource sharing and for overcommitting machines with batch workloads that can run when the machine is relatively idle. All applications specify a priority and latency requirements. lmctfy manages all cgroup details to honor the priority and latency requirements for each task.

  • Programmatic interface: lmctfy is the lowest block of app management for Google’s cloud. It’s built to work with other tools and programs. We feel it’s much better specified and stable for building more complicated toolchains above it.

We have lmctfy managing all of Google’s resource isolation needs since 2007. So far, it was mangled into other pieces of Google Infrastructure. During a redesign, we were able to separate this layer out cleanly and thought it would be fun to put it out and give back.

I gave a Linux Plumbers talk in September about lmctfy. You can check some of the details there:

slides: http://www.linuxplumbersconf.org/2013/ocw//system/presentations/1239/original/lmctfy%20(1).pdf