What is 1.LXC?
LXC is the acronym for Linux containers and is a container-based virtualization technology for operating system tiers.
What can 2.LXC do?
LXC a virtual execution environment that can be provided for a process at the operating system level, a virtual execution environment is a container. You can bind a specific CPU and memory node to a container, allocate a specific percentage of CPU time, IO time, limit the amount of memory that can be used (including memory and swap space), provide device access control, and provide independent namespace (network, PID, IPC, MNT, UTS).
How is 3.LXC implemented?
SourceForge has lxc this open source project, but the LXC project itself is just a toolset that provides users with a user space to use and manage LXC containers. The real implementation of LXC is dependent on the Linux kernel, and the LXC project just integrates it. Container-based virtualization technology originates in so-called resource containers and security containers.
LXC relies on the cgroups subsystem of the Linux kernel for resource management, the Cgroups subsystem is a framework of process group-based resource management provided by the Linux kernel that can qualify resources that can be used for specific process groups. LXC relies on the namespace feature of the Linux kernel for isolation control, specifically by adding the corresponding flag (newns newpid, etc.) to clone.
4. Why Choose LXC?
LXC is the so-called virtualization technology at the operating system level, which has the following advantages over the traditional HAL (Hardware abstraction Layer) level virtualization technology:
- Smaller virtualization overhead (LXC's many features are essentially specific to the kernel, and the kernel implements these features with minimal expense, and the time to analyze it)
- Rapid deployment. Using LXC to isolate specific applications, you only need to install LXC, and you can use LXC-related commands to create and launch containers to provide a virtual execution environment for your app. Traditional virtualization technology requires creating a virtual machine, then installing the system, and then deploying the application.
LXC compared to other OS-level virtualization technologies, the biggest advantage is that LXC is integrated into the kernel without having to patch the kernel separately.
Reprinted from: http://www.cnblogs.com/lisperl/archive/2012/04/15/2450183.html
LXC (Linux Containers) Introduction