Tim,

----- Original Message ----- 
From: "Sasha Pachev" <[EMAIL PROTECTED]>
Newsgroups: mailing.database.myodbc
Sent: Thursday, March 25, 2004 7:04 AM
Subject: Re: Mystifying mysqld memory usage explosion


> 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:
>
> Innodb to my knowledge does not allocate very much locally per thread, and
> should not allocate anything at all if you are not doing any queries.
>
> Based on the test results you have reported, I would put your libc as the
> primary suspect, and the next one would be bad build/compiler bugs. I
would
> suppose that --skip-innodb just changes some memory allocation patters on
> startup, which possibly avoid triggering the bug.

you can use the command

SHOW INNODB STATUS;

to check how much memory InnoDB has allocated in total. Please report what
it says at the time of the memory explosion.

You report that even 100 IDLE connections cause the memory explosion. I
agree with Sasha that this probably is not a MySQL/InnoDB bug. I have not
heard of a similar memory problem from anyone else.

> -- 
> Sasha Pachev

Best regards,

Heikki Tuuri
Innobase Oy
Foreign keys, transactions, and row level locking for MySQL
InnoDB Hot Backup - a hot backup tool for InnoDB which also backs up MyISAM
tables
http://www.innodb.com/order.php

Register now for the 2004 MySQL Users Conference!
http://www.mysql.com/events/uc2004/index.html


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

Reply via email to