GET 24/7 LIVE HELP NOW

Announcement

Announcement Module
Collapse
No announcement yet.

HELP: mysqld Threads and Memory Usage Reporting

Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • HELP: mysqld Threads and Memory Usage Reporting

    Ok, so, I've got a Virtual Private Server (VPS) account with a 128MB RAM limit, but that RAM is burstable (I can use more as long as no other VPS users need it). I'm running CentOS 3 on it and the server has a total of 8GB of physical RAM.

    However...

    My web host says I'm using in excess of 300MB constantly.

    I've checked the ps/top commands and the culprits are the mysqld processes.

    The output of:

    ps -auxf | grep -i mysql


    Looks something like this:

    User || %CPU || %MEM || VSZ || RSS || Commandroot || 0.0 || 0.0 || 2064 || 1036 || /bin/sh /usr/bin/mysqld_safemysql || 0.0 || 0.3 || 102284 || 24972 || \_ /usr/sbin/mysqldmysql || 0.0 || 0.3 || 102284 || 24972 || \_ /usr/sbin/mysqldmysql || 0.0 || 0.3 || 102284 || 24972 || \_ /usr/sbin/mysqldmysql || 0.0 || 0.3 || 102284 || 24972 || \_ /usr/sbin/mysqldmysql || 0.0 || 0.3 || 102284 || 24972 || \_ /usr/sbin/mysqldmysql || 0.0 || 0.3 || 102284 || 24972 || \_ /usr/sbin/mysqldmysql || 0.0 || 0.3 || 102284 || 24972 || \_ /usr/sbin/mysqldmysql || 0.0 || 0.3 || 102284 || 24972 || \_ /usr/sbin/mysqldmysql || 0.0 || 0.3 || 102284 || 24972 || \_ /usr/sbin/mysqldmysql || 0.0 || 0.3 || 102284 || 24972 || \_ /usr/sbin/mysqld


    (I'm using MyISAM and InnoDB tables by the way)

    I think my web host simply added up the 0.3% of memory per mysqld process like this:

    0.3% x 10 mysqld processes = 3% of 8GB = 240MB of physical RAM used.

    My question is: Are my mysqld processes REALLY consuming that much memory, or, as I've read elsewhere, they use the SAME SHARED MEMORY LOCATIONS, and in fact only use the 0.3% of memory combined, and NOT 3.0%?

  • #2
    The contents of my /etc/my.cnf file are:


    [mysqld]pid-file=/var/lib/mysql/mysql.pidset-variable = max_connections=500safe-show-databasedefault-character-set=utf8collation-server=utf8_unicode_cidatadir=/var/lib/mysqlsocket=/var/lib/mysql/mysql.sock#InnoDB Stuff# The following line just enables the InnoDB Storage Engineinnodb# The following line makes MySQL create a separate file# for each table of Storage Engine type InnoDBinnodb_file_per_tableinnodb_data_home_dir=/var/lib/mysql# Data files must be able to hold your data and indexes.# Make sure that you have enough free disk space.innodb_data_file_path = ibdata1:10M:autoextend## Set buffer pool size to 50-80% of your computer's memoryinnodb_buffer_pool_size=40Minnodb_additional _mem_pool_size=10M## Set the log file size to about 25% of the buffer pool sizeinnodb_log_file_size=12Minnodb_log_buffer_size =8M#innodb_flush_log_at_trx_commit=1[client]socket=/var/lib/mysql/mysql.sock

    Comment

    Working...
    X