mod_mem_cache v1.2 for lighttpd released

Jan suggested me to implement SLRU(Segmented LRU) for mod_mem_cache, full paper is here. SLRU is little complicated so we take simpler implementation:

"one LRU cache for the probationary segment, one for the protected
segment. On the first miss, an entry is added to the probationary LRU
cache, with no data. Only if its hit count increases over threshold it
is propagated to the protected LRU cache which has real content.

That way you decrease the propability that an entry is kicked out of the
LRU cache as you increase the threshold for one entry getting into the
cache."

new config: mem-cache.slru-thresold is introduced:

  • By default mem-cache.slru-thresold is zero, SLRU just likes normal LRU.
  • for mem-cache.slru-thresold > 0 when visit count for specific file in last 24 hours is bigger than mem-cache.slru-thresold, content of specific file is put into memory.

In practice, mem-cache.slru-thresold should adjust to archieve higher hit-rate and less memory usage.

Changelog:

  • add implementation for SLRU

patch download

Keywords: , ,


3 Responses to “mod_mem_cache v1.2 for lighttpd released”  

  1. 1 acfear

    支持老大..这么快就迎Jan建议使用SLRU.

  2. 2 seb

    Hello

    i'm trying to use this module, but when i activate it, fastcgi/php doesn't work anymore.

    it looks like the .php file are handle like static content when this module is enable

  3. 3 Q

    Puting mod_fastcgi on top of mod_mem_cache can solve your problem

Leave a Reply



天气信息