Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Proper server configuration questions

Discussion in 'Workarounds and Optimization' started by TheNewb, Feb 3, 2017.

  1. TheNewb

    TheNewb Registered

    Joined:
    Feb 3, 2017
    Messages:
    3
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    France
    cPanel Access Level:
    Root Administrator
    Dear Cpanel community,

    This is the first time I do post on this forum and my question might actually need several threads to be answered but after searching both on this forum and online I didn’t find an answer to the following question.

    I host my personal sites and client's website on a VPS running on centOS with WHM distribution, Distribution installed by the server provider (OVH). OVH told me on the phone that they do not provide support for server optimization so after having tried to configure my server properly, breaking it and rebuilding it several times, here am I posting for help...

    I'm planning to change VPS for an SSD and I would like to seize the occasion to configure it properly before transferring the websites. The main use of the VPS is generating pages from CMSs like Wordpress Joomla & Prestashop.

    Here is the actual architecture (total of 15 sites that should rise to 25 in the near future) :

    Root Access

    Main site (SSL certificate + Failover IP)

    Other site 1 (using VPS IP)
    Other site 2 (using VPS IP)
    Other site 3 (using VPS IP)
    Other site 4 (using VPS IP)

    … etc …

    These sites are either mine or developed by me for clients, they all run Php7 and are optimized for fast loading on the site side, except for my CRM and a URL Shortener that I hadn't time to really take care of.


    I would like the new VPS to serve pages using http2.
    Use varnish and a powerfull Cache system.
    And use as maximum server ressources available.
    I'm using Maria DB but if there is a better solution I can switch.

    I'll try to provide any data needed.

    My question is where should I start.....

    I tried installing http2 but I continuously broke the server or didn't work so I stopped trying
    I tried installing varnish but I must have missed something regarding the failover Ips.

    I'm no server administrator or specialist, but I'm trying to teach myself the basics online.

    By the way the new server config will be :


    KVM OpenStack
    2 vCores
    2,4 GHz
    8 Go RAM
    SSD 40 Go
    Local Raid 10

    Additional SSD 50 Go (for backups also need to find or write a script for this but it shouldn't be the hardest part)
    - Removed -

    Best regards.

    Pierre
     
    #1 TheNewb, Feb 3, 2017
    Last edited by a moderator: Feb 3, 2017
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,427
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    This isn't yet supported with EasyApache 4. You can find the feature request on the following URL:

    EasyApache 4 HTTP2 Support

    I encourage you to vote and add feedback to this feature request if it's something you'd like to see added in the future.

    Thank you.
     
  3. TheNewb

    TheNewb Registered

    Joined:
    Feb 3, 2017
    Messages:
    3
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    France
    cPanel Access Level:
    Root Administrator
    I will vote it up obviously,

    I thought maybe there was a way to implement it using ssh.
    While waiting for support what configuration would you recommend when building Apache via ea4 to get the best performances for the type of server I need?
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,427
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
  5. Mark Croxton

    Mark Croxton Member

    Joined:
    Feb 28, 2017
    Messages:
    5
    Likes Received:
    1
    Trophy Points:
    1
    Location:
    Brighton, UK
    cPanel Access Level:
    Root Administrator
    If you need http2 support right now and everything optimized and secure 'out of the box' - and you don't need to manage client email - I can highly recommend ServerPilot with the SSD cloud host of your choice (sorry cPanel!).

    That said, cPanel can be configured to be as fast or faster than the defaults in Serverpilot (excepting http2). And there are important advantages to cPanel's more conservative approach, such as stability over the long term and the excellent support.

    Having just spent a few weeks optimising and load testing a new server, this is what I'd suggest for maximum possible performance from cPanel, without using plugins:

    EA 4 build:
    mod_mpm_event
    PHP-FPM

    MariaDB

    Almost all Apache configs you will find online are for the prefork mpm. This article shows you how to properly configure event mpm:
    Tuning/Optimizing Apache on cPanel Servers - Northon Torga

    Be sure to tweak max_children in the pool options for each of your accounts. If your error logs for the account say max_children reached, increase the value in small increments until the messages stop.

    As important for performance is getting your MySQL config right. Particularly if your databases are Innodb.

    I found that these two suggestions made the most significant difference under load:
    How large should be mysql innodb_buffer_pool_size?
    Possible to make MySQL use more than one core?

    In addition to this, set innodb_buffer_pool_instances to the number of cores you have, to make best use of them.

    As for Varnish, I'd avoid it and other plugins if you don't really need them as it adds significant complexity and a potential point of failure. You can gain similar or better performance by using a CDN for your static assets or putting your sites behind Cloudflare, either of which will give you far less trouble over the long term (Cloudbleed excepted!). That said, this looks promising: xVarnish - Varnish Simplified

    Finally, make sure you load test your changes and tweaks with a very long list of urls from your various sites. Siege is handy for this:
    Siege Home
     
Loading...

Share This Page