List:General Discussion« Previous MessageNext Message »
From:Cabbar Duzayak Date:October 31 2006 9:30am
Subject:MySQL memory allocation
View as plain text  
Hi,

Could you please tell how I can tell how much memory does mysql server
allocate on a linux box? I tried doing:

top -b -n 1 | grep mysql

But, it printed out bunch of processes for mysql. Are these all using
shared memory so each line gives you the total amount for mysql? How
can one interpret the results of this top, i.e. how should I read
Virtual/Resident/Shared columns for all these processes and find out
how much shared + (resident + swap: virtual) memory it uses?

Results of TOP for mysql:
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 8205 mysql     12   0 75524  28M 26896 S     4.8  0.7   3:15   1 mysqld
 2150 mysql      9   0 75524  28M 26896 S     0.4  0.7   3:04   1 mysqld
32011 root       9   0   628  500   500 S     0.0  0.0   0:00   0 mysqld_safe
32033 mysql      9   0 75524  28M 26896 S     0.0  0.7   0:08   0 mysqld
32035 mysql      9   0 75524  28M 26896 S     0.0  0.7   0:00   0 mysqld
32036 mysql      9   0 75524  28M 26896 S     0.0  0.7   0:04   0 mysqld
 1321 mysql      9   0 75524  28M 26896 S     0.0  0.7   2:51   1 mysqld
 1323 mysql      9   0 75524  28M 26896 S     0.0  0.7   3:17   0 mysqld
 2112 mysql      9   0 75524  28M 26896 S     0.0  0.7   3:20   0 mysqld
 2131 mysql      9   0 75524  28M 26896 S     0.0  0.7   3:04   0 mysqld
 2132 mysql      9   0 75524  28M 26896 S     0.0  0.7   2:34   1 mysqld
 2133 mysql      9   0 75524  28M 26896 S     0.0  0.7   3:04   1 mysqld
 2134 mysql      9   0 75524  28M 26896 S     0.0  0.7   3:12   0 mysqld
 2135 mysql      9   0 75524  28M 26896 S     0.0  0.7   2:51   0 mysqld
 2136 mysql      9   0 75524  28M 26896 S     0.0  0.7   2:59   1 mysqld
 2137 mysql      9   0 75524  28M 26896 S     0.0  0.7   2:43   0 mysqld
 2142 mysql      9   0 75524  28M 26896 S     0.0  0.7   3:12   0 mysqld
 8080 mysql      9   0 75524  28M 26896 S     0.0  0.7   2:58   0 mysqld
 8082 mysql      9   0 75524  28M 26896 S     0.0  0.7   2:52   1 mysqld
 8197 mysql      9   0 75524  28M 26896 S     0.0  0.7   2:43   1 mysqld
 8204 mysql      9   0 75524  28M 26896 S     0.0  0.7   3:16   1 mysqld
16010 mysql      9   0 75524  28M 26896 S     0.0  0.7   2:51   0 mysqld
16011 mysql      9   0 75524  28M 26896 S     0.0  0.7   2:58   1 mysqld
16138 mysql      9   0 75524  28M 26896 S     0.0  0.7   2:52   1 mysqld
 4074 mysql      9   0 75524  28M 26896 S     0.0  0.7   2:16   0 mysqld
17331 mysql      9   0 75524  28M 26896 S     0.0  0.7   1:44   0 mysqld
17337 mysql      9   0 75524  28M 26896 S     0.0  0.7   1:59   0 mysqld
22847 mysql      9   0 75524  28M 26896 S     0.0  0.7   0:53   1 mysqld
22912 mysql      9   0 75524  28M 26896 S     0.0  0.7   0:49   0 mysqld
22944 mysql      9   0 75524  28M 26896 S     0.0  0.7   0:48   1 mysqld
23101 mysql      9   0 75524  28M 26896 S     0.0  0.7   0:38   0 mysqld
23102 mysql      9   0 75524  28M 26896 S     0.0  0.7   0:43   0 mysqld
23124 mysql      9   0 75524  28M 26896 S     0.0  0.7   0:44   1 mysqld
23168 mysql      9   0 75524  28M 26896 S     0.0  0.7   0:46   1 mysqld

Thanks.
Thread
MySQL memory allocationCabbar Duzayak31 Oct
  • Re: MySQL memory allocationOw Mun Heng31 Oct
  • Re: MySQL memory allocationRavi Prasad LR31 Oct