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 December 2021
JProfiler
|
Get rid of your performance problems and memory leaks!
|
JProfiler
|
Get rid of your performance problems and memory leaks!
|
|
|
Back to newsletter 253 contents
https://www.youtube.com/watch?v=VPN-q2rjhxc
Effortless Profiling on Kubernetes (Page last updated October 2021, Added 2021-12-28, Author Eden Federman, Publisher Verizon). Tips:
- Profiling is usually avoided in production because of the overhead and the application/JVM flag modifications needed to allow profiling. Finding profilers that have low enough overhead and minimal changes required for the JVM is critical to allow profiling in production.
- The
kubectl-flame
kubernetes plugin uses a production compatible profiler, asyncprofiler, for Java apps (and similar production compatible profilers for other languages) and profiles pods with no requirement for the pod to already have a profiler installed - or even a shell!
- Including asyncprofiler into your docker image is simple, add (here using version 2.5 as an example)
RUN mkdir -p /opt/profiler && wget -q https://github.com/jvm-profiling-tools/async-profiler/releases/download/v2.5/async-profiler-2.5-linux-x64.tar.gz | tar xzv -C /opt/profiler && rm -rf async-profiler-2.5-linux-x64.tar.gz
.
https://medium.com/expedia-group-tech/devops-dev-errorbudget-ops-9441e94ff698?source=friends_link&sk=e53ea79aa85a8ad883232fba55592a89
DevOps = Dev + ErrorBudget + Ops (Page last updated June 2019, Added 2021-12-28, 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 is rarely 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 and how much you lose when it fails.
https://www.youtube.com/watch?v=xGQ-5UKeAaQ
Quarkus Insights #69: Performance and costs of reactive libraries in Java (Page last updated November 2021, Added 2021-12-28, Author Julien Ponge, Publisher Quarkusio). Tips:
- Imperative programming (simple for-loop styles) tend to be faster than futures, streams and reactive programming for simple CPU bound operations because of the overheads of the various styles.
- Reactive streams are not suited for CPU intensive operations, but operator fusion (combining operations) does make it less inefficient than it would otherwise be.
- When there is IO involved, being able to multiplex is critical, here any type of programming style (reactive, futures, streams) that can avoid blocking the OS threads on the IO while allowing other operations to proceed, is more efficient than any IO bound style (like simple imperative 1-OS-thread per IO style).
- Where IO dominates, tuning the CPU intensive parts of the system will provide only very limited improvements because that's not where the bottleneck is.
- Virtual threads (aka fibres from project Loom) is more readable and more efficient than reactive to multiplex IO, assuming you have sufficient memory for the number of virtual threads you want (if memory is very tight, reactive might be more efficient).
Jack Shirazi
Back to newsletter 253 contents
Last Updated: 2023-01-29
Copyright © 2000-2023 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/newtips253.shtml
RSS Feed: http://www.JavaPerformanceTuning.com/newsletters.rss
Trouble with this page? Please contact us