Search code examples
cloudvirtual-machinevirtualizationlxcdocker

What are the typical uses cases for LXC versus VM?


I am trying to make up my mind on when an LXC container can be a better choice than using a full VM.

Do you have any precise uses cases in mind that can bring some arguments in one way or another?

Are LXC more "PaaS" oriented, to run applications without hardware control? Do we always need to use VM on an "IaaS" perspective where we want infrastructure control?

Regards,


Solution

  • I don't think IaaS needs VMs. With LXC you can define # of cpushare and Memory user limit.

    The thing is VMs are pretty heavy so for example PHP/MySQL/Apache, you would have 1 VM. As LXC are light, you could have 3 LXC, so it much better for scaling, (if you need to shard mysql, just duplicate the mysql LXC)