Urgent.News

What's breaking now, across thousands of outlets.

Tech

Proxmox: Wann LXC-Container statt VMs sinnvoll sind – Praxis-Vergleich

Proxmox: Wann LXC-Container statt VMs sinnvoll sind – Praxis-Vergleich "Warum zur Hölle braucht meine WordPress-Instanz einen ganzen Linux-Kernel?" – diese Frage trieb mich 2018 zum ersten Mal zu LXC-Containern. Zehn CPU-Kerne, 16GB RAM und eine 20GB Disk nur für eine simple Webapp? Bei diesen Ressourcen-Preisen können wir uns diese Verschwendung nicht mehr leisten. Aber VMs sind nicht…

Title: When to Choose LXC Containers Over VMs - Practical Comparison

Proxmox recently published a comparison piece on when to use LXC containers instead of virtual machines (VMs). The author explains why he initially moved to LXC containers in 2018 after seeing the excessive resource usage of VMs for his WordPress instance. Although VMs have their place, the author argues that LXC containers can be more efficient in certain scenarios.

1. Resource Efficiency

LXC containers are more efficient with resources than VMs. They share the host kernel, utilizing only the resources each application actually requires. For example, a fresh Ubuntu VM consumes 300MB of RAM while idle, while an LXC container only uses the resources needed by the application. This can make a significant difference when running multiple systems. However, LXC containers may not be suitable for security-critical isolation or stateless services.

2. Storage Performance

LXC containers show improved storage performance when using local SSDs instead of traditional VM storage methods. With bind-mounted containers, IOPS (Input/Output Operations Per Second) can reach near-native performance without the overhead of SCSI stacks or VirtIO. However, this performance advantage comes at the cost of kernel queuing, which can impact performance for high-frequency database transactions. In such cases, KVM might be a better choice.

3. Security

While Proxmox markets LXC as lightweight VMs, the author cautions that this is a dangerous myth. Kernel exploits, such as Dirty Pipe (CVE-2022-0847), can compromise the entire host when running untrusted workloads in LXC containers. KVM offers better isolation against such attacks. For multi-tenant environments with untrusted workloads, VMs are the safer option. However, for internal microservices with proper security configurations, LXC can be an acceptable alternative.

The author concludes by suggesting a simple 2-minute check to determine whether to use LXC containers or VMs for a specific application. He recommends testing a stateless service in an unprivileged LXC container with specific parameters to help decide the best approach. Ultimately, the author emphasizes that there is a middle ground between LXC and VMs, and it's crucial to consider the specific needs of each application.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Flash Loan Attack Vector Analysis: Uniswap V3

Flash Loan Attack Vector Analysis: Uniswap V3 Target Protocol : Uniswap V3 (TVL: $1500.9M) Flash Loan Attack Vector Analysis – Uniswap V3 Protocol: Uniswap V3 (TVL ≈ $1.5 B across Ethereum and L2s)…

More from Sunday 30 August →