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.

Most Optimized VPS Configuration

Discussion in 'Workarounds and Optimization' started by Ana_PP, Apr 10, 2016.

  1. Ana_PP

    Ana_PP Registered

    Joined:
    Apr 9, 2016
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Sweden
    cPanel Access Level:
    Root Administrator
    Hello all,

    I have a VPS with only one Joomla web site hosted on it, with about 1500+ visits per day, database with 200.000+ rows and with the following server configuration:

    Code:
    CENTOS 7.2 x86_64 kvm
    
    Processor Information
    Total processors: 2
    Processor #1
    Vendor
    GenuineIntel
    Name
    Intel(R) Xeon(R) CPU E5-2620 v3 @ 2.40GHz
    Speed
    2399.996 MHz
    Cache
    15360 KB
    Processor #2
    Vendor
    GenuineIntel
    Name
    Intel(R) Xeon(R) CPU E5-2620 v3 @ 2.40GHz
    Speed
    2399.996 MHz
    Cache
    15360 KB
    
    Memory Information
    [    0.000000] Memory: 5925176k/7340032k available (6243k kernel code, 1050048k absent, 364808k reserved, 4180k data, 1604k init
    
    my.cnf Settings:
    
    [mysqld]
    max_connections = 300
    join_buffer_size = 3
    tmp_table_size = 128
    max_heap_table_size = 128
    default-storage-engine=MyISAM
    innodb_file_per_table=1
    max_allowed_packet=268435456
    open_files_limit=10000
    innodb_buffer_pool_size=134217728
    
    
    From time to time I get high CPU loads, and the top processes that I usually see are:

    Code:
    <defunct>
    
    /public_html/index.php
    
    /usr/sbin/mysqld --basedir/usr --datadir/var/lib/mysql --plugin-dir/usr/lib64/mysql/plugin --log-error/var/lib/mysql/server.example.net.err --open-files-limit10000 --pid-file/var/lib/mysql/
    
    Sometimes there are great amount of MySql queries such as updating and sorting tmp table or INSERT INTO `ujr8q_session.

    Can you please help me how to configure my.cnf file so I can get best performance?
    10x a lot!

    For example now I have these MySql processes (attached) that are large in number and the CPU % goes up to 65 :(

    - Removed -
     
    #1 Ana_PP, Apr 10, 2016
    Last edited by a moderator: Apr 10, 2016
  2. SysSachin

    SysSachin Well-Known Member

    Joined:
    Aug 23, 2015
    Messages:
    335
    Likes Received:
    25
    Trophy Points:
    28
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hi,

    You can try to tune your MySQL performance using MySQL tuner script.

    Download the MySQLTuner script on your server and run it.

    MySQLTuner is a script written in Perl that allows you to review a MySQL installation quickly and make adjustments to increase performance and stability.
     
  3. Ana_PP

    Ana_PP Registered

    Joined:
    Apr 9, 2016
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Sweden
    cPanel Access Level:
    Root Administrator
    Thank you for you feedback. But could you please explain to me ho to do it? I am no system administrator nor DBA :(
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page