List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:January 10 2000 8:05pm
Subject:heap tables not freeing memory
View as plain text  
>>>>> "michaels" == michaels  <michaels@stripped> writes:

michaels> Hello,
michaels> Any known issues with mysql keeping memory for deleted heap tables?
michaels> Just upgraded to 3.23.8, and still see the problem.  In a nutshell,
michaels> doing a 'delete from memory_table' doesn't return memory, nor does
michaels> 'drop table memory_table'.  Seems the only way is to kill off mysql :(
michaels> This is on a Sun E450, 1gb ram and a couple UltraSPARC-II processors,
michaels> running Solaris 7.  My problem seems to be different from thread7537,
michaels> because I can't select from the deleted table afterwards...the memory
michaels> is just not returned.

michaels> Thanks,
michaels> Mike

Hi!

When you do a 'delete from memory_table' or 'drop table memory_table',
mysqld will free this memory to other use.  This doesn't mean that you
can see this free memory with 'top' or ps as the malloc handler
doesn't necessarily free this for the system;  It may still be
allocated by the mysqld process but will be reused when other threads
need it.  (This is how malloc works on most system).

You can easily test this by first doing a big heap table and then
releasing it. If you now create a new heap table, your memory usage
should not decrease.

Regards,
Monty
Thread
heap tables not freeing memorymichaels10 Jan
  • Re: heap tables not freeing memorysinisa10 Jan
  • heap tables not freeing memoryMichael Widenius10 Jan
    • Re: heap tables not freeing memorymichaels11 Jan