How to reduce RAM used by mysql process while my.cnf is empty?

Discussion in 'Site & Server Administration' started by postcd, Jan 8, 2016.

  1. #1
    Hello, im a noob, but isnt it that my mysql process is using around 1,8GB RAM?

    top -c commands sorted by "VIRT" shows "1859152" next to mysql process

    # ps aux --sort -rss | grep 822
    mysql 822 1.2 21.8 1859152 457924 ? Sl 07:22 0:16 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/lib/mysql/hostname.err --open-files-limit=10000 --pid-file=/var/lib/mysql/hostname.pid
    root 12956 0.0 0.0 6384 680 pts/0 S+ 07:45 0:00 grep 822

    # cat /proc/822/status | grep Size
    FDSize: 256
    VmSize: 1859152 kB

    # cat /etc/my.cnf
    [mysqld]
    innodb_file_per_table=1
    innodb_buffer_pool_size=61865984
    max_allowed_packet=268435456
    open_files_limit=10000
    default-storage-engine=MyISAM

    Why is it using that much and how can i exactly reduce the usage? As im on the VPS and it is reaching its RAM limit (fatal failures because of that, Unable to fork) & i dont wish to upgrade.
     
    postcd, Jan 8, 2016 IP
  2. pwhrita

    pwhrita Active Member

    Messages:
    26
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    83
    #2
    If you have access to the server, try running mysqltuner and then adjust your my.cnf parameters. Apart from it, you can enable slow query logs in the my.cnf which will show you tables which takes time to execute and thus consumes high memory. You can optimize such a tables.
     
    pwhrita, Jan 15, 2016 IP
  3. postcd

    postcd Well-Known Member

    Messages:
    1,043
    Likes Received:
    9
    Best Answers:
    1
    Trophy Points:
    190
    #3
    pwhrita: thx for advices, arent my mysql values already on default low values (As i have "empty" my.cnf)?
    I cant adjust queries, im not owner of the system, not qualified to adjust queries. I can just modify server config / mysql config.
     
    postcd, Jan 15, 2016 IP
  4. pwhrita

    pwhrita Active Member

    Messages:
    26
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    83
    #4
    Try to enable slow query logs in mysql and then provide customer all details you get. He can optimize the database.
     
    pwhrita, Jan 18, 2016 IP