One. JROCKIT Tuning Introduction JROCKIT is an adaptive JVM that automatically adjusts yourself to adapt to the underlying hardware, so the tuning is mainly focused on some parameters that require manual intervention, such as how much RAM needs to be used, etc. . JROCKIT has a set of non-standard -X boot options, we can use it to adjust JVM. JROCKIT has two groups of primary subsystems that can be optimized - memory management systems (including garbage recycling) and thread systems. There are a lot of tuning work in terms of memory management subsystems. two. Tuning WebLogic Jrockit JVM1. Setting the initial heap size can set the initial heap size through -XMS:
The default is: 1. The IA32 drives a default value of alloc2. The IA64 drives the default value of GC5. Defining the type of thread allocation You can use -XallocationType:
This option is for debugging, which will generate a large number of console outputs. 6. Adjusting threads When using threads (more than 100), you need to adjust the thread options: 1. Use the Thin thread option. -XthInthreads. The thin thread mode is very effective under Linux. Note: Thin thread is just a test option in JROCKIT, which is not recommended; 2. Turn off the options for local allocation threads. -XallocationType: Global. Each local thread area consumes approximately 2K memory. If you use threads in a lot, local threads will not only cause memory space, but also cause a stack of fragments. Use the global thread mechanism to reduce the biler, but speed is slow in memory allocation. 7. Analyze and improve application design to find bottlenecks: 1. Use Intel VTune tools; 2. Use -XJVMPI: Allocs = Off, Monitors = OFF, EntryExit = Off option. three. When Command Line Options By Name Start JROCKIT, you can bring some -X options, which are non-JVM standards, specifically to configure the performance of JROCKIT. Option Description -X Display Extended Java Options - xallotype-xallocationType Value Global and Local, define whether to use local threads or global threads. -XBootClassPath specifies the class search path, which can be zip and jar files, to define memory cleaning timing, values GC, Local, Alloc. GC indicates that the memory is cleaned up when garbage recovery; the local representation is cleared when the LOCAL thread is allocated; alloc indicates that the memory area is cleaned up to other objects to clean -XGC to select the type of garbage collector to use, and values: gencopy: generational copyingsinglecon: single spaced concurrent, single space concurrent gencon: generational concurrentparallel: parallel if -Xmx less than 128M, defaults gencopy, otherwise the gencon-Xgcpause printed by the pause time garbage collector garbage collection caused -Xgcreport print a report whether -Xjvmpi Allow JVMPI events, these events include: entryExit Allocs (Default ON) MONITORS (Default ON) ARENASDELETE (Default OFF) -XManagement activates the management server in the JVM, and can connect to the JVM management console Before it is, you must first activate. -XMS Sets the initial heap size, the unit has K, M, G-XMX settings maximum heap size, with k, m, g-xnativethreads use the local thread system, this is the default option -xnoclassGC prohibited to use garbage recycling - xnohup Tell JROCKIT, ignore Ctrl_Logoff_Event and Sighup Events -XNS Set Nursry Size, with K, M, G-XSS Settings Whent Stack Size, K, M, G-XTHINTHREADS Using JROCKIT's high-performance thread system, not available on IA64 .
-Xverbose makes JROCKIT print more information, optional parameters are: Codegen, CPUINFO, GC, LOAD, MEMORY, OPT-XVERIFY, made a complete Bytecode level of check four. Tuning WebLogic1 with the Method Profiler in JROCKIT8.1. About Method Profiler Tools Bea WebLogic JROCKIT 8.1 provides a Profiling tool: Method Profiler to tune WebLogic app. 2. Method Profiler Tools with Method Profiler Tuning WebLogic Apply JROCKIT 8.1 Method Profiler tools can be counted in the number of members methods performed on the JROCKIT Java virtual machine, the total time performed, and each called execution time, as shown in Figure 1 Indicated. Such functions can make us TUNING (code grade) on the application running on WebLogic, and the second is greatly convenient for us to determine where the system bottleneck. This can also be said that JROCKIT JVM is a major advantage over other JVMs. In the pressure test of WebLogic Server 8.1, when a sample containing a sample containing CMP characteristics, the bottleneck of the system was used to diagnose the bottleneck of the system using JROCKIT's Method Profiler. In addition to the CMP Entity Bean in this set of samples, the CMP Entity bean is inserted with EJBCREATE. It is followed by the setName method to set its name attribute, ie UPDATE, the value of the Name domain in the database record, the code is as follows: public void ejbcreate ) // Stateful4CMPBean method of throws CreateException {try {Context ctx = new InitialContext (); SheepHome home = (SheepHome) ctx.lookup ( "Sheep"); Sheep sheep = null; int x = getNextId (); // getNextId () Also contains operations for the database sheep = home.create (x); if (Sheep! = Null) {sheep.setname ("sheep1" .concat (String.Valueof (String.Valueof (x))))); m_strmsg = "Create sheep" .concat (String.Valueof (String.Valueof (x)));} else {m_Strmsg = "The Sheep Name is not created.";}} Catch (Exception E) {m_Strmsg = "*** Some Exception Occured! (CMP) ".concat (String.Valueof (String.Valueof (E.GetMalueof (E.GetMessage ())))));}} The data measured at this time is very low, and the RESPONSE TIME is always in the TPS. Over time is almost linearly climbed. So use Method Profiler to diagnose: (1) Add -XManagement in JROCKIT's startup parameters to start its Management Server at the same time as you start JROCKIT. (2) Start JROCKIT Management Console and connect it to the launched Management Server.