On Thursday, Dec 12, 2002, at 10:43 Europe/London, Alex McLintock wrote:

I have quite a few MySQL processes on my main webserver and at the moment I can't move them off onto a dedicated MySQL box. What I am worried about is whether or not I need all these processes wasting memory.
If it ain't broke don't fix it.

This applies double for production systems :-)

I think what is happening is that each of my java and perl applications is opening a perl of database connections, and keeping them open whether they need them or not. My sites aren't really that heavily used so I'd be surprised if they are all needed.

Can anyone point me at what I need to learn to optimise these MySQL processes?
Well the whole point of having the pools is an optimisation since usually opening a db is slow.

I don't really see the point in trying to optimise MySQL to reduce memory use, especially if you aren't actually paging to disk. Even if you were it's better to just put more RAM in the server (unless the code is obviously totally broken).

In the absence of any evidence that anything is wrong I would leave memory management (even on linux ;-) ) to the OS and application itself. Threads share the same memory and even processes have shared program text space on UNIX so running multiple identical processes takes up less memory than you would think.

But I suppose you could reduce the number of connections in the pools for a start if you really cared, although this could result in slower db access.

Maybe set up a cron which dumps the output of a command such as 'mysqladmin processlist' at regular intervals to set how the MySQL database is actually being used?

'mysqladmin status' and 'mysqladmin extended-status' could be useful too.

--
Steve Mynott <[EMAIL PROTECTED]>


Reply via email to