Re: [PATCH] Fix IP cache accounting

From: Tsantilas Christos <chtsanti_at_users.sourceforge.net>
Date: Fri, 21 Jan 2011 15:36:55 +0200

I am sending a second version of the patch including the equivalent
changes for the fqdncache.

Regards,
    Christos

On 01/15/2011 03:09 AM, Amos Jeffries wrote:
> On 15/01/11 05:14, Alex Rousskov wrote:
>> Fix IP cache accounting to avoid idle caches on busy servers.
>>
>> When maintaining the IP cache size, use the number of entries in the
>> cache rather than the number of allocated and not freed
>> MEM_IPCACHE_ENTRY objects. MEM_IPCACHE_ENTRY objects are used outside
>> the cache for DNS queries. If queries leak (or perhaps when there are
>> just a lot of them), the memory-pool-based count overestimates the cache
>> size, sometimes to such a degree that the cache remains nearly empty
>> despite lots of misses.
>>
>> Use memory-pool-based counter to estimate cache size also violates IP
>> cache encapsulation boundaries because it effectively prevents others
>> from using the same memory pool.
>>
>> Alex.
>> P.S. I believe other recent changes may have fixed DNS query leaks
>> mentioned here.
>
> +1 after fqdncache gets an identical update. Same problems there.
>
> Amos

Received on Fri Jan 21 2011 - 13:36:51 MST

This archive was generated by hypermail 2.2.0 : Thu Jan 27 2011 - 12:00:05 MST