tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject mod_jk JkShmFile directive
Date Mon, 24 Sep 2007 13:51:15 GMT
I have asked about this directive(JkShmFile) before but on the apache-http
list. I am still not 100% clear as to the exact usage of this directive.
This page is very vague about usage:
After a lot of googling and searching through my mail archives I found the
following snippets of information:
<start of snippets>
Concerning mod_jk there is no hard upper limit. If the number of workers
(counting all lb workers and all members of lb workers comes close to 64,
you will need to increase the JkShmSize.) No dependency on the tomcat or AJP
version. I didn't think about old JK versions though. 
1.2.23 doesn't count as old.
> I am not intending to use shared memory or load balancing or anything 
> like that. Therefore, I have no such configuration in my 
> file. Could this be the reason why there appear 
> to be no "maps" when trying to match JkMounts? Are the workers being 
> configured and then discarded because there's no place to put them in 
> memory? That would suck, but at least make sense.
Should not be related. Nevertheless even without load balancing, using a
single member load balancer and shared memory can be interesting because of
the advanced managment and information features provided by the stu worker
(that uses the shared memory to comunicate with the lb).

The reason why it ended up in /var/log/httpd/jk.shm is because the JkShmFile
"logs/jk.shm" directive in the httpd.conf translates to
where $ServerRoot in this case is /etc/httpd. /etc/httpd/logs is a symlink
It is used as a scoreboard with run time data for workers so the
load balancer works more accurately.
More logical placement for 

This file is used for shared memory, lock, ...of mod_jk threads.
if you don't declare it in your mod_jk config file, mod_jk will create a
default one in your http log directory.
</end of snippets>

My questions
Is this shared memory used by different child apache processes on the same
machine or is it a bit more involved than that.

If the answer to the above question is yes, do you really need this in the
config. What value does it add to have this directive available, except for
the fact that you can specify the location...

I would also kind of expect the JkShmSize directive to be automatic instead
of having to specify it. If it needs to be bigger than the default 64Kb it
should grow on its own accord.


This email has been scanned by the MessageLabs Email Security System.
For more information please visit 
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message