[JBoss Cache: Core Edition] - Excessive ReentrantLock$NonfairSync objects
by molsen-ee
I'm using jboss-cache (jbosscache-core-2.1.1.GA) to implement a cache on a Tomcat/Apache environment and am having some issues with memory usage.
When I have the Isolation level set to anything other than "NONE" there is an excessive number of objects relating to ConcurrentHashMap's created and residing in memory. When 400k Nodes' are created there are over 7 million ConcurrentHashMap structures, approximately 16 per node. See the jmap histo dump below for the memory usage.
| num #instances #bytes class name
| --------------------------------------
| 1: 7058684 225877888 java.util.concurrent.ConcurrentHashMap$Segment
| 2: 7058738 169409712 java.util.concurrent.locks.ReentrantLock$NonfairSync
| 3: 7058684 116611080 [Ljava.util.concurrent.ConcurrentHashMap$HashEntry;
| 4: 443647 35648184 [Ljava.util.HashMap$Entry;
| 5: 441170 35293456 [Ljava.util.concurrent.ConcurrentHashMap$Segment;
| 6: 441115 24702440 org.jboss.cache.lock.ReadWriteLockWithUpgrade
| 7: 441115 21173520 org.jboss.cache.UnversionedNode
| 8: 443357 17734280 java.util.HashMap
| 9: 441170 17646800 java.util.concurrent.ConcurrentHashMap
| 10: 441115 17644600 org.jboss.cache.invocation.NodeInvocationDelegate
| 11: 455905 11396456 [Ljava.lang.Object;
| 12: 460983 11063592 java.util.HashMap$Entry
| 13: 270774 11019496 [C
| 14: 442649 10623576 java.util.ArrayList
| 15: 441377 10593048 java.util.concurrent.ConcurrentHashMap$HashEntry
| 16: 441142 10587408 java.util.RegularEnumSet
| 17: 441116 10586784 org.jboss.cache.Fqn
| 18: 441115 10586760 org.jboss.cache.lock.IdentityLock
| 19: 441117 7057872 org.jboss.cache.util.concurrent.ConcurrentHashSet
| 20: 441115 7057840 org.jboss.cache.lock.LockStrategyRepeatableRead
| 21: 441115 7057840 org.jboss.cache.lock.ReadWriteLockWithUpgrade$WriterLock
| 22: 441115 7057840 org.jboss.cache.lock.ReadWriteLockWithUpgrade$ReaderLock
| 23: 441115 7057840 org.jboss.cache.lock.LockMap
|
The cache is initialized and populated in a tomcat request filter when the tomcat server is first started. The cache seems to work properly but it is consuming incredible amounts of memory.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4161564#4161564
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4161564
16 years, 6 months
[JBossWS] - Re: Need help : JBossWS Security!
by xinhua
Sorry, forgot to paste the codes
| public static void main(String[] args) {
| KSBService ksb = null;
| try {
| //SSL keystore
| System.setProperty("javax.net.ssl.keyStore", "c:\\ksbws.keystore");
| System.setProperty("javax.net.ssl.trustStore", "c:\\ksbws.keystore");
| System.setProperty("javax.net.ssl.keyStorePassword", "test");
| System.setProperty("javax.net.ssl.trustStorePassword", "test");
| System.setProperty("javax.net.ssl.keyStoreType", "jks");
| System.setProperty("javax.net.ssl.trustStoreType", "jks");
| System.setProperty("org.jboss.security.ignoreHttpsHost","true");
|
| //Signature keystore
| System.setProperty("org.jboss.ws.wsse.keyStore","c:\\ksbws_security.keystore");
| System.setProperty("org.jboss.ws.wsse.trustStore","c:\\ksbws_security.keystore");
| System.setProperty("org.jboss.ws.wsse.keyStorePassword", "test");
| System.setProperty("org.jboss.ws.wsse.trustStorePassword", "test");
| System.setProperty("org.jboss.ws.wsse.keyStoreType", "jks");
| System.setProperty("org.jboss.ws.wsse.trustStoreType", "jks");
|
| Service service = Service.create(new URL("http://localhost:8180/KSBService/KSBServiceBean?wsdl"),
| new QName("http://xxx.xxx.de/","KSBServiceBeanService") );
|
|
|
|
| ksb= service.getPort(KSBService.class);
|
| URL securityURL = new File("META-INF/jboss-wsse-client.xml").toURL();
| URL securityConfig= new File("META-INF/standard-jaxws-client-config.xml").toURL();
| ((StubExt) port).setSecurityConfig(securityURL.toExternalForm());
| ((StubExt) port).setConfigName("Standard WSSecurity Client",securityConfig.toExternalForm());
|
|
| ((BindingProvider) port).getRequestContext().put(BindingProvider.USERNAME_PROPERTY, "kermit");
| ((BindingProvider) port).getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, "thefrog");
|
|
|
| } catch (Exception e) {
| ....
| ...
|
and also, i am not very clear about mixing jaxrpc and jaxws classes. :?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4161556#4161556
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4161556
16 years, 6 months