Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Creating OpenVZ and hosting separate WordPress
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Creating OpenVZ and hosting separate WordPress

jetchiragjetchirag Member
edited March 2017 in General

Hi,

I'm planning to lease a ~16 gb dedi and create some small OpenVZ or kvm on it around 256-512mb and run separate WordPress hosting on it.

It is because each will have its own unique needs.

Is this a good idea and what virtualization will work best + on 16 gb dedi how many 256 M vm I can create with 0 overselling?

P.S. Can I use single IP for each VM? (Just curious, optional)

Comments

  • MrPsychoMrPsycho Member
    edited March 2017

    jetchirag said: Is this a good idea

    For personal usage - not really. Why? Because you will have many multipled proccesses (like apache2, ssh, exim4 each per VM). For non-personal usage it makes more sense, because you can separate each client to it's own container. However it won't save you from abuse. Normally you will be able to limit RAM and CPU (just to core) with OVZ. You still be open to disk, network and core abuse. Limiting this is not easy using free virtualisation software. It requires lots of knowlage and has to be done manually. ...and to be true I guess you don't have such knowlage if you don't know how many 256mb containers you can put on 16gb host.

    I suggest you to take a look at Cloudlinux. You will also need some sort of controlpanel like cPanel or DirectAdmin... It won't be cheap.

    jetchirag said: what virtualization will work best

    Lightest: OpenVZ, LXC (if using Proxmox) and LVE (CloudLinux)

    True virt: KVM

    ... and choosing between them for WWW hosting makes nearly zero sense because you're not going to "oversell"... That's just a waste of potencial as I guess that none of you VMs will be on 100% load everytime... More on this below.

    jetchirag said: on 16 gb dedi how many 256 M vm I can create with 0 overselling?

    Let;s say we are going to leave 1GB for host node: 16GB-1GB=15GB... 15GB=15360MB... 15360MB/256MB=60

    ... and as I said it's waste of potential. Let's assume that all containers will be on 50% load. This equals to true 7,5GB memory usage... And you're left with another 7,5GB memory. Why not add another 30 containers? This way oversell rate will be on 150%, making your true memory usage 11,25GB... This way you're still left with free 3,75GB of memory. This memory allows 30 (of your 90) containers to burst memory usage at any time...

    Of course meanwhile you will also have to monitor if your CPU, disk or network won't suffer from load.

    Edit as it was later added on:

    jetchirag said: P.S. Can I use single IP for each VM?

    I don't understand... Why not? I suspect that you meant "Can I use one IP for all my VMs?"... fo this - yes, you can but this again requires knowlage. You will have to setup reverse proxy on host node for each website and also port forwarding for each running deamon inside you containers you want to be accessable from outside (like ssh).

    Thanked by 2jetchirag vpsGOD
  • mikhomikho Member, Host Rep

    Do you want every site to have their own mysql process?

    What you gain in seperation, you lose in performance.

    I would go for a shared hosting type of solution instead.

    Thanked by 2vpsGOD jetchirag
  • I agree with what @mikho wrote.

    IMO you should directly go with cPanel or DirectAdmin without separating each customer to it's own container, as you will probably fail at some point. Using control panel will save you a lot of time (and nerves I guess). Evertyhing will be done automatically, insead of manually, like normally.

    To save some money you can create one huge container on top of your dedicated server and pay only for cPanel VPS license.

    Thanked by 1jetchirag
  • @MrPsycho said:

    jetchirag said: Is this a good idea

    For personal usage - not really. Why? Because you will have many multipled proccesses (like apache2, ssh, exim4 each per VM). For non-personal usage it makes more sense, because you can separate each client to it's own container. However it won't save you from abuse. Normally you will be able to limit RAM and CPU (just to core) with OVZ. You still be open to disk, network and core abuse. Limiting this is not easy using free virtualisation software. It requires lots of knowlage and has to be done manually. ...and to be true I guess you don't have such knowlage if you don't know how many 256mb containers you can put on 16gb host.

    I suggest you to take a look at Cloudlinux. You will also need some sort of controlpanel like cPanel or DirectAdmin... It won't be cheap.

    jetchirag said: what virtualization will work best

    Lightest: OpenVZ, LXC (if using Proxmox) and LVE (CloudLinux)

    True virt: KVM

    ... and choosing between them for WWW hosting makes nearly zero sense because you're not going to "oversell"... That's just a waste of potencial as I guess that none of you VMs will be on 100% load everytime... More on this below.

    jetchirag said: on 16 gb dedi how many 256 M vm I can create with 0 overselling?

    Let;s say we are going to leave 1GB for host node: 16GB-1GB=15GB... 15GB=15360MB... 15360MB/256MB=60

    ... and as I said it's waste of potential. Let's assume that all containers will be on 50% load. This equals to true 7,5GB memory usage... And you're left with another 7,5GB memory. Why not add another 30 containers? This way oversell rate will be on 150%, making your true memory usage 11,25GB... This way you're still left with free 3,75GB of memory. This memory allows 30 (of your 90) containers to burst memory usage at any time...

    Of course meanwhile you will also have to monitor if your CPU, disk or network won't suffer from load.

    Edit as it was later added on:

    jetchirag said: P.S. Can I use single IP for each VM?

    I don't understand... Why not? I suspect that you meant "Can I use one IP for all my VMs?"... fo this - yes, you can but this again requires knowlage. You will have to setup reverse proxy on host node for each website and also port forwarding for each running deamon inside you containers you want to be accessable from outside (like ssh).

    A big thank for this long explanation. I completely understand this and reason for this is ability to customize cache system, web server and other services for website.

    I'm already with cPanel and this one is addition to customers. Beside, what about running mysql at another dedi to save memory from multiple ones. I can't leave other parts. Is there anything special I can do to meet these needs?

  • @mikho said:
    Do you want every site to have their own mysql process?

    What you gain in seperation, you lose in performance.

    I would go for a shared hosting type of solution instead.

    Please read above reply.

  • MrPsychoMrPsycho Member
    edited March 2017

    jetchirag said: Beside, what about running mysql at another dedi to save memory from multiple ones. I can't leave other parts. Is there anything special I can do to meet these needs?

    Running MySQL on another dedi is nearly a must. But be sure to have that dedi in the same DC to keep latency low (private vLAN might be the best way to go).

    With just single IP you still would have to setup reverse proxy for every website. The same applies to port forwarding (eg. ssh, ftp).

    It might be also a good idea to use MySQL dedi as backup for customer containers. You might use cron to tar and scp files from container to dedi daily. This will have small impact on dedi disk. Alernativly you can use programs like SyncThing to sync files in real time, but thiss will have grater impact on disk io.

    To simplify things why not use cheapish VPSes? For example let's have a look at Vultr. Their API is also pretty easy. It would also save you networking hasstle.

    Main VPS (MySQL server): 40GB SSD | 2GB RAM | 1 vCPU | $10/month

    Backup space: 125GB | 512 RAM | 1 vCPU | $5/month... (here you can have a look at cheaper alternatives, but Vultr internal bandwidth is free)

    For first two customers: 20GB SSD | 512MB RAM | 1vCPU | $2.5/month (I've asked Vultr if it's possible to raise the limit for resellers - unfortunetly no)

    For each another customer: 25GB SSD | 1GB | 1vCPU | $5/month

    Bandwidth is calculated per instance. Bandwidth using interal network is not counted. That's good.

    ... you can also have a look at other cloud services.

    The big adventage is also scaleability.

    Edit: Have a look at Scaleway and ServerHub.

    Thanked by 1jetchirag
  • mikhomikho Member, Host Rep

    jetchirag said: A big thank for this long explanation. I completely understand this and reason for this is ability to customize cache system, web server and other services for website.

    I'm already with cPanel and this one is addition to customers. Beside, what about running mysql at another dedi to save memory from multiple ones. I can't leave other parts. Is there anything special I can do to meet these needs?

    You could always setup services like mysql on a seperate VM on the same hardware (remember to secure it well) and tell your customers to use that IP instead of localhost when running mysql queries.

    I know some Swedish shared hosting providers who does it that way. Buyvm also offers (or at least they used to) a separate mysql instance.

    Thanked by 1jetchirag
  • ClouviderClouvider Member, Patron Provider

    Shared with Cloud Linux allows you to achieve a solution reasonably close to what you were originally aiming for.

    Thanked by 2HostBastic jetchirag
  • HostBasticHostBastic Member, Host Rep
    edited March 2017

    I agree with Clouvider, rather go with CloudLinux it offers lightweight virtual environments(LVE) for each hosting account, it will also be easier to maintain in the long run. But that is if your budget allows it.

    Thanked by 1jetchirag
  • jarjar Patron Provider, Top Host, Veteran

    I think more people should read the manual for OpenVZ 7 and fall in love with it as a result. It would be great as opposed to real virtualization because what one doesn't use in memory leaves more for the pool. There are some strong ways to limit resource usage in VZ7 as well.

    However, it is also true that one MySQL instance will use less memory than two, no matter how you spin it. Apache not so much because it spawns children based on usage anyway so there's not that much overhead for running multiple instances.

    Thanked by 1jetchirag
  • WSSWSS Member

    @jarland said:
    I think more people should read the manual for OpenVZ 7 and fall in love with it as a result. It would be great as opposed to real virtualization because what one doesn't use in memory leaves more for the pool. There are some strong ways to limit resource usage in VZ7 as well.

    What OVZ options are there for people who don't want to use Linux? (Other than Void)

  • jarjar Patron Provider, Top Host, Veteran
    edited March 2017

    WSS said: What OVZ options are there for people who don't want to use Linux? (Other than Void)

    prlctl destroy

    No but really it supports KVM now.

    Thanked by 1jetchirag
  • WSSWSS Member
    edited March 2017

    NOS! THEY BE TAKING DESTROYING MY CONTAINER!

    Thanked by 2jar jetchirag
Sign In or Register to comment.