List:General Discussion« Previous MessageNext Message »
From:Heikki Tuuri Date:February 7 2004 10:39am
Subject:Re: Memory Leak using InnoDB ?
View as plain text  
Geoffrey, Dan,

----- Original Message ----- 
From: "Dan Nelson" <dnelson@stripped>
Newsgroups: mailing.database.myodbc
Sent: Saturday, February 07, 2004 5:27 AM
Subject: Re: Memory Leak using InnoDB ?


> In the last episode (Feb 07), Geoffrey said:
> > I'm running MySQL 4.0.17 with RH Linux 8 on Xeon 3.0/1GB RAM.
> >
> > One application has to access the database (1 connection to the DB is
> > open on startup and left open). However this application performs a
> > lot of queries on the DB.
> >
> > Thanks to  "top", I can see that the "used memory" is constantly
> > increasing and never freed (up to 1 GB) when performing a lot of
> > queries. In fact, I can see the total memory usage increasing but the
> > mysqld process memory usage remains the same.
> >
> > When the DB is not accessed, the memory usage is stable. Stopping MySQL
> > server doesn't free the abnormaly allocated memory.
>
> Ideally, you should have very little "free" memory according to top
> (most systems will see under 20MB free).  Free memory is wasted memory.
> Unix uses memory not allocated to processes for a disk cache.  To
> determine whether you are truly low on memory, run iostat and watch the
> swap columns.  Constant swap activity means you're low on memory.

Dan is right. A memory leak in the mysqld process should show up in the
'top' line for that process.

By the way, monitoring if InnoDB has memory leaks is very easy. Just look
with SHOW INNODB STATUS at the 'total allocated memory'. If that keeps
climbing without bounds, that is an indication of a memory leak.

> -- 
> Dan Nelson
> dnelson@stripped

Best regards,

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

Order MySQL technical support from https://order.mysql.com/

Thread
Memory Leak using InnoDB ?Geoffrey7 Feb
  • Re: Memory Leak using InnoDB ?Dan Nelson7 Feb
  • Re: Memory Leak using InnoDB ?Greg Day7 Feb
Re: Memory Leak using InnoDB ?Heikki Tuuri7 Feb
Re: Memory Leak using InnoDB ?Geoffrey7 Feb
Re: Memory Leak using InnoDB ?Heikki Tuuri7 Feb