How to make cPanel VPS 6 times faster with FCGI + Xcache + MPM Event

coolice

Owner
cPanel is the most popular control panel for our hosting need. When we has to move to shared hosting we always choose it. We can use it in its full potential on a VPS too. Most of the webmasters don’t know how to do it.

Everything is installed after three commands. In the default installation some things like GD (for the pictures) and the opcode cache for suphp and MPM (multi processing module). This leads to a slow operation of the server. Results could be seen in http://coolicehost.com

Dear reader, now I’m going to show you how to make your VPS six times faster with the price of using A LITTLE MORE RAM. :)

The default combination of cPanel is Apache + SUPHP

I am suggesting you to make it Apache + FCGI + XCache

You have to open the WHM panel. Choose EasyApache from the left menu. From the*ready-made*settings we go to PHP Encryption and Image Manipulation > Start customizing Based On profile =>

Choose Apache 2.4.7 (works stable)

Next Step

click on php

5.4.25 (It is turned on by default and it is recommended to use it.) The second best option is 5.3.28

Next Step

Short Options List is popping out

put a check on Xcache 3.0.3 for PHP


click on Exhaustive Options List

You will see a long list with items–no worries, they are checked by default PHP Encryption and Image Manipulation

You have to add checks on

Mod FCGID

MPM Event

MySQL "Improved" extension

TTF (FreeType) – if not checked

Tidy
======================================

Choose a name and click save and build at the bottom

After the building finishes and everything is compiled you will see a confirmation. From the drop down menu for the type of PHP you have to choose FCGI and suExec ON

You are ready.

After that, if you use W3 TOTAL CACHE, you can turn on Page Cache in the memory of Xcache. It flies like a plane and there is no overloading.
 
Последно редактирано от модератор:
  • Like
Реакции: Rock
Should Choose Webserver - cPanel Forums

cPanel is the most popular control panel for our hosting need. When we has to move to shared hosting we always choose it. We can use it in its full potential on a VPS too. Most of the webmasters don’t know how to do it.

Everything is installed after three commands. In the default installation some things like GD (for the pictures) and the opcode cache for suphp and MPM (multi processing module). This leads to a slow operation of the server. Results could be seen in http://coolicehost.com

Dear reader, now I’m going to show you how to make your VPS six times faster with the price of using A LITTLE MORE RAM.

The default combination of cPanel is Apache + SUPHP

I am suggesting you to make it Apache + FCGI + XCache

You have to open the WHM panel. Choose EasyApache from the left menu. From the*ready-made*settings we go to PHP Encryption and Image Manipulation > Start customizing Based On profile =>

Choose Apache 2.4.7 (works stable)

Next Step

click on php

5.4.25 (It is turned on by default and it is recommended to use it.) The second best option is 5.3.28

Next Step

Short Options List is popping out

put a check on Xcache 3.0.3 for PHP


click on Exhaustive Options List

You will see a long list with items–no worries, they are checked by default PHP Encryption and Image Manipulation

You have to add checks on

Mod FCGID

MPM Event

MySQL "Improved" extension

TTF (FreeType) – if not checked

Tidy
======================================

Choose a name and click save and build at the bottom

After the building finishes and everything is compiled you will see a confirmation. From the drop down menu for the type of PHP you have to choose FCGI and suExec ON

You are ready.

After that, if you use W3 TOTAL CACHE, you can turn on Page Cache in the memory of Xcache. It flies like a plane and there is no overloading.
Thanks for the tutorial. I will try it. On my VPS, even when not set up and with a wordpress running on, I‘ve never achieved more than 10% usage of the CPU. For the RAM I use no more than 6 GB even with 6k online users. I will make it to see what will happen, because I expect a lot of visitors

The price of this VPS is 25 euro a month. In Bulgaria you can’t find that*kind of*service for a price like this with quality high like this.
 
Последно редактирано от модератор:
For this price, isn’t it a vserver VPS (the RAM limits are more liberal there). The provider will start to whine when a few bigger clients rely on one server or when one of the sites grow out of control, if you are the only big fish there will be no problems. You’ve got a good offer. Are you paying for a promo like “pay for six months and get twelve” :)
 
Последно редактирано от модератор:
DSO vs suphp vs fastcgi - cPanel

For this price, isn’t it a vserver VPS (the RAM limits are more liberal there). The provider will start to whine when a few bigger clients rely on one server or when one of the sites grow out of control, if you are the only big fish there will be no problems. You’ve got a good offer. Are you paying for a promo like “pay for six months and get twelve” :)

I pay every month and It is the kind of service you describe. The thing you get for 12 month payment is a free installation of the service. Otherwise it costs 10 euro. Today I’ve received an e-mail with offers for dedicated servers and I’m shocked:
Two Intel Xeon E5 2620V2, each of them with six cores at 2.0 Ghz, so twelve cores in total
128 GB of RAM (REG ECC)
any combination of SSDs / HDDs available
at 139.99 EUR per month
 
Последно редактирано от модератор:
Best cPanel PHP Setup

I want to ask for a simple explanation. As much as I know, FCGID starts a couple of processes. Every process has its own opcode cache (xcache), which on some level is not that good and it wastes some RAM. It is better than nothing, but you have to know about it. Opcode is more effective when all is using of one pool. PHP-FPM doesn’t have this disadvantage, but may be it has others. I’m not that into administration, coolice may be able to talk about this?
 
Последно редактирано от модератор:
DSO vs. CGI vs. suPHP vs. FastCGI / Web / Hosting

Multiple pools are okay when you are on a hosting from the higher segments which offer good quality of the service. You have to know how to setup everything and yes, it makes your expenses bigger, but the clients are okay and they are paying more in exchange.

The problem is when you use 250-299 dollar servers to get a few thousand clients on it (checked with reverse ipon a few shared servers’ ip) – something done by a lot of all unlimited hosting providers. This leads to suphp and a lot of whining about cpu usage.

PHP-FPM gets the costs down and It will work better on a single pool, but for now the thing that could be seenready-made for php-fpm in cpanel is far from secure. The solution made for a free panel like ispconfig is better. Not a single practices of the most used one is not available in cPanel...
 
Последно редактирано от модератор:
How to Configure APC Cache on Virtual Servers with PHP

I want to ask for a simple explanation. As much as I know, FCGID starts a couple of processes. Every process has its own opcode cache (xcache), which on some level is not that good and it wastes some RAM. It is better than nothing, but you have to know about it. Opcode is more effective when all is using of one pool. PHP-FPM doesn’t have this disadvantage, but may be it has others. I’m not that into administration, coolice may be able to talk about this?

The main difference, performance wise, is that mod_fastcgi can share the same PHP opcode cache between several thread running PHP code while mod_fcgid can’t. That translates, usually, to more connections served with mod_fastcgi than with mod_fcgid.

I’ve never used any panel in my life so if coolice can explain what is really happening behind the scenes and on what this is an equivalent in a normal installation, I will be thankful.
 
Последно редактирано от модератор:
I found this before a few days: http://centminmod.com/

May be, if my server was not set up under virtual min, I was going you use tis. You want nginx to deliver the static files and apache to deliver the dynamic ones – NAAH! If you want nginx+php-fm – NAAH! I see only bad things in all these panels, when it comes to a more professional configuration. The guilt is not in virtuamlin, it looks like all the panels have this disadvantage. Centmin seems to have the most balanced solution – full access to the fastest working stable and modern software versions and in the same time a naked console. It is user-friendly in its own way.
 
Последно редактирано от модератор:
Simply scale with Nginx, Memcached, PHP-FPM and APC

I was wondering how to write this though…

On the one side you are asking me to tell you the answer. You wonder whether I know it or not. Well, I know it. The expenses are bigger because the standard cpanel / easyapache is fcgid, but it is not a lot when configured right.

On the other side are the lazy ones that made themselves a hosting company while they didn’t even read what is wrote*in the documentation of the software they are using. I am going to help them if I describe the issue.

On the moral side of the story I always want to be useful for the forum, but now the forum doesn’t need this information. The people who use 5 dollar VPSs don’t have to spend 16 dollars for a cPanel when they can invest in a bigger server which will pack more resources. For the other cases, every free panel has its own php-fpmsolution. So the problem doesn’t persist for the community. For the case mentioned in the thread, it is about a 8 GB VPS looking for the easiest solution.

I found another option after the reverse engineering. Why the bigger hosting providers use something old and weak which is the worst possible choice. – no more jokers.
If you feel the hosting provider is right when not reading the manuals and the blogs of the software he makes money from, I will post the answer here, but I want to see*a confirmation from you. :)
 
Последно редактирано от модератор:
Vps optimization & Apache suphp tips and know how

I found this before a few days: http://centminmod.com/

May be, if my server was not set up under virtual min, I was going you use tis. You want nginx to deliver the static files and apache to deliver the dynamic ones – NAAH! If you want nginx+php-fm – NAAH! I see only bad things in all these panels, when it comes to a more professional configuration. The guilt is not in virtuamlin, it looks like all the panels have this disadvantage. Centmin seems to have the most balanced solution – full access to the fastest working stable and modern software versions and in the same time a naked console. It is user-friendly in its own way.

The forum is using the same from the last night. I was going to test it before (eva2000 is in our support team forvbulleting). See what the header is sending to the server. The compiled package is a compiled package – nuff said. The forum now works with a 150 mb RAM together with the DB and IT FLIES! The only thing I’ve added is one mc. Good old dos and nc days.

Do you want to see the links on how to set up cpanel with fcgid by the big hosting providers. I can hate the shared companies which are trying to go cheap. They deserve it.

P.S: ISPConfig is a good Nginx panel and it has a lot of places to add rules for the clients (restrictions) so they can add the rewrites alone.
 
Последно редактирано от модератор:
cPanel: suPHP or FastCGI. What handler you prefer?

Well I’m a good person so I will tell you. Once upon a time when we started the forum with Blinky, we told to the users here that they can earn 200 dollars a month by making a herbal blog with 10 unique articles and adding it to 100 directories. After a few months money was pouring. The ones who used it were satisfied. It worked until the first few general updates.

So, I will help the lazy companies

Let’s say you want to achieve this: To host thousands of clients on one cPanel server…http://www.cloudlinux.com/blog/clnews/199.php A good must read article even when you are not using cloudlinux. Don’t forget that they are one of the base partners of cPanel and they are mentioned all over the site.

The solution for fcgid? First you don’t have to use the default settings which are 100 for a client…php-fpm pools are less and second it is not required to hold them in the ram for an hour…cloudlinux have an article on this issue Perfecting Fastcgi For Shared Hosting - http://www.cloudlinux.com/blog/clnews/perfecting-fastcgi-settings-for-shared-hosting.php

And now you have to directly put PHP Opcode Caching and FCGID in shared hosting It is written two years ago like the article above, but no one reads it. With a few words, it doesn’t matter that it makes different pools for the. It matters when a process is opened and it automatically opcode the index.php. The size doesn’t have to be256 mb. http://www.cloudlinux.com/blog/clnews/how-opcode-caching-works-with-modfcgid-in-shared-hosting.php...

After the last three articles by the main partner of cPanel that are posted years ago we can say that if you never read them, go to the datacenter, get you servers and never sell hosting again. :lol:

As you can see this does not help any of our member.. I just gave the know how to the lazy hosting providers

And now the grande finale – what I reverse engineered before some time.... I was sitting and wondering why when there is Eaccelerator and Xcache in Easy Apache, all are using APC that is from the last year and ZendOpcache. Eaccelerator is the most update one… the upgrades start from 2010 it is the slowest (xCache and APC are dancing on the first and second place) Zend Opcache is 5-20% faster than APC and it is more stable.

Where is the key? What is the secret?

You can see it on their home page - http://eaccelerator.net/

eAccelerator stores compiled PHP scripts in shared memory and executes code directly from it. It creates locks only for a short time, while searching for a compiled PHP script in the cache, so one script can be executed simultaneously by several engines. Files that can't fit in shared memory are cached on disk only.[/B]

Yes, the scripts will run under fcgi and will be opcode cache and kind of faster, but not because of the RAM – the disk is responsible. CHEAP! I think they can make it truly drive based, but I’m not sure. Never played with this. :)

As you can see there is no big secret, that could be useful for our bps users. In the first case it will be helpful for the lazy hosters who don’t like to read and in the second case we are talking about people who want to have cheap service that makes a lot of money by fake telling people who the service is fcgi with opcode. I’m wondering why they don’t tell their clients for the saving of the RAM.

PS: For our next project I will not put my name on it. I will get it running anonymously and I will get a cheap server from the hentzner auction. I will upload a cpanel, suphp or fcgi and opcode cache, eaccelerator on the disk. I will lock 15% from a core and you will see 100% in the panel. I will limit the DB to 10 connection and I will put a price of 10-20 dollars for a year. I will quote unreal parameters on our page and I will oversell. I will block the yandexand bing bot so they will not overload our server. (we can say that 900 visitors from the two engines can give you 5 cents each, it is 45 dollars at the and that are going in the thrash). Over 20gb accounts will be not backed up. That is the real story of all cheap hosting companies.

Oh…I will wait for someone to get up to a limit and I will start to tell him to update, no matter that his site is 1gbbig and it uses only 20 gb bandwidth. Wow, what an unlimited service… :clap:
 
Последно редактирано от модератор:
Apache with fcgid - Acceptable performance

After doing the w3 total cace setting it says this, when I try to clear the cache: Warning: xcache_get(): XCache var cache was not initialized properly. Check php log for actual reason
 
Последно редактирано от модератор:
FastCGI configuration on cPanel Apache

I think xcache varcache is not set up (you can check in php info if this is on (there will be a zero if it is disabled)

Open the console
HTML:
nano /usr/lib/php.ini
Add something like this at the bottom
xcache.size = 32M
xcache.count = 2
xcache.var_size = 64M
xcache.var_count = 2

Click Ctrl + X and then Y and enter and you are ready

I’ve made the varcache bigger so you can put there more stuff from your blog in it.
 
Последно редактирано от модератор:
FCGI / cpanel -- easy or hard? : CPanel and WHM - VPS

This can be seen in almost 100% of the WP users which rely on a caching plugin. When they install xcacheeverything messes up. The problem is in the default value of xcache.var_size , which is zero in WP. Change it to at least 64MB and It will work like a charm. The other option is to turn off the caching plugin of WP. It will be better to use the second method, because when there are too many layers of caching and something goes wrong, debugging will be the worst thing in your life. And this will happen especially when you’ve never read theWordpress codex and when you don’t have knowledge on its core and its code.
 
Последно редактирано от модератор:
От: How to make cPanel VPS 6 times faster with FCGI + Xcache + MPM Event

One of the easiest method to enhance the cpanel servers would be to install cpanel pluggin called "Apachebooster"
When installed on cpanel server, it can enhance the server performance many folds.

A lot of Datacentres round the glob are using it and has benefitted from its usage.
More info from :
 

Горе