Results 1 to 13 of 13
  1. #1

    High load but not used memory

    My vps is getting high load above 1.00 . i used to work in envioroment less than 0.50 so it is very high for me. Sometimes the load i going above 10.00
    I have openvz (recently converted from vservers) with 1gb Ram and enough disk space .
    Can somebody help me with tunning apache and mysql?

    I would appreceate that.

  2. #2
    Join Date
    May 2011
    Location
    N/A
    Posts
    116
    You need to optimize the node first ...

    /etc/my.cnf

    [mysqld]
    local-infile=0
    skip-bdb
    skip-innodb
    skip-locking
    safe-show-database

    max_connections = 300
    max_user_connections = 30
    thread_concurrency = 8

    key_buffer = 4M
    key_buffer_size = 4M
    myisam_sort_buffer_size = 32M
    join_buffer_size = 4M
    read_buffer_size = 4M
    sort_buffer_size = 2M
    record_buffer = 16M

    table_cache = 200
    thread_cache_size = 128

    wait_timeout = 50
    connect_timeout = 60
    interactive_timeout = 50
    max_connect_errors = 20

    query_cache_type = 1
    query_cache_limit = 64M
    query_cache_size = 64M

    #log-slow-queries = /var/log/mysqld.slow.log
    long_query_time = 2

    [mysqld_safe]
    open_files_limit = 8192

    [mysqldump]
    quick
    max_allowed_packet = 16M

    [myisamchk]
    key_buffer = 64M
    sort_buffer = 64M
    read_buffer = 16M
    write_buffer = 16M
    /usr/local/apache/conf/includes/pre_main_global.conf

    RLimitNPROC 25 30
    Now restart your node. If still face same issues, you have I/O issues with your VZ.

    In my.cnf file dont use : skip-innodb if you want to use innodb conf.

  3. #3
    Join Date
    May 2006
    Location
    San Francisco
    Posts
    7,200
    You can't just blindly give my.cnf values for a server. Load above 1.0 doesn't mean it's necessarily high depending on your server environment. Can you post your top output?

  4. #4
    Join Date
    May 2011
    Location
    N/A
    Posts
    116

    Angry

    Quote Originally Posted by Orien View Post
    You can't just blindly give my.cnf values for a server. Load above 1.0 doesn't mean it's necessarily high depending on your server environment. Can you post your top output?
    I dont work blindly he already told that his vz having 1GB ram and sometimes it gone more than 10.0+ and in my replies there are other recommendations as well. I give him configuration according to the specification and it works well under 1GB openvz.

    Can somebody help me with tunning apache and mysql?
    He is also looking for Apache and Mysql optimization thats why this conf. has been given.

  5. #5
    So bassically in my empty /etc/my.conf with line
    [mysqld]
    local-infile=0
    need to add
    [mysqld]
    local-infile=0
    skip-bdb
    skip-innodb
    skip-locking
    safe-show-database

    max_connections = 300
    max_user_connections = 30
    thread_concurrency = 8

    key_buffer = 4M
    key_buffer_size = 4M
    myisam_sort_buffer_size = 32M
    join_buffer_size = 4M
    read_buffer_size = 4M
    sort_buffer_size = 2M
    record_buffer = 16M

    table_cache = 200
    thread_cache_size = 128

    wait_timeout = 50
    connect_timeout = 60
    interactive_timeout = 50
    max_connect_errors = 20

    query_cache_type = 1
    query_cache_limit = 64M
    query_cache_size = 64M

    #log-slow-queries = /var/log/mysqld.slow.log
    long_query_time = 2

    [mysqld_safe]
    open_files_limit = 8192

    [mysqldump]
    quick
    max_allowed_packet = 16M

    [myisamchk]
    key_buffer = 64M
    sort_buffer = 64M
    read_buffer = 16M
    write_buffer = 16M
    but without line
    skip-innodb
    but i do not have this file /usr/local/apache/conf/includes/pre_main_global.conf
    And now how to tune apache ?

    thanks in advance

  6. #6
    Quote Originally Posted by Orien View Post
    You can't just blindly give my.cnf values for a server. Load above 1.0 doesn't mean it's necessarily high depending on your server environment. Can you post your top output?
    i was expecting some template for the information i have give in my starting post. I assume those are most optimized and will se the outcome..

  7. #7
    Join Date
    May 2011
    Location
    N/A
    Posts
    116
    Which control panel you are running? and how many visitors you getting per day. Apache cant optimized without checking the site, bandwidth, current running process. So its cant be tuned like that way.

    But you should have "/usr/local/apache/conf/includes/pre_main_global.conf" this file if you having cPanel on the VZ installed.

  8. #8
    Quote Originally Posted by stardust_x7 View Post
    Which control panel you are running? and how many visitors you getting per day. Apache cant optimized without checking the site, bandwidth, current running process. So its cant be tuned like that way.

    But you should have "/usr/local/apache/conf/includes/pre_main_global.conf" this file if you having cPanel on the VZ installed.

    Forgot to add that i am usinf DirectAdmin panel. And i do not have a lot of sites or visitors. 19 sites. with 9 mySQL DB and 100 mails. i assume that i do not have more than 1000 vistiors per day.
    ?????

  9. #9
    top - 14:14:56 up 6 min, 1 user, load average: 0.89, 1.01, 0.52
    Tasks: 83 total, 1 running, 82 sleeping, 0 stopped, 0 zombie
    Cpu(s): 0.9%us, 0.0%sy, 0.0%ni, 99.1%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
    Mem: 1048576k total, 363220k used, 685356k free, 0k buffers
    Swap: 0k total, 0k used, 0k free, 0k cached

    PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
    1548 apache 15 0 38820 22m 3444 S 1.7 2.2 0:03.32 httpd
    Good or Bad.

  10. #10
    Join Date
    May 2011
    Location
    N/A
    Posts
    116
    Quote Originally Posted by kafka13 View Post
    Good or Bad.
    Not heavy process are running under your vps. Load seems good for now.

  11. #11
    Join Date
    Mar 2011
    Posts
    393
    Can anyone confirm the config above? Sounds a bit heavy. At 300 max conns with those buffers, wouldn't your minimum RAM commitment be wayyy high?

    according to the config, you'd need minimum 3.4gigs of ram to run this.

    Though I might be wrong.

  12. #12
    Join Date
    Jul 2010
    Location
    Netherlands
    Posts
    44
    Who says the TS doesn't have a script that uses InnoDB?
    Never listen to people who give blind advice. Spend some bucks on serveroptimalizations.

    Doesn't sound like you've been eating much cheese of the server management part.

    Load means nothing if you don't know how to read these (depends on server configuration)
    Pr0jects Web Services
    Managed, secure and fast hosting!
    http://www.pr0jects.nl
    http://www.vpsservers.co

  13. #13
    Quote Originally Posted by Pr0jects View Post
    Who says the TS doesn't have a script that uses InnoDB?
    Never listen to people who give blind advice. Spend some bucks on serveroptimalizations.

    Doesn't sound like you've been eating much cheese of the server management part.

    Load means nothing if you don't know how to read these (depends on server configuration)
    Can you offer specific sollution?

Similar Threads

  1. Very Slow, but no high load OR memory! Possible DNS!
    By weBrazuca in forum Dedicated Server
    Replies: 3
    Last Post: 04-06-2007, 01:08 AM
  2. httpd high memory load
    By Bambuk in forum Hosting Security and Technology
    Replies: 3
    Last Post: 11-14-2006, 03:51 AM
  3. Optimize : High Load , Slow Websites , High Memory Using .
    By ^LinuX^ServeR^ in forum Dedicated Server
    Replies: 50
    Last Post: 06-19-2006, 12:25 PM
  4. High memory load, anyway to optimize it?
    By clster in forum Hosting Security and Technology
    Replies: 7
    Last Post: 10-29-2004, 02:53 PM
  5. High memory load, how to optimize it?
    By clster in forum Hosting Security and Technology
    Replies: 6
    Last Post: 10-16-2004, 06:04 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •