Re: Possible memory leak.

From: Marcus Kool <marcus.kool_at_urlfilterdb.com>
Date: Sun, 20 Jul 2014 21:51:20 -0300

Eliezer,

It is important to know what implementation of malloc is used.
So it is important to know which OS/distro is used and which version of glibc/malloc.

malloc on 64bit CentOS 6.x uses memory-mapped memory for allocations of 128 KB or larger
and uses multiple (can't find how many) 64MB segments and many more when threads are used.

I also suggest to collect total memory size _and_ resident memory size.
The resident memory size is usually significantly smaller than the total memory size
which can be explained by the 64MB segments that are only used for a low percentage.

If you use CentOS, I recommend to
    export MALLOC_ARENA_MAX=1 # should work well
and/or
    export MMAP_THRESHOLD=4100100100 # no experience if this works
and run the test again.

Marcus

On 07/20/2014 12:27 PM, Eliezer Croitoru wrote:
> I want to verify the issue I have seen:
> Now The server is on about 286 MB of resident memory.
> The issue is that the server memory usage was more then 800MB while two things in mind
> 1 - The whole web server is 600 MB
> 2 - 150MB is the maximum object size in memory (there is no disk cache)
> 3 - the cache memory of the server is the default of 256MB.
>
> I cannot think about an option that will lead this server to consume more then 400MB even if one 10 bytes file is being fetched with a query term every time with a different parameter.
>
> If the sum of all the request to the proxy are 30k I do not see how it would still lead to 900MB of ram used by squid.
>
> If I am mistaken(could very simple accomplished) then I want to understand what to look for in the mgr interface to see if there is a reasonable usage of memory or not.
> (I know it's a lot to ask but still)
>
> Thanks,
> Eliezer
>
> On 07/10/2014 09:10 PM, Eliezer Croitoru wrote:
>> OK so I started this reverse proxy for a bandwidth testing site and it
>> seems odd that it using more then 400MB when the only difference in the
>> config is maximum_object_size_in_memory to 150MB and StoreID
> <SNIP>
>> Eliezer
>
>
>
Received on Mon Jul 21 2014 - 00:51:30 MDT

This archive was generated by hypermail 2.2.0 : Mon Jul 21 2014 - 12:00:11 MDT