You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Xuekun Hu <xu...@gmail.com> on 2006/02/23 09:55:32 UTC

[users@httpd] mod_mem_cache configuration help

Hi,

I want to cache some files and don't want them to be removed if the
cache if full. That's means the cache is serviced as
first-come-first-service basis. Can I do that by setting
"CacheDefaultExpire" to a large number?

However I found this sentence "If a new object needs to be inserted in
the cache and the size of the object is greater than the remaining
memory, objects will be removed until the new object can be cached.
The object to be removed is selected using the algorithm specified by
MCacheRemovalAlgorithm" in docs. So it seems the objects are hard to
stay in the cache, it has the the chance to be removed out!

Any ideas? Thanks in advance.

Thx, Xuekun

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] mod_mem_cache configuration help

Posted by Xuekun Hu <xu...@gmail.com>.
Thanks for replying.

I tested mod_file_cache. However I also met some errors both with
cachefile and mmapfile. When I want to cache more than 20 files, there
are the below errors.

Using cachefile:
[Fri Mar 10 12:56:47 2006] [info] [client 10.0.1.4] (70014)End of file
found: core_output_filter: writing data to the network
[Fri Mar 10 12:56:47 2006] [info] [client 10.0.1.4] (70014)End of file
found: core_output_filter: writing data to the network
[Fri Mar 10 12:56:48 2006] [info] [client 10.0.1.3] (70014)End of file
found: core_output_filter: writing data to the network
...

Using mmapfile:
[Fri Mar 10 15:32:03 2006] [info] [client 10.0.0.7] (14)Bad address:
core_output_filter: writing data to the network
[Fri Mar 10 15:32:03 2006] [info] [client 10.0.0.7] (14)Bad address:
core_output_filter: writing data to the network
[Fri Mar 10 15:32:03 2006] [info] [client 10.0.1.3] (14)Bad address:
core_output_filter: writing data to the network
...

While when caching below 10 files, all work fine. It seems
mod_file_cache can't cache many files?

My configuration is:
  4 x Intel Xeon (EM64T)
  SLES9 SP2 (64bit)

Is it a bug?

Thx, Xuekun

On 2/24/06, Joshua Slive <jo...@slive.ca> wrote:
> On 2/23/06, Xuekun Hu <xu...@gmail.com> wrote:
> > Hi,
> >
> > I want to cache some files and don't want them to be removed if the
> > cache if full. That's means the cache is serviced as
> > first-come-first-service basis. Can I do that by setting
> > "CacheDefaultExpire" to a large number?
> >
> > However I found this sentence "If a new object needs to be inserted in
> > the cache and the size of the object is greater than the remaining
> > memory, objects will be removed until the new object can be cached.
> > The object to be removed is selected using the algorithm specified by
> > MCacheRemovalAlgorithm" in docs. So it seems the objects are hard to
> > stay in the cache, it has the the chance to be removed out!
> >
> > Any ideas? Thanks in advance.
>
> It sounds like you may be looking for mod_file_cache.
>

> If not, you may also want to consider using mod_disk_cache in place of
> mod_mem_cache, because it allows the OS to be in charge of the memory
> caching issues (using the OS buffer cache) and hence will often
> outperform mod_mem_cache.
>
> Joshua.
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] mod_mem_cache configuration help

Posted by Joshua Slive <jo...@slive.ca>.
On 2/23/06, Xuekun Hu <xu...@gmail.com> wrote:
> Hi,
>
> I want to cache some files and don't want them to be removed if the
> cache if full. That's means the cache is serviced as
> first-come-first-service basis. Can I do that by setting
> "CacheDefaultExpire" to a large number?
>
> However I found this sentence "If a new object needs to be inserted in
> the cache and the size of the object is greater than the remaining
> memory, objects will be removed until the new object can be cached.
> The object to be removed is selected using the algorithm specified by
> MCacheRemovalAlgorithm" in docs. So it seems the objects are hard to
> stay in the cache, it has the the chance to be removed out!
>
> Any ideas? Thanks in advance.

It sounds like you may be looking for mod_file_cache.

If not, you may also want to consider using mod_disk_cache in place of
mod_mem_cache, because it allows the OS to be in charge of the memory
caching issues (using the OS buffer cache) and hence will often
outperform mod_mem_cache.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org