Java Performance Tuning
Java(TM) - see bottom of page
Our valued sponsors who help make this site possible
JProfiler: Get rid of your performance problems and memory leaks!
Training online: Concurrency, Threading, GC, Advanced Java and more ...
Tips July 2019
JProfiler
|
Get rid of your performance problems and memory leaks!
|
JProfiler
|
Get rid of your performance problems and memory leaks!
|
|
|
Back to newsletter 224 contents
https://medium.com/expedia-group-tech/devops-dev-errorbudget-ops-9441e94ff698
DevOps = Dev + ErrorBudget + Ops (Page last updated June 2019, Added 2019-07-29, Author Jack Shirazi, Publisher Expedia). Tips:
- Error Budgets reduce downtime while maintaining a high release rate
- You should have: 1. A set of metrics that show the business performance of your application (SLIs); 2. A set of targets based on those metrics which show when your application is performing adequately - or not (SLOs); 3. Alerts if the application is not performing adequately and manual intervention is required to get it back on target; 4. Notifications if the application was not performing adequately and automatic intervention got it back on target
- 100% reliability is very very expensive and almost always not a good target, instead a cost-benefit analysis should define the reliability target based on how much downtime you will accept for the system by considering how much it costs to make the system that reliable.
https://dzone.com/articles/concurrenthashmap-call-only-one-method-per-key
ConcurrentHashMap: Call Only One Method Per Key (Page last updated May 2019, Added 2019-07-29, Author Thomas Krieger, Publisher DZone). Tips:
- While each method of ConcurrentHashMap is thread-safe, calling multiple ConcurrentHashMap methods on the same key can lead to race conditions. ConcurrentHashMap has an extensive set of methods that combine the functionality of multiple methods atomically, specifically to let you avoid race conditions - use just the one method that best fits your needs for each key, avoid calling multiple different methods for each key.
https://www.lessjava.com/2019/04/waste-free-coding.html
Waste Free Coding (Page last updated April 2019, Added 2019-07-29, Author Greg Higgins, Publisher LessJava). Tips:
- The app processes 2.2 million csv records per second in a 3MB heap with zero gc on a single thread in Java
- Avoid allocating multiple strings on reading data by using a single reused read buffer to process the data
- Avoid creating multiple objects when converting raw data to structured data by using a reusable structure object that can process the structure and then be used again for the next chunk of data
- Use zero-allocation converters to convert raw data from buffers into (reusable) structure objects
- Use primitive data types and avoid autoboxing
- Partition the data to use single-threaded processing, this avoids locks, data sharing and also avoids queues
https://mydeveloperplanet.com/2018/11/14/how-to-solve-your-java-performance-problems-part-1/
How to Solve Your Java Performance Problems (Page last updated November 2018, Added 2019-07-29, Author Gunter Rotsaert, Publisher My Developer Planet). Tips:
- Have a measurement at each entry and exit point into your architectureto help you in pinpoint the location of a problem
- If system CPU utilization averages over 10%, likely causes include: Context switching, Disk or Network IO; Virtualisation.
- If user CPU utilization averages close to 100% check the garbage collections
- Memory leaks are best detected using a memory profiler with genereation count capability
- If CPU utilization is low, look for deadlocks and threads blocked on IO
Jack Shirazi
Back to newsletter 224 contents
Last Updated: 2024-08-26
Copyright © 2000-2024 Fasterj.com. All Rights Reserved.
All trademarks and registered trademarks appearing on JavaPerformanceTuning.com are the property of their respective owners.
Java is a trademark or registered trademark of Oracle Corporation in the United States and other countries. JavaPerformanceTuning.com is not connected to Oracle Corporation and is not sponsored by Oracle Corporation.
URL: http://www.JavaPerformanceTuning.com/news/newtips224.shtml
RSS Feed: http://www.JavaPerformanceTuning.com/newsletters.rss
Trouble with this page? Please contact us