[Performance Tuning] - JVM pauses periodically
by jamesd256
Hi,
We are having trouble with our production application server; the JVM seems to pause from time to time.
This is apparent both in lack of responsiveness, and gaps in the logs. Normally we have tens of log lines per second, but we see gaps where nothing is logged for anything from 4-30 seconds.
The server is under constant load, and averages about 150 threads, peaking at about 300.
It's running on 32 bit Ubuntu Server using the Sun 1.6.0-b105 JVM.
The jvm is started with the following:
JAVA_OPTS="-server -Xms2048m -Xmx2048m -XX:PermSize=128m -XX:MaxPermSize=128m
We have a tool which graphs the memory pools of the JVM, and I can see that survivor space and eden space are running at high percentages, while heap usage stays around 20%, peaking at up to 70%.
At present the JVM uptime is 203035600 and the following GC figures are as follows.
PS Scavenge: CollectionCount (9364) CollectionTime (321892)
PS MarkSweep: CollectionCount (57) CollectionTime (67529)
>From my understanding of these figures, the throughput of the JVM seems ok to me, and doesn't seem to account for the pauses.
I occasionally take a thread dump and find deadlocked threads, but normally there are none.
My questions are; what should I be monitoring? Can I tweak the JAVA_OPTS to change some (ratio?) settings?
I've tried to find the right forum for this, so sorry if this isn't it. If you know a better place to ask, I'd be grateful.
Thanks in advance,
James
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4171776#4171776
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4171776
17 years, 8 months
[Tomcat, HTTPD, Servlets & JSP] - Re: servlet: how to spawn all processors
by john_woo@canada.com
"kjkoster" wrote : "john_woo(a)canada.com" wrote : I did try the affinity setting (to 4 cpus for the app), but only 1-2 cpu busy. I guessed b/c all threads running in the same process from the main servlet.
|
| There is a fair chance that your application is not as thread-able as you think it is. Do you do any manual synchronisation, or do you make heavy use of libraries that do internal synchronisation?
|
| Use JConsole to check that you are not exhausting the Tomcat connector thread pools (or other pools)
|
| Also, check that you are running with the server VM http://www.java-monitor.com/forum/showthread.php?t=18.
Thanks lots for the info, kjkoster.
However, the -server or GC option didn't help. As metioned, running in multi-cores is very slow. and 1-2 cpus keep busy, which is not happened in 1-2 cores machine. The only thing I can think of is the JVM, RTSJ. or even 32/64 bits issue.
--
John
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4171772#4171772
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4171772
17 years, 8 months
[JBoss Cache: Core Edition] - Eviction node event queue warning
by em161100
Hello all,
I'm working JBoss Cache 'Alegrias' 2.1.1.GA under Windows environment.
Problem : under heavy load, I start receiving the following warning messages :
WARNING: putNodeEvent(): eviction node event queue size is at 98% threshold value of capacity: 200000 Region: /objects/users You will need to reduce the wakeUpIntervalSeconds parameter.
Aug 21, 2008 3:54:32 PM org.jboss.cache.RegionImpl putNodeEvent
I'm working in local configuration and I tried to reduce wakeup time to 5 seconds and it didn't help. This is a snapshot of my configuration :
5
org.jboss.cache.eviction.LRUPolicy
<!--
the tags max time should be fixed with an eviction method
-->
10000
172800
<!--
the profiles will be evicted after 5 hours in the cache
-->
30000
18000
I'm using sun JVM - V1.6.
What is the best method for solving this ? From reading in the forums I'm not sure that it is good to have a thread every 1 seconds cleaning the cache and I also feel like it might not solve the problem.
Any help will do.
Thanks,
Elad.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4171771#4171771
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4171771
17 years, 8 months
[Security & JAAS/JBoss] - JAAS Authentication from stand alone client
by eefahs
Hi,
I am new to JBoss and JAAS authentication. If someone can help me in the following it will be of great help.
I want to validate my username and password from the database table and these values are captured via Java Swing standalone client. I dont have a concept of Role, I just want to validate the usename and password.
I have created my Loginmodule which implements javax.security.auth.spi.LoginModule and its login method will call my DAO class and will do the validation of the username and password. And in the java swing client, I will get the username and password from the user. and will create the LoginContext and will call the login method.
In the client side jaas configuration file I configured my login module and in the server login-context.xml, I declared my security domain.
But how to link the sever side and client side?
Where do I have to keep the LoginModule files in the client or server?
What are all the configurations required in the client side?
What are all the configurations required in the server side?
Without the concept of Roles can we do the authentication using JAAS, if yes how?
There are somany examples/articles on declarative authetication, Is there any article or example available for complete programatic authetication From a STAND ALONE client?
where should I start? I am using JBOSS jboss-4.2.2.GA and cleint side java Swing
If someone can direct me to the right direction, it will be of great help...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4171768#4171768
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4171768
17 years, 8 months
[JBossWS] - Re: Trying to use jboss.xml instead of @WebContext
by karypid
Hello,
I am using the very latest: JBossAS 4.2.3.GA and JBossWS-Native 3.0.3.GA.
When my EJB is coded as follows:
@Stateless
| @WebService(
| serviceName="MyBasicWS", portName = "MyBasicWSSOAP",
| targetNamespace = "http://www.example.org/MyBasicWS/",
| endpointInterface = "org.example.mybasicws.MyBasicWS")
| @WebContext(authMethod="BASIC")
| @RolesAllowed("friend")
| public class MyBasicWSImpl {
| public String echo(String in) {
| System.out.println("RECEIVED: " + in);
| return in;
| }
| }
I use the following jboss.xml to set the security domain:
<!DOCTYPE jboss PUBLIC
| "-//JBoss//DTD JBOSS 4.2//EN"
| "http://www.jboss.org/j2ee/dtd/jboss_4_2.dtd">
| <jboss>
| <security-domain>java:/jaas/JBossWS</security-domain>
| <webservices>
| <context-root>myBasicWS</context-root>
| </webservices>
| </jboss>
Everything works like a charm with the combination above (I must access the EJB as kermit/thefrog from the default jbossws-xxxx.properties files). However, I want to get rid of the @WebContext annotation. My idea (which does not work) is the following combination:
@Stateless
| @WebService(
| serviceName="MyBasicWS", portName = "MyBasicWSSOAP",
| targetNamespace = "http://www.example.org/MyBasicWS/",
| endpointInterface = "org.example.mybasicws.MyBasicWS")
| //@WebContext(authMethod="BASIC")
| //Undesirable
| //The above should be picked up from jboss.xml
| @RolesAllowed("friend")
| public class MyBasicWSImpl {
| public String echo(String in) {
| System.out.println("RECEIVED: " + in);
| return in;
| }
| }
Then, I try to express that the EJB must use BASIC authentication method as follows:
<!DOCTYPE jboss PUBLIC
| "-//JBoss//DTD JBOSS 4.2//EN"
| "http://www.jboss.org/j2ee/dtd/jboss_4_2.dtd">
| <jboss>
| <security-domain>java:/jaas/JBossWS</security-domain>
| <webservices>
| <context-root>myBasicWS</context-root>
| </webservices>
| <enterprise-beans>
| <session>
| <ejb-name>MyBasicWSImpl</ejb-name>
| <port-component>
| <port-component-name>MyBasicWSSOAP</port-component-name>
| <auth-method>BASIC</auth-method>
| </port-component>
| </session>
| </enterprise-beans>
| </jboss>
In this case however, the client throws an authorization failure exception:
javax.xml.ws.soap.SOAPFaultException: Authorization failure
| at org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS.getSOAPFaultException(SOAPFaultHelperJAXWS.java:77)
| at org.jboss.ws.core.jaxws.binding.SOAP11BindingJAXWS.throwFaultException(SOAP11BindingJAXWS.java:107)
| at org.jboss.ws.core.CommonSOAPBinding.unbindResponseMessage(CommonSOAPBinding.java:577)
| at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:381)
| at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:291)
| at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:170)
| at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:150)
| at $Proxy19.echo(Unknown Source)
| at test.TestBasicWS.basicAuthTest(TestBasicWS.java:41)
On the server side, I see this:
15:41:47,349 ERROR [RoleBasedAuthorizationInterceptor] Insufficient permissions, principal=null, requiredRoles=[friend], principalRoles=[]
| 15:41:47,349 ERROR [SOAPFaultHelperJAXWS] SOAP request exception
| javax.ejb.EJBAccessException: Authorization failure
| at org.jboss.ejb3.security.RoleBasedAuthorizationInterceptor.invoke(RoleBasedAuthorizationInterceptor.java:120
Apparently, JBoss disregards the BASIC-auth and does NOT assign a principal to the session. Therefore the role-based authenticator denies access to the method (as it should).
Apparently, my jboss.xml does not tell JBoss to associate basic-auth with the published web service. I was suspicious of what I should put in the "port-component-name" value. Supposedly, the documentation says: Maps to the port-component-name in the webservices.xml descriptor. However, I do not use a webservices.xml file but use the @WebService annotation instead.
In the code above I use the value for the "portName" attribute of @WebService but I also tried the ejb-name (MyBasicWSImpl) and the serviceName (MyBasicWS) with no luck.
Any clues as to how I can achieve this while keeping the code JBoss-clear?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4171766#4171766
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4171766
17 years, 8 months