I will share 11 practical tips on Java performance tuning and java Tuning
Most developers think that performance optimization is a complicated problem and requires a lot of experience and knowledge. Yes, it is not wrong. It is not
Become a Java GC expert (5)-Java Performance Tuning principle, gc Tuning
Not every program needs optimization. If the performance of a program is the same as expected, you don't have to put extra effort into improving its
11 simple Java performance tuning techniques, java Tuning
Most developers naturally think that performance optimization is complex and requires a lot of experience and knowledge. Well, it cannot be said that this is completely wro
A basic knowledge
1.1 What is the performance
Before performance tuning, let's first look at what performance is. As for performance, I think everyone who has studied Java can list a few points or even talk about it. In the book
The main processes of tuning the JVM are:1. Determine heap memory size (-XMX,-XMS)2, the rational distribution of the new generation and old generation (-xx:newratio,-XMN,-xx:survivorratio)3. Determine the size of the permanent zone (-xx:permsize,-xx:maxpermsiize)4. Select the garbage collector5, the garbage collector to set reasonable6. Disable GC (-XX:+DISABLEEXPLICITGC)7. Disable class Metadata recycling (-XNOCLASSGC)8. Disable class validation (-x
A basic knowledge1.1 What is performanceBefore performance tuning, let's start by understanding what performance is. With regard to performance, I think everyone who has studied Java can list a few points and even talk about it. In the J
collection process are explained.The five articles will explain the principles of Java Program Performance tuning, especially the necessary knowledge in this process and the need to determine whether your program needs tuning. It also describes the problems you may encounter during
libraries correctly in the appropriate scenario. At the same time, the flexible use of algorithms and data structures is also an important part of code optimization.While code optimization is a micro-tuning of performance, a "good" implementation and a "bad" implementation have a significant impact on the system. For example, the same as the implementation of the list, LinkedList and ArrayList on the rando
garbage collection process are explained. The five articles will explain the principles of Java Program Performance tuning, especially the necessary knowledge in this process and the need to determine whether your program needs tuning. It also describes the problems you may encounter during
Title:java Program Performance Tuning notes (3)-tips to help improve performanceTags: tips to help improve performance grammar_cjkruby:true 1. Use exceptions with caution
@Test public
void Testinfortrycatch () {//performance difference
long Starttime=system.currenttimemillis ();
int a=0;
. GC Tuning target has three basic ideas: Reduce GC frequency, can increase the heap space, reduce unnecessary object generation, reduce GC pause time, can be achieved by reducing heap space, using the CMS GC algorithm, avoid full GC, adjust the CMS trigger scale, avoid Promotion Failur E and Concurrent mode failure (the older generation allocates more space, increases the number of GC threads to recover faster), reduces large object generation, and s
below: The total number of instances created on the left, the structure of the instance on the right, and the reference description below, which can be seen in the class Cyclicdependencies and referenced by HashMap.This can determine the location of the leak, and then according to the actual situation to analyze and solve. JVISUALVM remotely monitor Tomcat 1 and modify the remote Tomcat's catalina.sh profile, where it adds:
java_opts="$JAVA
strong support for the application performance diagnosis.Back to top of pagePerformance optimization PracticesAfter introducing some of the commonly used performance diagnostic tools, here are some examples from the JVM layer, the application code layer, and the database tier, combined with our practice in Java application tuning.JVM
First, the performance of the program through which several aspects of performance1. Execution speed (whether the reaction time of the program is rapid or short enough)2, allocate memory (allocate memory is reasonable, whether excessive memory consumption or memory overflow)3. Start-up time (how long it takes for the program from running to normal to process the business)4, load withstand capacity (when the system pressure rises, the system's executio
), versioning (git or SVN), big Data (odd heat), artificial intelligence (tall), etc.Someone asked, why does the architect still write code? I think, need to write as always, but the goal is not the same, the theoretical level and practical ability need to improve at the same time. Depth, attention to design ideas and patterns, breadth, for the forefront of technology, to pursue and research, so as to the future technical framework selection to make a reasonable decision.Java from getting starte
embedded devices, or memory, hard disk space, etc., by using the method of sacrificing CPU, to obtain the original need more memory or hard disk space to complete the work;3. A very simple time to change the space of the algorithm: the implementation of a, b two variable value exchange. The commonly used algorithm is to use the intermediate variables, and the introduction of additional variables means that more space is to be used, the following algorithm, you can eliminate the intermediate var
described in the previous article, and the same bufferedwrtier and bufferedreader efficiency is also very high. The buffer is used preferentially.
Using static methods: Static methods can be used directly without building an instance, and because the method area GC is rarely recycled, and the JVM caches commonly used classes, some common tool classes are more likely to encapsulate static performance. And it is more expressive than function overlo
Most developers believe that performance optimization is a more complex issue and requires a lot of experience and knowledge. Yes, it is not wrong. Admittedly, it's not easy to optimize your application for the best performance, but that doesn't mean you can't do anything without getting the experience and knowledge. Here are a few easy to follow suggestions and best practices that can help you create a goo
Want to keep your project running at high performance? Here are some tips you can take to eliminate cache bottlenecks, as well as some other performance tuning recommendations.Most developers think that performance optimization is a complex topic that requires a lot of work experience and relevant knowledge theory. Wel
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.