List:General Discussion« Previous MessageNext Message »
From:Dan Nelson Date:July 4 2002 6:23am
Subject:Re: Growing memory usage/processes
View as plain text  
In the last episode (Jul 03), Dave said:
> Hello all,
> 
> I have mysql running on a 2.4.18 kernel:
> 
> /usr/libexec/mysqld  Ver 3.23.49 for redhat-linux-gnu on i386
> 
> and note that one started about 4 processes (threads?) began to
> handle the various signal/table tasks and such. After several random
> queries the process list grows accordingly.
> 
> After a couple hours all processes which showed consumption of about
> 8MB of memory initially are now 25MB each and growing as queries are
> received.
> 
> My question is...Why if these are threads does it require each thread
> to utilize so much memory? 4 threads using 10MB each is ok, 10
> threads using 10MB each is ok. 20 threads using 25MB each is too
> much.

No.  Threads share the same address space.  You are seeing one threaded
application consuming 25MB.  Linux's threads implentation creates a
separate process for each thread and top has no idea they're really all
one application.  Linux is the only OS that does this, afaik, and you
would not believe the number of times your question has been asked on
this list.  On Solaris and Tru64, at least, a threaded app shows up as
one entry in top.

-- 
	Dan Nelson
	dnelson@stripped
Thread
Growing memory usage/processesDave4 Jul
  • Re: Growing memory usage/processesDan Nelson4 Jul
  • Re: Growing memory usage/processesDave4 Jul
  • Re: Growing memory usage/processesJocelyn Fournier4 Jul