mysql runs single proc

TheMask

Verified User
Joined
Jan 20, 2011
Messages
99
i have 2 linux centos server Linux version 2.6.18-238.9.1.el5
icant find the problem...

server1:you can see mysql runs only single proc but its not possible bcause this is webserver

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
3190 mysql 15 0 823m 235m 5428 S 159.8 3.0 2765:46 mysqld
10124 havlayan 16 0 114m 43m 5612 R 23.4 0.6 0:01.38 php-cgi
10161 havlayan 16 0 114m 43m 5612 R 18.5 0.5 0:00.56 php-cgi
10139 havlayan 16 0 113m 42m 5612 R 16.8 0.5 0:00.86 php-cgi
10144 havlayan 15 0 113m 42m 5612 S 15.8 0.5 0:00.83 php-cgi
10107 havlayan 16 0 118m 47m 5612 S 15.2 0.6 0:01.66 php-cgi
10111 havlayan 15 0 115m 44m 5612 S 14.2 0.6 0:01.48 php-cgi
10115 havlayan 16 0 115m 44m 5612 R 13.5 0.6 0:01.46 php-cgi


server2: as you can see there are many mysql

12265 mysql 15 0 536m 510m 4288 S 3.0 8.4 16:56.41 mysqld
12267 mysql 15 0 536m 510m 4288 S 3.0 8.4 16:13.28 mysqld
32012 apache 15 0 125m 113m 1720 S 2.3 1.9 0:00.12 httpd
31901 apache 15 0 125m 113m 1740 S 2.0 1.9 0:00.37 httpd
32006 apache 17 0 125m 113m 1604 S 1.3 1.9 0:00.10 httpd
32172 extrafla 17 0 22508 8436 4112 R 1.3 0.1 0:00.04 php-cgi
31733 apache 15 0 127m 114m 1736 S 0.7 1.9 0:00.84 httpd
11034 mysql 17 0 536m 510m 4288 S 0.3 8.4 13:49.67 mysqld
11925 mysql 17 0 536m 510m 4288 S 0.3 8.4 0:09.05 mysqld
31726 apache 15 0 126m 114m 1736 S 0.3 1.9 0:01.22 httpd
31744 apache 15 0 0 0 0 Z 0.3 0.0 0:01.30 httpd <defunct>
31999 oriflame 15 0 13068 3076 1632 S 0.3 0.0 0:00.03 proftpd
32152 apache 15 0 125m 113m 1580 S 0.3 1.9 0:00.01 httpd
 
One of my boxes just has one process. Not sure what the reasoning is, it is a fairly high-end box though - 8 cores, 8gb ram
 
16gm ram 4 core

but
i dont understand this how is it possible i have 300 user and only one mysql process running? and this is webserver and has many forums...
 
16gm ram 4 core

but
i dont understand this how is it possible i have 300 user and only one mysql process running? and this is webserver and has many forums...

It's possible because MySQL is multithreaded with single process. Still, I don't know why your server 2 has many MySQL processes which is strange to me.

This should explain why one server shows single process and another server shows many processes -> http://code.openark.org/blog/mysql/mysql-terminology-processes-threads-connections

On older Linux versions or on glibc-static versions, one may view MySQL as a multi-process server. This is not so: it is merely because threads are mapped to OS processes. For the sake of this discussion this is irrelevant. mysqld is a single process.
 
Last edited:
Back
Top