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/03/13 09:58:28 UTC
[users@httpd] caching limit files in mod_file_cache?
Changed the title to be noticed. :-)
---------- Forwarded message ----------
From: Xuekun Hu <xu...@gmail.com>
Date: Mar 10, 2006 7:38 PM
Subject: Re: [users@httpd] mod_mem_cache configuration help
To: users@httpd.apache.org
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: caching limit files in mod_file_cache?
Posted by Xuekun Hu <xu...@gmail.com>.
> gives you first 10 lines of backtrace for each thread. Find which one
> got kill()'ed. then:
>
> (gdb) thread <number>
> (gdb) bt
>
>
Thanks for telling me how to find which thread is killed.
#0 0x0000002a9664e6f9 in kill () from /lib64/tls/libc.so.6
#1 <signal handler called>
#2 0x0000000000768a98 in ?? ()
#3 0x000000000042d3bd in ap_rgetline_core (s=0x40dff658, n=8192,
read=0x40dff660, r=0x73e9b8, fold=0, bb=0x73fef8) at protocol.c:222
#4 0x000000000042d96f in ap_get_mime_headers_core (r=0x73e9b8,
bb=0x73fef8) at protocol.c:681
#5 0x000000000042e250 in ap_read_request (conn=0x730b70) at protocol.c:891
#6 0x000000000046f07f in ap_process_http_connection (c=0x730b70) at
http_core.c:190
#7 0x000000000043f8f2 in ap_run_process_connection (c=0x730b70) at
connection.c:43
#8 0x000000000047ad17 in worker_thread (thd=0x677e78, dummy=0x660710)
at worker.c:522
#9 0x0000002a960bebcb in dummy_worker (opaque=<value optimized out>)
at thread.c:137
#10 0x0000002a9640e919 in start_thread () from /lib64/tls/libpthread.so.0
#11 0x0000002a966d8573 in thread_start () from /lib64/tls/libc.so.6
Thx, Xuekun
Re: caching limit files in mod_file_cache?
Posted by Brian Akins <ba...@web.turner.com>.
Xuekun Hu wrote:
> (gdb) bt full
see which thread actually killed it:
(gdb) thread apply all bt 10
gives you first 10 lines of backtrace for each thread. Find which one
got kill()'ed. then:
(gdb) thread <number>
(gdb) bt
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
Re: caching limit files in mod_file_cache?
Posted by Xuekun Hu <xu...@gmail.com>.
Updates.
Sometimes thread segmentation fault would be happened. So I have
chance to print the backtrace. (Apache2.2.0, worker mpm with
thousands threads)
(gdb) bt full
#0 0x0000002a96412f1f in __read_nocancel () from /lib64/tls/libpthread.so.0
No symbol table info available.
#1 0x000000000047cfaa in ap_mpm_pod_check (pod=0x5) at pod.c:54
c = 0 '\0'
fd = 5
#2 0x000000000047b52c in child_main (child_num_arg=0) at worker.c:1223
threads = (apr_thread_t **) 0xcfc060
rv = 0
ts = (thread_starter *) 0x7e0528
thread_attr = (apr_threadattr_t *) 0x7e0548
start_thread_id = (apr_thread_t *) 0x7e05a8
#3 0x000000000047b6b2 in make_child (s=0x5ce3d8, slot=0) at worker.c:1306
pid = 0
#4 0x000000000047bf8e in ap_mpm_run (_pconf=0x0, plog=0x7fbfffcfa3,
s=0x2b72d43088) at worker.c:1508
pidfile = 0x0
remaining_children_to_start = 1926508680
rv = -512
#5 0x000000000042817a in main (argc=3, argv=0x7fbfffd318) at main.c:704
exit_status = 0
c = 0 '\0'
configtestonly = 0
confname = 0x485523 "conf/httpd.conf"
def_server_root = 0x485533 "/usr/local/apache2"
temp_error_log = 0x0
error = 0xfffffffffffffe00 <Address 0xfffffffffffffe00 out of bounds>
server_conf = (server_rec *) 0x5ce3d8
pglobal = (apr_pool_t *) 0x5c1128
pconf = (apr_pool_t *) 0x5c3138
plog = (apr_pool_t *) 0x6113a8
ptemp = (apr_pool_t *) 0x5cb178
pcommands = (apr_pool_t *) 0x5c5148
opt = (apr_getopt_t *) 0x5c5230
rv = 0
mod = (module **) 0x5ce3d8
optarg = 0x7fbfffd338 "sõÿ¿\177"
signal_server = (apr_OFN_ap_signal_server_t *) 0xfffffffffffffe00
Are there any hints?
Thx, Xuekun
On 3/13/06, Xuekun Hu <xu...@gmail.com> wrote:
> Changed the title to be noticed. :-)
>
> ---------- Forwarded message ----------
> From: Xuekun Hu <xu...@gmail.com>
> Date: Mar 10, 2006 7:38 PM
> Subject: Re: [users@httpd] mod_mem_cache configuration help
> To: users@httpd.apache.org
>
>
> 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
> >
> >
>