Announcement

Collapse
No announcement yet.

high cpu and ram usage on new vps

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • high cpu and ram usage on new vps

    my last vps is OpenVz + SolusVM
    my load avg : 0.98 ~ 2
    ram usage : 700 Mb ~ 1.5 Gb
    and my new vps have many problem i try to config but problem not solved
    i install CpanelNginx 6 ... "Cpnginx.com" plugin

    my.cnf :

    Code:
    
    [email protected] [~]# cat /etc/my.cnf 
    
    
    #DO NOT MODIFY THE FOLLOWING COMMENTED LINES!
    #Created with ELS from www.servermonkeys.com 
    #els-build=5.0 
    [mysqld] 
    local-infile=0
    datadir=/var/lib/mysql
    skip-locking
    skip-innodb
    skip-networking
    safe-show-database
    query_cache_limit=1M
    query_cache_size=128M
    ## 32MB for every 1GB of RAM
    query_cache_type=1
    max_user_connections=250
    max_connections=500
    interactive_timeout=10
    wait_timeout=20
    connect_timeout=20
    thread_cache_size=128
    key_buffer=512M
    ## 128MB for every 1GB of RAM
    join_buffer=1M
    max_connect_errors=20
    max_allowed_packet=128M
    table_cache=1024
    record_buffer=1M
    sort_buffer_size=4M
    ## 1MB for every 1GB of RAM 
    read_buffer_size=4M
    ## 1MB for every 1GB of RAM
    read_rnd_buffer_size=4M
    ## 1MB for every 1GB of RAM 
    thread_concurrency=8 
    ## Number of CPUs x2
    myisam_sort_buffer_size=64M
    server-id=1
    collation-server=latin1_general_ci
    
    [mysql.server]
    user=mysql
    
    [safe_mysqld]
    err-log=/var/log/mysqld.log
    pid-file=/var/lib/mysql/mysql.pid
    open_files_limit=8192
    
    [mysqldump]
    quick
    max_allowed_packet=128M
    
    [mysql]
    no-auto-rehash
    #safe-updates
    
    [isamchk]
    key_buffer=128M
    ##64
    sort_buffer=64M
    read_buffer=16M
    write_buffer=16M
    
    [myisamchk]
    key_buffer=64M
    sort_buffer=64M
    read_buffer=16M
    write_buffer=16M
    
    [mysqlhotcopy]
    interactive-timeout


    2 process have more cpu and ram usage
    how can i fix them ?

    Pid Owner Priority CPU % Memory % Command
    32190 (Trace) (Kill) mysql 0

    7.1

    4.0 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --log-error=/var/lib/mysql/server.iranpardis.com.err --open-files-limit=8192 --pid-file=/var/lib/mysql/server.iranpardis.com.pid
    3606 (Trace) (Kill) root 0

    5.2

    1.0 whostmgr2 - top ./top
    Attached Files
    Last edited by Zachery; Fri 14th Dec '12, 12:23pm.

  • #2
    Looks like you have heavy traffic and the server is under powered. What is the no users online at peak? Is there too much activity of any bot / spider?
    Hosting Coupons: Hostmonster @ $3.95 and 20% off Mediatemple

    Comment


    • #3
      no change on server traffic ...
      i have more than 20K visit per day
      after i change my VPS i have problem
      now ii have data base error ... Mysql is run
      cpu and ram is good but i see database error page

      - - - Updated - - -

      no bot no dos & ddos attack
      mysql is run but it's not show any process of it on top -c

      Comment


      • #4
        You're running out of ram and going to swap, being on a vps swap is super slow (IO latency on VPS's are normally pretty bad) this causes everything to back up.

        You need to sort out why your swapping so much ram.

        How is your php configured?

        Comment


        • #5
          php 5.2.17 - Suphp

          now new problem added to server
          Mysql is runing - but no process on top -c and forum display database error
          when i try to access whm ip redirect to name server and whm cannot open

          Comment


          • #6
            openvz based virtualised servers manage memory differently form other virtualisation platforms (on openvz there is no differentiation between virtual and resident memory, so all the virtual memory is counted as RAM), so you need your web host to properly configure and tune your openvz vps

            it doesn't help that it's using the most resource consuming php handler possible = suphp http://boomshadow.net/tech/php-handlers/
            :: Always Back Up Forum Database + Attachments BEFORE upgrading !
            :: Nginx SPDY SSL - World Flags Demo [video results]
            :: vBulletin hacked forums: Clean Up Guide for VPS/Dedicated hosting users [ vbulletin.com blog summary ]

            Comment

            widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
            Working...
            X