Number of MySQL children ?
Would someone please explain how to set the number of child mysqld processes which start when mysql (mysql-standard-4.0.14-pc-linux-i686) starts up? I am using MySQL on a memory-poor (32MB RAM) machine, and MySQL seems to hog about 10MB per child process, and there are ten (10) of them at startup. All this, and usually there is only one or two active connections. So I was thinking more like two (2) child processes would be better, but I can't seem to change it from the default (ten (10)). BTW, I experimented with the server parameters (http://www.mysql.com/doc/en/Server_parameters.html), but still there are at least ten (10) mysqld child process always running. Thanks for your help! George Webb [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Number of MySQL children ?
Hi George, On Thu, 2003-11-13 at 08:49, George Webb wrote: Would someone please explain how to set the number of child mysqld processes which start when mysql (mysql-standard-4.0.14-pc-linux-i686) starts up? I am using MySQL on a memory-poor (32MB RAM) machine, and MySQL seems to hog about 10MB per child process, and there are ten (10) of them at startup. All this, and usually there is only one or two active connections. So I was thinking more like two (2) child processes would be better, but I can't seem to change it from the default (ten (10)). BTW, I experimented with the server parameters (http://www.mysql.com/doc/en/Server_parameters.html), but still there are at least ten (10) mysqld child process always running. MySQL does not use multiple processes. It is single process, multithreaded. What may be confusing you is the fact that in the Linux 2.2 and 2.4 kernels, ps shows threads as processes. I believe this has been fixed in 2.6. Anyway it's purely a visual thing, threads are threads anyway. Apart from some internal threads, MySQL uses a thread for each connection. These threads do need some memory of course. The connection-specific variables can be adjusted. You can also set the maximum # of connections the server will allow. Regards, Arjen. -- Arjen Lentz, Technical Writer, Trainer Brisbane, QLD Australia MySQL AB, www.mysql.com Melbourne 1 December (5 days): Using Managing MySQL Training Training,Support,Licenses,T-shirts @ https://order.mysql.com/?marl -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Number of MySQL children ?
On Wed, Nov 12, 2003 at 08:53:50PM -0500, George Webb wrote: # top 8:45pm up 6 days, 3:52, 8 users, load average: 0.06, 0.17, 0.17 84 processes: 82 sleeping, 2 running, 0 zombie, 0 stopped CPU states: 6.6% user, 5.4% system, 0.0% nice, 87.9% idle Mem:25468K av, 24268K used,1200K free, 0K shrd,2544K buff Swap: 65528K av, 28484K used, 37044K free8604K cached PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND 5045 mysql 10 0 10384 1336 660 S 0.1 5.2 0:26 mysqld 5037 mysql 9 0 10384 1336 660 S 0.0 5.2 0:11 mysqld 5039 mysql 9 0 10384 1336 660 S 0.0 5.2 0:07 mysqld 5040 mysql 9 0 10384 1336 660 S 0.0 5.2 0:00 mysqld 5041 mysql 9 0 10384 1336 660 S 0.0 5.2 0:00 mysqld 5042 mysql 9 0 10384 1336 660 S 0.0 5.2 0:00 mysqld 5043 mysql 9 0 10384 1336 660 S 0.0 5.2 0:00 mysqld 5044 mysql 9 0 10384 1336 660 S 0.0 5.2 0:00 mysqld 5046 mysql 9 0 10384 1336 660 S 0.0 5.2 0:00 mysqld 5047 mysql 9 0 10384 1336 660 S 0.0 5.2 0:03 mysqld 5012 root 9 0 1844 0 S 0.0 0.0 0:00 mysqld_safe So isn't each of the ten (10) processes using 10384 K, for a total of 103840 K? Uhm, no. The size is 10384k, but each thread proc is using 1336, and 660 of that is shared. Jeremy -- Jeremy D. Zawodny | Perl, Web, MySQL, Linux Magazine, Yahoo! [EMAIL PROTECTED] | http://jeremy.zawodny.com/ MySQL 4.0.15-Yahoo-SMP: up 60 days, processed 2,279,766,163 queries (438/sec. avg) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]