Avatar of burnedfaceless
burnedfaceless asked on

Difference between LDX containers and VMs

I was wondering some basic things about LDX containers (how they are different from virtual machines) and also why they would be preferred for shared web hosting:

So as far as differences between VMs - do you allocate a certain amount of RAM or HD space to them? Or can you set them and they scale?

Why would they be preferred for shared web hosting? It seems like there would be some security benefits. Would it guarantee some performance if one site got a ton of traffic?

Would there be any disadvantages to running LDX containers?

Avatar of undefined
Last Comment
Prabhin MP

8/22/2022 - Mon

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question

so will I allocate RAM or HD Space to a container?

Yes, but the disk space is a subdirectory on your existing disk...  (that sub directory is the "root" for the container.
(The container cannot go upwards; the host can go into the container directories).
All processes "inside" the container share the RAM with the host. (they are part of the host page tables etc.).
Within the container the uid 0 is NOT uid 0 in the host. (there is a renumbering schema).
Same for PID's so a process list inside the container is different from outside of the container. (try a ps command on both).
One container will not see, be able to access processes & data from another container or the host.

Much depends on your needs. The point noci made.
Lxds operate at host resource level, while VMs are guests and depend on scheduling by a hypervisor allocating resources between/among VMs.

The container provides some isolation compared to a straight forward shared hosting. I.e. DDoS on one site, impacts all, while in the lxd, the impact could be limited to the site/sites within the container only.

VMs you have/consume more since you have to install the os, conf...
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.

Thanks guys one last question - do I need to give each LXD their own IP Address, or is it sufficient to use IP Tables to forward the request to the container's local IP Address?

the LXD daemon (runs once..., has one address).... it starts LXC environments..
that can have private nets, natted nets, bridged nets...

LXD is the management interface.. (if you compare to XEN,   the Dom0..., and DomU's are done through LXC).
Prabhin MP

LXD has it own private netwok, which include the network configuration like bridge, nat,.
For outside access to map to internal network address to the container.
Hope this will help you
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.