Glassfish V3 optimization experience

Source: Internet
Author: User
Tags glassfish

 

Configure JVMParameters (include 64-bit JVM) will bring different performance experiences when running glassfish. Setting JVM parameters in glassfish only optimizes Part INext, let's talk about which JVM in glassfish can improve the performance, Here we will not describe them one by one.Haha.
1. Modify the parameters-xmx512 and-client.
For these parameters -Server,-XX: + aggressiveheap,-xmx2048m,-xms2048m,-xss128k,-XX: + disableexplicitgcDo not write several lines in one row separately. In addition, if your memory usage range in 64-bit jmv needs to be set to-xmx4096m-xms4096m, that is to say, the 64-bit running environment requires a size greater than 4 GB to achieve the effect. In a Windows 32-bit environment, generally, 1.4 GB to GB is a relatively stable value, and 2 GB is a limit. In the Solaris CPU environment, try to keep the value within MB. 2. If you run glassfish V3 on multiple CPUs, you need to add these two parameters to increase the processing capability of parallel operations:
-XX: parallelgcthreads = N(Where N is the number of CPUs, if n> 8, n = number of CPUs x2)
-XX: + useparalleloldgc
-XX: largepagesizeinbytes = 256 m3. If you are using a 64-bit JVM environment with JDK version 6160:
-XX: + usecompressedoopsParameters. in addition, you must note that setting the maximum value of the Java Heap has a certain relationship with your operating system. The parameters required for Linux/solairs/Windows, 32-bit or 64-bit environments are different, therefore, different parameters should be set according to the specific operating system environment.

 Stroy:
Why is the glassfish application running slowly?
We encountered a strange phenomenon in the project. glassfish V3 + JVM 64 runs in the RedHat centos 64-bit operating system, and everything works normally within 20 minutes at startup, however, it takes two to three hours to open the web application, and the page cannot be opened at 404,HoweverThe management interface of port 4848 runs very normally. After many explorations, it is replaced with a 32-bit JDK. Everything runs normally, and glassfish V3 is in an unoptimized initial state.

If the above method does not solve the performance problem, please read more adjustment parameter information, you can try to see the Java hotspot Virtual Machine options. You can also use tools such as jstat (statistical monitoring tool for Java Virtual Machine) and hprof (Heap/CPU profiling tool) to diagnose application performance problems.

  Saliva:
Glassfish V3 GA has gradually gained a huge market in the industry. Java ee6, NiO, servlet3.0, HTTP asynchronous operations, and osgi microframeworkAnd other exciting new technologies.
In addition, the differences between glassfish V3 and glassfish v2 are large. Compared with the V3 version, the grizzly Web framework is worth noting. In the V3 version, grizzly Web framework serves as an extensible microkernel to handle almost all real-time operations, static resources, servlet containers, jruby container/Python container/grails container's extended management and monitoring status.
Let's take a look at the grizzly internal structure in glassfish V3 ,:
Let's take a look at the running grizzly execution process ,:

 

If you are interested in grizzly in glassfish, you can send me an email or leave a message to discuss related topics. Author: h.e. | you can reprint it, but the original source and author information and copyright statement of the article must be indicated in hyperlink form
Web: http://www.javabloger.com/article/glassfish-v3-jvm-configuring-and-64-bit-jvm.html

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.