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