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!

Optimization tips for capnel servers ?

Discussion in 'Workarounds and Optimization' started by bhanuprasad1981, Jan 12, 2012.

  1. bhanuprasad1981

    bhanuprasad1981 Well-Known Member

    Aug 5, 2008
    Likes Received:
    Trophy Points:
    Optimization tips for cpanel servers ?

    i saw these at wht forums but i don't know much abt it , please let me know how to implement so it can beneficial to all.

    a) removing unnecessary apps and services from the OS
    i disabled some which are recommended by csf any other which are not listed ?

    b) tuning mysql parameters
    some helpful tips but yes every server has different settings

    c) optimizing disks - turn off noatime
    this is bot confusing for me since i use raid 0 , but above statement says turn off whereas vbulletin guys suggests using it ?

    d) installing apache and php with only the modules required to run the server
    would like to know which are optional and are added default by cpanel , is generally host vbulletin and wordpress sites.

    e) using a php cache
    tried xcache but its just increasing disk usage

    f) minimizing apache logging (not logging .css, .js and more extreme .jpg, gif ...)
    would like to know info on this

    g) if memory permits set all logging to a ramdisk and appending to HDD nightly
    any process to do this ?

    also i would like to know adding extra ram can increase mysql performance or decrease cpu usage ?
    #1 bhanuprasad1981, Jan 12, 2012
    Last edited: Jan 12, 2012
  2. storminternet

    storminternet Well-Known Member

    Nov 2, 2011
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. alphawolf50

    alphawolf50 Well-Known Member

    Apr 28, 2011
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator
    B) Helpful hints...
    • Learn which buffers are global and which are per-session, and realize that bigger is not always better, especially for per-session variables. Examples where bigger is not always better: sort_buffer_size and join_buffer_size.
    • Ideally, your key_buffer_size is large enough to hold all of your MyISAM indexes, with enough room left over to store any indexes created on temporary tables.
    • The query cache can help read-heavy loads where the same queries are executed many times verbatim, but can become a bottleneck if it is too large or if there are frequent writes to your DB.
    • Many people forget that tmp_table_size is limited by max_heap_table_size. Unless for some reason you need max_heap_table_size to be larger than tmp_table_size, always set these to the same value.
    • Learn how to use SQL's EXPLAIN statement to optimize queries and indexes.

    C) You're using raid 0? I hope you have very good (and frequent) backups. If one hard drive goes bad, you will lose all of your data. Regardless, I always set noatime and nodiratime on /, /home, /var, and /usr.

    E) If you happen to be using suPHP, xcache will not work (nor will any other opcode cache).

    Adding RAM can increase mysql performance if you need more RAM :) The MyISAM engine relies heavily on the OS filesystem buffer cache. If you have enough RAM, the OS will end up caching most of your data in RAM upon first use, making each successive access much much quicker. This benefit goes beyond MySQL too.

    If you're experiencing high load or want help tuning MySQL, just post your my.cnf, mysqltuner, and the results of "top" and "vmstat 5 5". Please post results in CODE tags for easy reading.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice