# HELP: mysqld Threads and Memory Usage Reporting

**URL:** <https://forums.percona.com/t/help-mysqld-threads-and-memory-usage-reporting/393>\
**Category:** Other MySQL® Questions\
**Created:** [July 25, 2007, 10:00am UTC](https://forums.percona.com/t/help-mysqld-threads-and-memory-usage-reporting/393 "2007-07-25T10:00:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![daskalou](https://avatars.discourse-cdn.com/v4/letter/d/f04885/32.png) [@daskalou](https://forums.percona.com/u/daskalou)\
**Post date:** [July 25, 2007, 10:00am UTC](https://forums.percona.com/t/help-mysqld-threads-and-memory-usage-reporting/393/1 "2007-07-25T10:00:08Z")

</div>

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%?

---

<div class="post-metadata">

**Author:** ![daskalou](https://avatars.discourse-cdn.com/v4/letter/d/f04885/32.png) [@daskalou](https://forums.percona.com/u/daskalou)\
**Post date:** [July 25, 2007, 10:04am UTC](https://forums.percona.com/t/help-mysqld-threads-and-memory-usage-reporting/393/2 "2007-07-25T10:04:59Z")

</div>

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
