Hello.

On Thu 2002-10-31 at 19:17:57 -0800, [EMAIL PROTECTED] wrote:
> I noticed that the resources used by MySQL grow continually. I recently 
> restarted our MySQL server because the process had grown to 259MB. 
> MySQL is used by our Webserver running CGI scripts  with roughly  
> 57,000 connections in the last couple of days. Currently the process is 
> using 18MB of memory.

It just uses what you implicitly or explicitly allowed it to use via
the config options. The growth you observe is because MySQL allocates
a lot of its buffers only when they are actually needed/used.

In other words, even if you allow it to use 100MB for the key cache,
it will never allocate those 100MB if you run no queries against the
server. :-)

> I was wondering how big will mysqld get? What is a reasonable amount of 
> memory to give mysqld running on a 750 MHz machine with 500MB RAM 
> serving roughly ten sites.

It is up to you. You can restrict the memory use (at possible cost of
the performance, of course). How many memory makes sense mainly
depends on the database size (more precisely: how much is regularly
used).

> What can I do to minimize and or limit the memory consumed by MySQL,
> whithout degrading performance?

Well, not much. Mostly, MySQL only allocates the memory, if it needs
to use it, so performance will suffer some way.

The question is how much the performance will degrade. If you are in a
situation, where you can reduce the memory usage by half, but losing
only 5% speed, it's usually a good trade-off, if memory is a scarce.

Note that I refer to the real usage here, not about what the config
says that MySQL is allowed to use. I.e. reducing the key cache from
256MB to 64MB does not hurt performance, when MySQL never used more
than 64MB. But it will, if it actually made use of those 256MB.

There is a manual section about how buffers are used and how to
optimize them:

  http://www.mysql.com/doc/en/Server_parameters.html

Regards,

        Benjamin.


-- 
[EMAIL PROTECTED]

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to