You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Ian Holsman <li...@holsman.net> on 2002/10/01 05:55:31 UTC

RE: improving concurrency in mod_mem_cache?

On Mon, 30 Sep 2002 12:51:43 +0000, Bill Stoddard wrote:

> 
>> One of the known limitations of the current mod_mem_cache code is that
>> it uses a single global mutex to serialize cache additions and
>> deletions.
>>
>> I thought the easy fix for this would be to extend the cache's hash
>> table to include a mutex for each hash bucket.  That would enable us to
>> lock only one chain in the hash table, rather than the entire table.
> 
> I had this exact discussion with Jeff Trawick a few months back. The
> primary concern was with the potentially large number of mutex that could
> bump up against some Unix system limitations.

maybe you can implement this via a small number of mutexes, and instead
of having a 1:1 relationship you use mutex = memaddress % #mutexes ?

--Ian