tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gerhardus.Geldenh...@gta-travel.com
Subject mod_jk JkShmFile directive
Date Mon, 24 Sep 2007 13:51:15 GMT
Hi
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:
http://tomcat.apache.org/connectors-doc/reference/apache.html
 
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 
> jk_workers.properties 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
$ServerRoot/logs/jk.shm
where $ServerRoot in this case is /etc/httpd. /etc/httpd/logs is a symlink
to
/var/log/httpd. 
 
It is used as a scoreboard with run time data for workers so the
load balancer works more accurately.
 
More logical placement for 
/var/run/mod_jk 

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.

Regards


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