| HELP: mysqld Threads and Memory Usage Reporting [message #1555] |
Wed, 25 July 2007 11:30  |
daskalou Messages: 2 Registered: July 2007 |
Junior Member |
|
|
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:
Looks something like this:
User || %CPU || %MEM || VSZ || RSS || Command
root || 0.0 || 0.0 || 2064 || 1036 || /bin/sh /usr/bin/mysqld_safe
mysql || 0.0 || 0.3 || 102284 || 24972 || \_ /usr/sbin/mysqld
mysql || 0.0 || 0.3 || 102284 || 24972 || \_ /usr/sbin/mysqld
mysql || 0.0 || 0.3 || 102284 || 24972 || \_ /usr/sbin/mysqld
mysql || 0.0 || 0.3 || 102284 || 24972 || \_ /usr/sbin/mysqld
mysql || 0.0 || 0.3 || 102284 || 24972 || \_ /usr/sbin/mysqld
mysql || 0.0 || 0.3 || 102284 || 24972 || \_ /usr/sbin/mysqld
mysql || 0.0 || 0.3 || 102284 || 24972 || \_ /usr/sbin/mysqld
mysql || 0.0 || 0.3 || 102284 || 24972 || \_ /usr/sbin/mysqld
mysql || 0.0 || 0.3 || 102284 || 24972 || \_ /usr/sbin/mysqld
mysql || 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%?
|
|
|
| Re: HELP: mysqld Threads and Memory Usage Reporting [message #1557 is a reply to message #1555 ] |
Wed, 25 July 2007 11:34  |
daskalou Messages: 2 Registered: July 2007 |
Junior Member |
|
|
The contents of my /etc/my.cnf file are:
[mysqld]
pid-file=/var/lib/mysql/mysql.pid
set-variable = max_connections=500
safe-show-database
default-character-set=utf8
collation-server=utf8_unicode_ci
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
#InnoDB Stuff
# The following line just enables the InnoDB Storage Engine
innodb
# The following line makes MySQL create a separate file
# for each table of Storage Engine type InnoDB
innodb_file_per_table
innodb_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 memory
innodb_buffer_pool_size=40M
innodb_additional_mem_pool_size=10M
#
# Set the log file size to about 25% of the buffer pool size
innodb_log_file_size=12M
innodb_log_buffer_size=8M
#
innodb_flush_log_at_trx_commit=1
[client]
socket=/var/lib/mysql/mysql.sock
|
|
|