Amadeus wrote:
Hello Everybody!
I have a problem with MySQL servers running RedHat 9 (smp kernel 2.4.20)
on Intel and MySQL server 4.0.14 (problem also appears on binary distr
4.0.15 and on 4.0.15 I bilt myself from source).
I have few big tables with BLOBS and regular table 4.2 and 2.7 Gb
respectively, plust several smaller tables. Every time I run query
against this tables MySQL uses all available memory on server (I have
3Gb RAM on server) and it does not release that memory after query is
completed. I can understand that MySQL may use all available memory for
big queries etc., but memory IS NOT RELEASED EVEN IF I STOP MySQL server
(no mysql processes running - I verify process list every time). Is it a
problem with MySQL ? RedHat 9 ?
Anyone seen anything like this before ?
Alex.
Hmmmm. Interesting, now I think I see what is going on. Despite the fact
that "top", "/proc/meminfor", "free" show me that 98% of all memory on
server is used that memory is not really used by MySQL nor kernel (as I
can see from /proc/slabinfo). I tested it on several versions of
2.4.20-x.xx SMP kernels - same result.
I wrote simple C app. which tries to allocate as much memory as possible
calling malloc() in a loop I found how much free memory _really_
available. Looks like it is Linux reporting problem, but same time this
_only_ happen to me with memory previously used by MySQL server. I can
see memory returned back to free memory pool as soon as other
applications exit. What does MySQL uses for memory allocation /
deallocation so that all released memory is not reported back as free ?
Alex.