[Performance Tuning] - Re: High Swap Utilization, lot's of RAM free
by PeterJ
How did you go about selecting the NewSize and survivor ratios? With the initial ratio of 2, each survivor space is 1m and the eden 2m. You will fill up the 2m eden in no time (literally in milliseconds). And the 1m survivor space will be mostly empty because only a small fraction of objects survive a collection.
For production, you should set Xmx and Xms to the same size (prevents the JVM form constantly requesting more memory, or freeing up memory, and from deciding if it should do either. I wonder if that has a bearing on the swap utilization you are seeing, not really sure, it could also be the heap sizes you are using).
Do not set the heap to 28G like you have it. You will not be happy if you fill it up and the garbage collector collects that heap - it will take forever (1/2 hour, 1 hour, more???).
A good starting point for the heap is 1200M, unless you can show that you need more memory, or can get away with less. Based on your system RAM, 1200M is nothing.
If you set both Xmx and Xms to 1200M, you should set NewSize to around 300m (NewSize should be 1/3 to 1/4 of the heap size) .
Do not set any survivor ratio arguments unless you have analyzed the data from PrintHeapAtGC and determined that you need to fine tune the survivor ratio.
The resulting JAVA_OPS are thus:
set JAVA_OPTS=%JAVA_OPTS% -Xms1200m -Xmx1200m -XX:NewSize=300m -XX:MaxNewSize=300m -XX:PermSize=256m
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4077545#4077545
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4077545
18Â years, 8Â months
[JBoss Messaging] - Re: JBoss Messaging / Spring JMS compatibility?
by nkhadakk
Ok i think i figured it out. Spring has a ton load of configuration options. One of the configurations allows for caching the consumer ... hence reducing the overhead of creating connections etc.
| <bean id="URIlistener" class="org.springframework.jms.listener.DefaultMessageListenerContainer" lazy-init="false" >
| <property name="concurrentConsumers" value="${medium.messaging.urimessaging.listener_count}" />
| <property name="connectionFactory" ref="ConnectionFactory" />
| <property name="destination" ref="ResolvedURIQueue" />
| <property name="messageListener" ref="uriEventMessageListener" />
| <property name="cacheLevel"> <util:constant static-field="org.springframework.jms.listener.DefaultMessageListenerContainer.CACHE_CONSUMER"/>
| </property>
| <property name="recoveryInterval" value="100000"/>
| </bean>
|
| <bean id="uriEventMessageListener" class="org.springframework.jms.listener.adapter.MessageListenerAdapter" lazy-init="false">
| <property name="delegate">
| <ref bean="uriEventListener"/>
| </property>
| <property name="messageConverter">
| <null/>
| </property>
| </bean>
|
the property 'cacheLevel' being set to 'CACHE_CONSUMER' solves this 'too many open files issue'
If not specified the default is 'CACHE_NONE'... and this appears to cause the error
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4077541#4077541
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4077541
18Â years, 8Â months
[Performance Tuning] - Re: High Swap Utilization, lot's of RAM free
by Polaren
"PeterJ" wrote : How are you starting the app server? By manually executing run.bat or have you installed the app server as a service? If you installed the app server as a service, which utility did you use to do this? The utilities I know of include JBoss Native, JavaService, Java Service Wrapper and each configures JVM options differently.
Manually executing run.bat
anonymous wrote :
| If you are using run.bat of JBoss Native the JVM heap options are set in JAVA_OPTS in run.bat.
rem Sun JVM memory allocation pool parameters. Modify as appropriate.
set JAVA_OPTS=%JAVA_OPTS% -Xms160m -Xmx28672m -XX:NewSize=4m -XX:PermSize=256m -XX:SurvivorRatio=2 -XX:TargetSurvivorRatio=80
anonymous wrote : Have you used -verbose:gc (or other heap-monitoring options) to determine JVM heap usage?
|
No, Sir
If you need more info, let me know :)
Thanks for your help so far
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4077539#4077539
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4077539
18Â years, 8Â months