I'm not a big mysql expert but I think mysql has some buffers which it keeps per connection

here are some examples (from mysql website):
/
/If you have complex queries |sort_buffer_size| and |tmp_table_size| are likely to be very important. Values will depend on the query complexity and available resources, but 4Mb and 32Mb, respectively are recommended starting points.
/
Note: These are "per connection" values, among |read_buffer_size|, |read_rnd_buffer_size| and some others, meaning that this value might be needed for each connection. So, consider your load and available resource when setting these parameters. For example |sort_buffer_size| is allocated only if MySQL nees to do a sort. Note: be careful not to run out of memory.


/
I might start up mysql and watch the memory usage as you start dumb clients on at a time - see what the step in memory usage is and match it up against something in your my.cnf
good luck
yonah


Tim Cutts wrote:


On 22 Mar 2004, at 18:24, Tim Cutts wrote:



Some users' code is causing MySQL's memory use to explode. By the time we reach about 200 simultaneous connections, the MySQL server is using 8GB of virtual memory, and then falls over (the machine is an AlphaServer ES45 with 8 GB of physical memory, and 16 GB of swap, although processes are constrained to a total of 8GB of virtual memory in the OS) The versions of MySQL I have found this behaviour on are 4.0.14 and 4.0.17


Well, a deafening silence from the list. :-)

I've got some more information now. I wanted to exclude perl, DBI and whatnot from the list of suspects, so I wrote a client in C. All the client does is connect to the database and sleep for 10 minutes. If I run 100 or so of these simultaneously, the MySQL server still explodes in memory use and crashes. So it's nothing to do with either the SQL that's being run, or the use of perl/DBI clients. It's simply a matter of connection count.

Now, here's the kicker: The problem goes away completely if I start the server with

--skip-innodb

So my question is: are there buffers which are allocated per connection to do with accessing InnoDB tables? My reading of the documentation suggests that all the innodb_ variables refer to global buffers, logs and so on. Or have I missed something?

Tim


-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to