Low-end, Low cost cPanel VPS using eNlight

  • Filter
  • Time
  • Show
Clear All
new posts

    Low-end, Low cost cPanel VPS using eNlight

    [I had considered posting this in the Tutorials section, though I'll keep it specific to the eNlight platform.]

    As more features are added and Linux kernel is expanded, it becomes increasing difficult to run an effective server on limited resources. Unfortunately, the bloatware that blights other OSes appears to have migrated onto this once lean & mean platform. Enough background drivel!

    Below is an example outline of a low-end Virtual Machine (VM) based on the eNlight platform.

    Scale VM: Yes
    Min RAM: 192MB (notional and unlikely to reach this low)
    Max RAM: 512MB
    Min CPU: 0
    Max CPU: 1 (initially set to 2, to allow quicker compilations during Apache rebuilds)
    Performance Mode

    OS template: Centos 6.2 64-bit 'bare' with WHM/cPanel manually installed, using the instructions on the cPanel site.
    cPanel set on 'Current' version.
    Latest Apache/mySQL and PHP 5.3.
    CSF firewall installed and most warnings heeded. All irrelevant services stopped/disabled, as instructed.

    The sample configuration shown below should be used as a guideline and will not be optimal for your particular server - it depends on what software packages are installed and the traffic seen on your site. You should install the cPanel plugin called munin, as well as the command line script called mysqltuner.pl . One key parameter for Apache, in terms of eNlight performance appears to be "Server Limit" and you should use munin to monitor what is used and adjust accordingly, giving some headroom for peaks in demand. For mySQL, the biggest impact in terms of memory usage is 'max_connections' and can likely be reduced to around 20, depending on your situation - mysqltuner will tell you what has been used. Buffers and cache play a vital role in improving site throughput and reducing server load - expect to 'tweak' settings once a week at first, until a baseline of activity is established.

    Apache Configuration (found in WHM, Service Configuration)

    Start Servers: 4
    Minimum Spare Servers: 3
    Maximum Spare Servers: 6
    Server Limit: 64
    Max Clients: 50
    Max Requests Per Child: 5000
    Keep-Alive: On
    Keep-Alive Timeout: 3
    Max Keep-Alive Requests: 50
    Timeout: 120

    mySQL Server Configuration ( /etc/my.cnf ) should include the following:
    port		= 3306
    socket		= /var/lib/mysql/mysql.sock
    max_connections = 30
    key_buffer_size = 16M
    join_buffer_size = 4M
    max_allowed_packet = 1M
    table_open_cache = 32K
    sort_buffer_size = 512K
    net_buffer_length = 8K
    read_buffer_size = 256K
    read_rnd_buffer_size = 512K
    myisam_sort_buffer_size = 8M
    query_cache_size = 48M
    query_cache_limit = 48M
    tmp_table_size = 16M
    max_heap_table_size = 16M
    thread_cache_size = 4
    wait_timeout = 180
    interactive_timeout = 180
    table_cache = 4M
    Hopefully, this will help a few people, though I don't pretend to be an expert and YMMV, as they say. Keep one thing in mind, your server will be different to everyone else's and there is no "one size fits all". If you can optimise your server to some degree, then not only will you help your own sites but also others on the same node - everybody happy, peeps. This goes, for whatever size of VM that you have, so get tweaking, carefully! One last thing - take a backup of my.cnf BEFORE you make changes, as I can almost guarantee that at least once mySQL server won't start due to a small typo. You have been warned.
    Last edited by ejsolutions; 05-02-2013, 22:29.

    Re: Low-end, Low cost cPanel VPS using eNlight

    This is all looks very complicated. I am not computer-savvy enough to know how to set up something like this. Is there assistance offered along the way?


      Re: Low-end, Low cost cPanel VPS using eNlight

      Originally posted by Mawkisha View Post
      This is all looks very complicated. I am not computer-savvy enough to know how to set up something like this. Is there assistance offered along the way?
      You can certainly take help of tech support with this and it would be done for you upon request. May i know if you have a VM or eNlight here?