We are looking into offering shared hosting capable of competing with heigh end VPS magento hosting, using CloudLinux. This is still in planning stages and we plan to purchase our first server with this configuration in the next 4 or 5 months.
We will be purchasing a powerfull server to do this. The current specs include 128GB of memory and two Sandy Bridge EP E5-2687W 8x 2x 3.10GHz CPU's + enough hard drive speed to cope with the other specifications.
We also run cPanel on our servers although I do not believe this to be directly related with our question.
I have read the following articles on Cloudlinux's blog :
These articles advise low settings for both fastcgid and APC so not to use up too much memory on a shared hosting server.
For Magento we need the following memory specifications :
512 MB memory limit for PHP
256 MB for APC caching per account
Here are the available (or soon available) solutions I have come accross and their different problems :
HTTP SERVER SOLUTIONS
Apache 2.4 + PHP 5.4 + FastCGID + APC :
This setup is secure and quite fast but has one major problem : Each FastCGI process spawn's it's own memory cache. One User's account could spawn multiple cache's and would not reuse existing cache spawned by another process.
Apache 2.4 + PHP 5.4 + FastCGID + PHP-FPM + APC
This setup allows to setup different pools of users so it could be possible to setup a pool per account on the server just like we setup a virtual host per account. This is more flexable and would allow us to specify different limits per user but fr om what I have read so far has one major drawback ( that I would love to be corrected on !) :
Users fr om different PHP-FPM pools can access each others APC memory cache.
To get around this, I have read that you would need to run individual processes for each account creating a new init.d file for each process of PHP-FPM specifying a different config file.
I do not have an idea of what the over head would be to run 600 or more PHP-FPM proceses on the same server but I can see a reeboot being very long and the setup of new accounts being quite complicated (I suppose a hook on account creation could create a new config file and init.d file…
I contacted CloudLinux in Feburary about Mod_ruid2 and was advised against it for the following reasons :
- Not concidered as secure as FastCGID or SuPHP
- CloudLinux Memory lim its would not work with it
- CloudLinux CageFS would not work with it
cPanel seem to encourage people to use Mod_ruid2 and say they are not aware of CloudLinux's memory lim its not working wih Mod_ruid2.
Has this changed ? Do you still think Mod_ruid2 to be insecure and not working completly with CloudLinux ?
Would using Mod_ruid2 allow each user to have a single shared APC cache accessible by multiple different processes owned by the same user but not accessible by other users ?
Fastcgi + APC
It seems that Fastcgi does everything that is needed but has not been upd ated since 2006. I would prefer to not use obsolete software if it can be helped.
The following article explains how to set up Fastcgi to use individual APC cache size se ttings per user and individual php.ini files if required.
On the litespeed site, the last release in the news on their main page was in August 2011. This gives me the impression that the project was abandonned or at least not beeing worked on for quite some time.
Is Litespeed still a recommened solution by CloudLinux ?
NGnix is not a solution here, as it is not yet supported by cPanel and htaccess files are needed by our customers.
I have also looked at different OOPCode caching systmes and have chosen APC because :
- Eaccelerator :
The last release was in 2010, Their website only works in https and has an expired SSL certificate. Project abandonned ?
- Xcache :
Xcache is supposed to be a bit faster than Eaccelerator but also doesn't seem to be so popular on cPanel, lots of people say it does not install well.
- APC :
APC is not currently suppored directly by EasyApache but is supported by cPanel by installing it through PECL. APC is a maintained project and will be part of the PHP6 project.
We are looking for suggestions about how to make the best use of our new configurations. We are not looking into putting thousands of sites on these servers nor to only host Magento sites.
We will be hosting both Magento and non Magento sites but are looking for a secure way to have fast page loads with Magento sites, with or without having a specific hosting plan for these sites.
The ideal would be to be able to have fast loading Magento sites for low volume trafic sites on our standard plans and have a more expensive plan offering more CPU and Memory.
For the hardware, we could slightly lower the CPU specs and get 192 GB of memory by in theory, if the right solution can be found 128 GB should be plently for hosting arround 800 sites.