[JBossCache] - High CPU usage in Weblogic 8.1
by ottuzzi
Hi there,
I'm evaluating Treecache as cluster cache in our environment: we are running a weblogic8.1SP2 cluster deployed on Solaris 5.9 (aka Solaris 9) with SUN JDK 1.4.1_02.
Here is the configuration I'm using:
<?xml version="1.0" encoding="UTF-8"?>
| <server>
|
| <classpath codebase="./lib" archives="jboss-cache.jar, jgroups.jar"/>
|
|
| <mbean code="org.jboss.cache.TreeCache"
| name="jboss.cache:service=TreeCache">
|
| <attribute name="IsolationLevel">REPEATABLE_READ</attribute>
| <attribute name="CacheMode">REPL_ASYNC</attribute>
| <attribute name="UseReplQueue">false</attribute>
| <attribute name="ReplQueueInterval">0</attribute>
| <attribute name="ReplQueueMaxElements">0</attribute>
| <attribute name="ClusterName">TreeCache-RA-Cluster</attribute>
| <attribute name="ClusterConfig">
| <config>
| <UDP mcast_addr="228.1.2.3" mcast_port="48866"
| ip_ttl="64" ip_mcast="true"
| mcast_send_buf_size="150000" mcast_recv_buf_size="80000"
| ucast_send_buf_size="150000" ucast_recv_buf_size="80000"
| loopback="false"/>
| <PING timeout="2000" num_initial_members="3"
| up_thread="false" down_thread="false"/>
| <MERGE2 min_interval="10000" max_interval="20000"/>
| <FD_SOCK/>
| <VERIFY_SUSPECT timeout="1500"
| up_thread="false" down_thread="false"/>
| <pbcast.NAKACK gc_lag="50" retransmit_timeout="600,1200,2400,4800"
| max_xmit_size="8192" up_thread="false" down_thread="false"/>
| <UNICAST timeout="600,1200,2400" down_thread="false"/>
| <pbcast.STABLE desired_avg_gossip="20000"
| up_thread="false" down_thread="false"/>
| <pbcast.GMS join_timeout="5000" join_retry_timeout="2000"
| shun="true" print_local_addr="true"/>
| <FC max_credits="2000000" down_thread="false" up_thread="false"
| min_threshold="0.20"/>
| <FRAG frag_size="8192" down_thread="false" up_thread="true"/>
| <pbcast.STATE_TRANSFER up_thread="true" down_thread="true"/>
| </config>
| </attribute>
|
| <attribute name="FetchInMemoryState">true</attribute>
| <attribute name="InitialStateRetrievalTimeout">20000</attribute>
| <attribute name="SyncReplTimeout">20000</attribute>
| <attribute name="LockAcquisitionTimeout">15000</attribute>
| <attribute name="EvictionPolicyClass">org.jboss.cache.eviction.LRUPolicy</attribute>
| <attribute name="EvictionPolicyConfig">
| <config>
| <attribute name="wakeUpIntervalSeconds">30</attribute><!-- 30 SECONDS -->
| <!-- Cache wide default -->
| <region name="/_default_">
| <attribute name="maxNodes">10000</attribute>
| <attribute name="timeToLiveSeconds">1800</attribute><!-- 30 MINUTES -->
| <attribute name="maxAgeSeconds">1800</attribute><!-- 30 MINUTES -->
| </region>
| <region name="/USER/">
| <attribute name="maxNodes">1000</attribute>
| <attribute name="timeToLiveSeconds">900</attribute><!-- 15 MINUTES -->
| <attribute name="maxAgeSeconds">900</attribute><!-- 15 MINUTES -->
| </region>
| </config>
| </attribute>
| <attribute name="UseRegionBasedMarshalling">true</attribute>
|
| </mbean>
|
| </server>
During tests I see a very HIGH CPU usage caused by TreeCache: without cache I see a CPU usage of about 10%, with TreeCache I can see even 20% CPU usage.
I made more tests to better understand the problem and I found that the simple cache initialization (I commented out all put/get/remove methods accessing Treecache and I simply initialized cache with the above XML) is enough to see the abnormal CPU usage: what is happening there?
Any help would be greatly appreciated.
Thanks
Bye
Piero
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4014913#4014913
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4014913
19Â years, 2Â months
[Installation, Configuration & Deployment] - jboss server start up problem on AIX 5.2
by muralimadhav_123
When I tried to start JBOSS 4.0 server on AIX 5.2 It is giving following error message:
================================================
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /usr/jboss-4.0.0
JAVA: /usr/java14/bin/java
JAVA_OPTS: -server -Xms128m -Xmx128m -Dprogram.name=run.sh
CLASSPATH: /usr/jboss-4.0.0/bin/run.jar:/usr/java14/lib/tools.jar
=========================================================================
The JVM option is invalid: -server
Could not create the Java virtual machine.
Usage: java [-options] class [args...]
(to execute a class)
or java [-jar] [-options] jarfile [args...]
(to execute a jar file)
where options include:
-cp -classpath <directories and zip/jar files separated by :>
set search path for application classes and resources
-D=
set a system property
-verbose[:class|gc|jni]
enable verbose output
-version print product version
-showversion print product version and continue
-? -help print this help message
-X print help on non-standard options
-assert print help on assert options
================================================
Can anyone help me in solving this issue,
Thanks in Advance,
B. Murali.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4014905#4014905
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4014905
19Â years, 2Â months
[JNDI/Naming/Network] - Cannot instantiate class: org.jnp.interfaces.NamingContextFa
by sandrocchio_0.1
Hi there,
I'm trying to call an session Bean (EJB3 - jboss 4.0.5) methods from a simple client. But it returns me the following error:
Caught an unexpected exception: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory
in the classpath:
jboss-j2ee.jar
Cart - dist/Cart.jar (the ejb module)
jdk 1.5
-default package
| |- jndi.properties
| |
| |- cartClient
| |-Main.java
the jndi.properties
### JBossNS client properties for connection from the localhost
| java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
| java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
| java.naming.provider.url=jnp://localhost:1099/
|
| # The jnp protocol socket factory class
| jnp.socketFactory=org.jnp.interfaces.TimedSocketFactory
and the Main.java
public class Main {
|
| /** Creates a new instance of Main */
| public Main() {
| }
|
| /**
| * @param args the command line arguments
| */
| public static void main(String[] args) {
| // TODO code application logic here
| try{
| Context ctx = new InitialContext();
| Object objRef = ctx.lookup("ejb/CartBean");
| CartRemoteHome home =
| (CartRemoteHome)PortableRemoteObject.narrow(objRef, CartRemoteHome.class);
|
| CartRemote shoppingCart = home.create("Duke DeEarl", "123");
|
| shoppingCart.addBook("The Martian Chronicles");
| shoppingCart.addBook("2001 A Space Odyssey");
| shoppingCart.addBook("The Left Hand of Darkness");
|
| Vector bookList = new Vector();
|
| bookList = shoppingCart.getContents();
|
| Enumeration enumer = bookList.elements();
|
| while (enumer.hasMoreElements()) {
| String title = (String) enumer.nextElement();
|
| System.out.println(title);
| }
|
| shoppingCart.removeBook("Alice in Wonderland");
| shoppingCart.remove();
|
| System.exit(0);
|
| }catch(BookException ex){
| System.err.println("Caught a BookException " + ex.getMessage());
| System.exit(0);
| }catch(Exception ex){
| System.err.println("Caught an unexpected exception: " + ex.getMessage());
| System.exit(1);
| }
| }
|
| }
Any help? Thanks in advance.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4014900#4014900
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4014900
19Â years, 2Â months
[JBoss Portal] - Re: Packaging of portlet-instances.xml
by legolas
Hi Julian (or others),
I have implemented this as an MBean that instantiates each portlet instance during its start method, and destroys them again during the stop method.
Before instantiation however I check if the instance name is already used, if so I write a warn to the log.
The first time I startup the server, each instance in my file gets instantiated correctly. When I then stop the server, I see messages that each instance is destroyed again.
So far so good.
However when I start the server the second time, I see messages that the instances have already been created.
These messages all come from my code, but indicate that the instances have not been destroyed during the stop of the server.
It seems that the instances are not removed from the database when destroying them, is this intended behaviour?
Thanks,
Marcel
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4014893#4014893
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4014893
19Â years, 2Â months