Page 1 of 1

mod_mem_cache config

PostPosted: 10. August 2009 01:11
by bigpcman
Where is the configuration file for mod_mem_cache? I don't see anything in httpd.conf or any extra config files associated with it.

Re: mod_mem_cache config

PostPosted: 10. August 2009 08:53
by Nobbie
Feel free to insert the configuration lines wherever you want, either directly in httpd.conf or in an external file and include that file in httpd.conf

Re: mod_mem_cache config

PostPosted: 10. August 2009 12:55
by bigpcman
Nobbie wrote:Feel free to insert the configuration lines wherever you want, either directly in httpd.conf or in an external file and include that file in httpd.conf


Thanks.
I noticed the mod_mem_cache module is loaded in the httpd.conf file so I assumed it was "running" using a default configuration. The html web site files do indeed seem to be cached. I guess this must be linux caching the files. Is there a significant performance gain using mod_mem_cache in addition to the linux cache ?

I've read that mod_disk_cache is faster than mod_mem_cache. I wonder if there is a significant performance gain using mod_disk_cache in addition to the linux cache ?

Re: mod_mem_cache config

PostPosted: 10. August 2009 13:03
by Wiedmann
I guess this must be linux caching the files.

Linux is not caching files.

But maybe your browser (or proxy, or web application) is doing this.

so I assumed it was "running" using a default configuration.

Correct. (and the default for mod_cache is to cache nothing)

Re: mod_mem_cache config

PostPosted: 10. August 2009 13:23
by bigpcman
Thanks for your quick reply. You replied faster than I could finish my post.

I added a question about mod_mem_cache vs mod_disk_cache.

Anyway... you commented that linux does not cache files. Seems to me the linux kernel uses a disk file cache to speed up disk access. Am I missing something here?

Re: mod_mem_cache config

PostPosted: 11. August 2009 13:18
by Nobbie
bigpcman wrote:Seems to me the linux kernel uses a disk file cache to speed up disk access. Am I missing something here?


Linux file system (i.e. extfs2/3, reiserfs etc.) is a caching file system, but caching does not take place on file level, but (one layer beyond) on block level. A block is the smallest unit of disk I/O. Block size depends on disk size and number of blocks, it is determined during disk format ("mkfs" command in linux/unix).

The cache is builtin in the file system driver, i.e. in the linux kernel. You cannot configure or modify it, it is used automatically.

As I am not really a fan of stacked cachings (usually the most powerfull caching is done by the OS), i dont think that there is a measurable performance gain by using several stacking algorithms at different levels/layers. You should run some benchmarks on your system to find out, if additional caching really raises performanceof your webserver.