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.

Heavy Load but very few connections

Discussion in 'Workarounds and Optimization' started by maverick23, Jan 9, 2016.

  1. maverick23

    maverick23 Well-Known Member

    Joined:
    Feb 23, 2005
    Messages:
    92
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    DataCenter Provider
    Hello Everyone!

    I needed help to optimise my server.

    i have only 15 wordpress sites on my server but the traffic on these sites is pretty high.

    I am currently using the server with below configuration:-

    Dual processor E5-2620, 32 GB RAM and SSD drives.

    the concurrent users are not more than 100 (i have implemented the limit on the apache connections). But i still see that my server load doesn't go below 8 or 9.

    When i run top command i see most of the resources are consumed by MYSQL and there are multiple processes running for apache.

    Is there a way that i can control the resources consumed by mysql?

    Thanks
    Rajat
     
  2. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,145
    Likes Received:
    34
    Trophy Points:
    48
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hello :),

    I will suggest you please try to optimize your mysql with the mysql tuner scripts and monitor your server performance for some time.

    You can check live mysql process through following command.

    Code:
    mysqladmin proc
     
  3. maverick23

    maverick23 Well-Known Member

    Joined:
    Feb 23, 2005
    Messages:
    92
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    DataCenter Provider
    i tried doing it but this doesn't show me more than 4-5 queries running at any given point in time.

    example:-

    | 312681 | leechprotect | localhost | leechprotect | Sleep | 1542 | | |

    | 321301 | xxxxxxxxxxxxxx | localhost | xxxxxxxxxxxxxx | Sleep | 0 | | |

    | 321302 | xxxxxxxxxxxxxx | localhost | xxxxxxxxxxxxxx | Sleep | 1 | | |

    | 321303 | xxxxxxxxxxxxxx | localhost | xxxxxxxxxxxxxx | Query | 0 | Sending data | SELECT post_id, meta_key, meta_value FROM xxxxxxxxxxxxxx WHERE post_id IN (13068) ORDER BY meta_id A |

    | 321304 | xxxxxxxxxxxx | localhost | xxxxxxxxxxx | Sleep | 0 | | |

    | 321305 | xxxxxxxxxxxx | localhost | xxxxxxxxxxxxxx | Sleep | 0 | | |

    | 321306 | root | localhost | | Query | 0 | | show processlist
     
  4. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,446
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
  5. maverick23

    maverick23 Well-Known Member

    Joined:
    Feb 23, 2005
    Messages:
    92
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    DataCenter Provider
    Thank you, link is very helpful.

    i see that memory consumed for my server is also ways very high..

    1 minute load avg: 4

    Swap used: 66520 kB

    Mem used: 30114264 kB

    packets received (2 secs): 43015

    packets sent (2 secs): 531419
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,676
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Were any of the troubleshooting steps in the thread you were linked to helpful in determining the cause of the memory usage?

    Thank you.
     
  7. maverick23

    maverick23 Well-Known Member

    Joined:
    Feb 23, 2005
    Messages:
    92
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    DataCenter Provider
    Hi Michael,

    Thank you for checking up.

    I see that even after all the optimisation with mysqltuner and other things my DB load still high.

    the script that was there shows be below results :-

    [L: 2] [P: 516] [Swap Use: 00% ] [pps in: 46397 pps out: 1364273]
    [L: 3] [P: 534] [Swap Use: 00% ] [pps in: 38741 pps out: 306077]
    [L: 2] [P: 513] [Swap Use: 00% ] [pps in: 68804 pps out: 1941925]

    is there anything else i can do?

    Thanks
    Rajat
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,676
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    How high is the load, and have you attempted to determined which database is at fault through the use of the "mysqladmin processlist" command again since the recent optimizations?

    Thank you.
     
Loading...

Share This Page