[opencms-dev] Tomcat tuning for OpenCms running on Linux

Claus Priisholm cpr at codedroids.com
Wed Feb 3 09:06:21 CET 2010


Hi Sebastian

The service wrapper does seem to add more features compared to jsvc. I 
guess the idea with jsvc is that you can do some shell scripting to 
control the process, and then have jsvc make shure that the applications 
get shut down properly, the service wrapper provide this out of the box 
it seems.

But the reason I use jsvc is because it is now the default configuration 
on some Linux distro's. I have not had any issue running tomcat without 
it, so the first step would be to test the identical setup without jsvc. 
It seems a bit odd as I don't see any reason why jsvc should cause 
indexer threads to accumulate over time - so the problem could be 
elsewhere. So far the problem has not been a major roadblock for me - I 
get a notification if the cpu usage gets abnormal and take action.

best regards
Claus

Sebastian Himberger wrote:
> Hi Claus,
> 
> you might try: http://wrapper.tanukisoftware.org/
> 
> The good thing: You can even initiate a VM restart via JMX or console
> output. This way customers can import modules themself.
> 
> I have multiple OpenCms instances running on my server with this and it
> works fine.
> 
> best regards,
> Sebastian
> 
> Claus Priisholm schrieb:
>> Hi
>>
>> Some suggest that on a server setting you set Xms == Xmx, 1G/2G seem 
>> like plenty, unless you have a lot of sessions or using a lot space for 
>> the flex cache. At least with tomcat 5 setting max perm size to 128M was 
>> a good thing, not sure if tomcat 6 is better at managing perm space but 
>> memory is cheap so why waste time on it :-)
>> I don't think I have seen stack issues with the default setting (unless 
>> doing some unintended loops in the code and then you never have enough 
>> stack space anyway :-), but 1024K seems plenty.
>>
>> But one thing you may want to be on the lookout for... I have seen some 
>> weird issues when running tomcat via jsvc (which is default on Ubuntu 
>> and as of version 5 also on Debian). A long time ago I ran into the 
>> problem on Ubuntu and decided to stick with Debian, but since Debian now 
>> also is using jsvc per default, I've seen the issue pop on a couple of 
>> installations.
>> What happens is seemingly related to the nightly indexing. At some point 
>> (after days or weeks of smooth sailing) the jsvc process uses 100% of 
>> one cpu. Prior to that it seems that after the nightly index rebuild the 
>> process will slowly increase its cpu usage (in one example at the rate 
>> of appr. 1% per hour). Once it reaches 100% there will be a huge amount 
>> of interrupted indexing threads in the jsvc /tomcat process. I have not 
>> seen this happen when running tomcat directly rather than though jsvc, 
>> but it is probably not conclusive evidence that the culprit is jsvc.
>>
>> best regards
>> Claus
>>
>> Yves Glodt wrote:
>>   
>>> Hi,
>>>
>>> I run an OpenCms instance in Ubuntu on a 4GB-box, and I wonder how I can 
>>> set up tomcat to best use the resources the box has.
>>>
>>> To override the conservative defaults, for now I did:
>>>
>>> JAVA_OPTS="-Xserver -Xss1024K -Xms1G -Xmx2G -XX:MaxPermSize=128M 
>>> -XX:NewSize=512m"
>>>
>>> What do you think of these settings?
>>>
>>> best regards,
>>> yves
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>>
>>> _______________________________________________
>>> This mail is sent to you from the opencms-dev mailing list
>>> To change your list options, or to unsubscribe from the list, please visit
>>> http://lists.opencms.org/mailman/listinfo/opencms-dev
>>>     
>>   
> 
> 
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev
> 

-- 
Claus Priisholm, CodeDroids ApS
Phone: +45 48 22 46 46
cpr (you know what) codedroids.com - http://www.codedroids.com
cpr (you know what) interlet.dk - http://www.interlet.dk
-- 
Javadocs and other OpenCms stuff: 
http://www.codedroids.com/community/opencms



More information about the opencms-dev mailing list