Results 1 to 4 of 4
  1. #1

    Question mysql memory consumption

    hi

    I have a vps with 1GB of ram
    and mysql consume lots of memory
    I googled about this subject
    but everywhere mysql performance tuning is described
    could you help me to reduce values

    mysql has 10 threads like below

    7338 mysql 0 0.0 4.5 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/zeta60.wuhosting.com.pid --skip-external-locking
    7339 mysql 0 0.0 4.5 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/zeta60.wuhosting.com.pid --skip-external-locking
    7378 mysql 0 0.0 4.5 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/zeta60.wuhosting.com.pid --skip-external-locking
    2507 mysql 0 0.0 4.5 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/zeta60.wuhosting.com.pid --skip-external-locking
    2517 mysql 0 0.0 4.5 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/zeta60.wuhosting.com.pid --skip-external-locking
    2518 mysql 0 0.0 4.5 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/zeta60.wuhosting.com.pid --skip-external-locking
    2519 mysql 0 0.0 4.5 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/zeta60.wuhosting.com.pid --skip-external-locking
    2520 mysql 0 0.0 4.5 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/zeta60.wuhosting.com.pid --skip-external-locking
    7399 mysql 0 0.1 4.5 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/zeta60.wuhosting.com.pid --skip-external-locking
    5162 mysql 0 0.0 4.5 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/zeta60.wuhosting.com.pid --skip-external-locking


    my.cnf properties are

    set-variable = max_connections=90
    set-variable = wait_timeout=10
    set-variable = connect_timeout=10
    set-variable = long_query_time=4


    skip-locking
    key_buffer = 2M
    max_allowed_packet = 1M
    table_cache = 4
    sort_buffer_size = 64K
    read_buffer_size = 256K
    read_rnd_buffer_size = 256K
    net_buffer_length = 2K
    thread_stack = 64K
    table_cache = 1M
    query_cache_size = 1M


    [isamchk]
    key_buffer = 8M
    sort_buffer_size = 8M

    [myisamchk]
    key_buffer = 8M
    sort_buffer_size = 8M

    [mysqlhotcopy]
    interactive-timeout


    thanks for your help

  2. #2
    it consumes 450 mb of ram
    but non of my sites have lots of traffic

  3. #3
    Join Date
    Oct 2000
    Location
    Israel
    Posts
    1,286
    Check your mysql queries in your scripts. Use the LIMIT clause to ensure that you don't use up all of your memory - this could very well be your problem. There are other things you can do to improve efficiency, but since you state that you don't have a lot of traffic, it sounds to me as if your query is too "heavy".

  4. #4

    Hmmmmm

    I had this problem - Memory was being consumed very quickly. Turn out a porn bot was bouncing in and hitting the server with 15,000 hits at a time. Of course knocking out the server. They did it in such a way that it was hard to detect

    J

Posting Permissions

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