本文介绍了LXC与VM的典型用例是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有一个LXC容器比使用完整虚拟机更好的选择。



LXC是否更多以PaaS为导向,运行没有硬件控制的应用程序?
我们总是需要在IaaS角度使用VM,我们想要基础设施控制吗?



注意,

解决方案

我不认为IaaS需要虚拟机。使用LXC你可以定义#of cpushare和内存用户限制。



事情是VM很重,例如PHP / MySQL / Apache,你会有1个虚拟机。
因为LXC很轻,你可以有3个LXC,所以它更好的缩放,(如果你需要shard mysql,只是复制mysql LXC)


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,

解决方案

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)

这篇关于LXC与VM的典型用例是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-23 14:02