Рекомендации по повышению производительности
Форум
  1. Forums
  2. CloudLinux and Control Panels
  3. CloudLinux and cPanel
  1. Mark Bailey
  2. Friday, 19 July 2013
  3.  Subscribe via email
Hi,

We use CloudLinux and CageFS on our cPanel servers (generally VPSes with 8 GB RAM, hosting 200 sites or so per server). We do WordPress-specific hosting.

I\'m wondering if I can ask for a few recommendations on performance enhancement. Our goal is to provide the best possible performance and stability.

We use Varnish (via the UNIXy WHM plugin), and it gives us an exceptional boost. We also run FCGID. And of course we have optimized MySQL. Beyond that we want to fine-tune our setup, but some of the facts are vague regarding optimal setup of FCGI, opcode caches, etc.

And, surprisingly, opcode caches don\'t seem to give us much (or any) performance boost beyond what Varnish is already doing. We\'ve also tried nginx (also via UNIXy) but didn\'t see any real gains beyond what Varnish offers. We also had stability issues with nginx.

So, a few questions:

  • What are the best FCGI settings along with CloudLinux? We\'ve seen a couple of tutorials and blog posts, so I want to make sure we have the right one.
  • Have other people experienced temperamental nginx performance? I know lots of people are running it successfully. On the other hand I have seen tons of 502 \"nginx bad gateway\" errors all over the Internet from time to time.
  • On a cPanel hosting server running CL, what is the best opcode cache between eAccelerator and APC? If eAccelerator, is the cPanel EasyApache implementation good enough? We understand that it doesn\'t cache user data, but it still seems to give us great performance.
  • If APC, what are the best settings (memory, etc.) for shared hosting. I\'ve also heard that APC can slow down a server due to IO. Also, as for the ssh memory setting, that is per user, right? So if we had 100 sites on a server with 128 MB APC memory, that would add up quickly. Or do all users share a single shared memory pool?
  • Is memcached a good companion to another caching mechanism?

Thanks in advance for any advice!

Mark
Rate this post:
  1. 19.07.2013 16:07:53
  2. # 1
Mark Bailey Accepted Answer
Posts: 8
Joined: 19.07.2013
0
Votes
Undo
Also, are there any compelling arguments for a certain MPM (prefork vs. worker)? And what would the best FCGI settings be for each?
  1. 23.07.2013 15:07:56
  2. # 2
Ray Baron Accepted Answer
Posts: 32
Joined: 01.04.2013
0
Votes
Undo
The following does not directly address all of your questions but one-upon-a-time I had a similar setup to yours.  Since your question was "Our goal is to provide the best possible performance and stability ..." my solution for the fastest and most stable servers was to switch all of my servers to LiteSpeed. 

LiteSpeed + LSPHP is faster than Apache + FastCGI, hands-down.  I've been testing XCache on a couple of servers with very high traffic and it has been excellent thus far.  (Any remarks in the LiteSpeed forums about XCache not being compatible are no longer true as of LiteSpeed v4.2.)

I tried the Unixy Varnish plugin but had spotty results in terms of configurability and speed.  I don't want to generate a debate (I know the Unixy folks are quick to question any hint that LS cache is as fast or faster than Unixy Varnixh) but my testing shows LiteSpeed cache is faster than Unixy Varnish.
  1. 23.07.2013 18:07:39
  2. # 3
Mark Bailey Accepted Answer
Posts: 8
Joined: 19.07.2013
0
Votes
Undo
Hello,

Thanks for the reply. We had tried LiteSpeed in the past and had good results performance-wise, but we dropped it for several reasons:
  • Cost (e.g., compared to UNIXy Varnish)
  • No direct support. We were told to use forums only or they would charge us for contacting them directly if we did so again.
  • Ambiguous documentation.
  • Very hard to find answers on how to configure things like the cache.

Maybe we\'ll try again, but I seem to recall that the benefits of LiteSpeed came at the cost of frustration in those areas.

In case we do try it again, do you know which PHP handler we should use, or any other configuration we should use to take advantage of Xcache or other opcode caches?

Also, with LiteSpeed, I assume we lose the ability to use CloudLinux\'s PHP Selector, is that true?

Thanks again for the info.

Mark
  1. 23.07.2013 18:07:35
  2. # 4
Mark Bailey Accepted Answer
Posts: 8
Joined: 19.07.2013
0
Votes
Undo
Oh, I forgot perhaps the biggest reason we dropped LiteSpeed: incomplete mod_security support. We run Atomic Secured Linux, and Atomicorp told us that our systems would still be insecure if we used LiteSpeed. I don\'t know if that has changed yet.

Thanks,

Mark
  1. 24.07.2013 03:07:14
  2. # 5
Richard Hordern Accepted Answer
Posts: 219
Joined: 19.03.2011
0
Votes
Undo
The mod security approach is good for customers who never update their scripts but bad for customers who do as it add\'s quite a lag to the normal response times.
  1. 25.11.2013 02:11:19
  2. # 6
Duplika Accepted Answer
Posts: 10
Joined: 03.12.2012
0
Votes
Undo
In case we do try it again, do you know which PHP handler we should use, or any other configuration we should use to take advantage of Xcache or other opcode caches?
I'd like to know this as well. What's the advice opcode for shared hosting clients at cPanel / CloudLinux servers (I understand XCache is the adviced one for LiteSpeed, waiting for their confirmation.

Also, with LiteSpeed, I assume we lose the ability to use CloudLinux's PHP Selector, is that true?

Indeed, LiteSpeed works fine with CageFS, allowing clients to use PHP selector.
  1. 14.05.2015 21:05:34
  2. # 7
Jose Dieguez Accepted Answer
Posts: 7
Joined: 20.07.2014
0
Votes
Undo
Sorry for bringing this post back to life.

I wanted to know if anyone is using xcache with CL+CageFS+PHP Selector+LiteSpeed.

I have just installed/enabled it, but don\'t know wich settings would be the best.
  1. 13.06.2015 01:06:54
  2. # 8
Jose Dieguez Accepted Answer
Posts: 7
Joined: 20.07.2014
0
Votes
Undo
Double-post, sorry for that, but until now, CloudLinux with CageFS and PHP Selector on LiteSpeed, it\'s a great (if not perfect) combination.

Several production servers with that config.

The only bad part, is can\'t use mod_security (litepeed fault) but i hope, in the future it will be compatible.
  1. 19.09.2015 15:09:25
  2. # 9
Hostking Accepted Answer
Posts: 38
Joined: 07.11.2012
0
Votes
Undo
I\'m sure it works with Comodo WAF Rules for Litespeed fine.
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!
гость
Submit Your Response
Upload files or images for this discussion by clicking on the upload button below. Supports gif,jpg,png,zip,rar,pdf
• Insert • Remove Upload Files (Maximum File Size: 2 MB)
Captcha
To protect the site from bots and unauthorized scripts, we require that you enter the captcha codes below before posting your question.