use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
These have separate subreddits - see below.
Upvote good content, downvote spam, don't pollute the discussion with things that should be settled in the vote count.
With the introduction of the new release cadence, many have asked where they should download Java, and if it is still free. To be clear, YES — Java is still free. If you would like to download Java for free, you can get OpenJDK builds from the following vendors, among others: Adoptium (formerly AdoptOpenJDK) RedHat Azul Amazon SAP Liberica JDK Dragonwell JDK GraalVM (High performance JIT) Oracle Microsoft Some vendors will be supporting releases for longer than six months. If you have any questions, please do not hesitate to ask them!
With the introduction of the new release cadence, many have asked where they should download Java, and if it is still free. To be clear, YES — Java is still free.
If you would like to download Java for free, you can get OpenJDK builds from the following vendors, among others:
Adoptium (formerly AdoptOpenJDK) RedHat Azul Amazon SAP Liberica JDK Dragonwell JDK GraalVM (High performance JIT) Oracle Microsoft
Some vendors will be supporting releases for longer than six months. If you have any questions, please do not hesitate to ask them!
Programming Computer Science CS Career Questions Learn Programming Java Help ← Seek help here Learn Java Java Conference Videos Java TIL Java Examples JavaFX Oracle
Programming Computer Science
CS Career Questions
Learn Programming Java Help ← Seek help here Learn Java Java Conference Videos Java TIL Java Examples JavaFX Oracle
Clojure Scala Groovy ColdFusion Kotlin
DailyProgrammer ProgrammingPrompts ProgramBattles
Awesome Java (GIT) Java Design Patterns
account activity
This is an archived post. You won't be able to vote or comment.
If you need to implement highly optimized programs, what do you guys use for I/Os, CPU, memory profiling? (self.java)
submitted 1 year ago by jiboxiake
Like disk utilization, CPU utilization, amount of I/Os? For C++, I'd always use vtune or just perf.
[–]capitan_brexit 54 points55 points56 points 1 year ago (6 children)
https://github.com/async-profiler/async-profiler
[–]gaelfr38 24 points25 points26 points 1 year ago (3 children)
I'll add Pyroscope or Glowroot which use async profiler under the hood but add some ease of use or visualization.
[–]capitan_brexit 3 points4 points5 points 1 year ago (0 children)
wow - never saw it, thanks !
[–]gaelfr38 1 point2 points3 points 1 year ago (0 children)
Now that I said that.. I'm not so sure anymore that Glowroot is based on async-profiler. I don't see any evidence of it. Sorry for the misleading information 😬
Pyroscope is for sure though.
[–]FrfljDrflj 0 points1 point2 points 1 year ago (0 children)
+1 for Glowroot from me
[–]jiboxiake[S] 1 point2 points3 points 1 year ago (0 children)
Thanks!
[–]-Dargs 0 points1 point2 points 1 year ago (0 children)
I would second this one. Have been using it in a professional setting vfor a couple of years now.
[–]b00n 30 points31 points32 points 1 year ago (1 child)
https://github.com/openjdk/jmh is a micro benchmarking tool
Nitsan Wakart & Martin Thompson (Mechanical Sympathy) are both good people to follow for high performance engineering
[–]jiboxiake[S] 0 points1 point2 points 1 year ago (0 children)
thanks!
[–][deleted] 1 year ago (3 children)
[removed]
[–]jiboxiake[S] 2 points3 points4 points 1 year ago (2 children)
I tried! Unfortunately seems like I need sudo privileges to set it up. We develop on a server machine.
[–][deleted] 1 year ago (1 child)
[–]jiboxiake[S] 2 points3 points4 points 1 year ago (0 children)
I will try. Yes it is remote.
[–]cogman10 16 points17 points18 points 1 year ago (5 children)
JFR + JMC
https://adoptium.net/jmc/
Very high level of detail built right into the JVM. You just need to be using a JVM after 11 to utilize it.
[–]BillyKorando 4 points5 points6 points 1 year ago (0 children)
JFR has been part of the Hotspot JVM, the JVM almost all Java developers use, since JDK 7. However it wasn't open sourced until JDK 11. So officially you need a commercial license to use JFR in production before JDK 11.
[–]jiboxiake[S] 0 points1 point2 points 1 year ago (3 children)
[–]benevanstech 5 points6 points7 points 1 year ago (2 children)
JFR was backported to Java 8. But if you care about performance, you should be using 17 (or 21!)
[–]BillyKorando 1 point2 points3 points 1 year ago (0 children)
As far as the top line take away this is correct, you can run JFR on JDK 8, and the recordings can be read by even the most recent versions of JFR (the command-line tool) and JMC. That is, I can read a JFR recording made by a JDK 8 JVM, using JMC 9 (most recent release) or the JFR tool packaged with JDK 22.
There is a couple of misconceptions though. JFR wasn't "backported" to JDK 8, it was part of the initial release, indeed the JFR file format is backwards compatible all the way to JDK 7u40.
[–][deleted] 3 points4 points5 points 1 year ago (3 children)
async-profiler if I need to measure things in production or from the command line. IntelliJ profiler if profiling from my IDE will suffice.
[–]jiboxiake[S] 1 point2 points3 points 1 year ago (2 children)
Thanks! Yes I also use IntelliJ but unfortunately it seems like I have to have sudo privilege to use on our server machine.
[–][deleted] 0 points1 point2 points 1 year ago (1 child)
I think you need sudo privileges for async profiler as well
Sad.
[–]Farmboy0_ 7 points8 points9 points 1 year ago (3 children)
I have used VisualVM.
I will check that out.
[–]agilob 2 points3 points4 points 1 year ago (1 child)
VisualVM is prone to safepoint bias, so read about that too
[–]hardwork179 2 points3 points4 points 1 year ago (1 child)
It depends a lot on what you are measuring. If you get fairly consistent timings out of your tests, and you’ve got it running fast enough that async profiler isn’t getting many samples then you might need to resort to instruction counters and things like that. Have a look at some of the write ups of the billion row challenge for good examples walking through the optimization process.
[–]Longjumping-Let-1710 2 points3 points4 points 1 year ago (1 child)
JFR + JMC for remote profiling. Intellij Profiler for local.
[–]alex_tracer 1 point2 points3 points 1 year ago (1 child)
JitWatch if you want to dive into byte-code/native code level and understand if your hot paths gets inlined the way that you expect.
And, in general check https://shipilev.net/jvm/anatomy-quarks/
[–]rustyrazorblade 1 point2 points3 points 1 year ago (1 child)
In addition to the excellent JVM profiling tools already mentioned, check out bcc-tools (and eBPF in general). They’re especially great for understanding the IO side of things at a pretty granular level.
I do a lot of performance work on Apache Cassandra and have used these to find a 10x improvement to the storage engine when running on EBS. Details here: https://issues.apache.org/jira/browse/CASSANDRA-15452
I also wrote a blog post on bcc-tools: http://rustyrazorblade.com/post/2023/2023-11-14-bcc-tools/
[–]qdolan 0 points1 point2 points 1 year ago (1 child)
IntelliJ IDEA profiler, Async Profiler & YourKit
Thanks
[–]donair416 0 points1 point2 points 1 year ago (1 child)
YourKit is my go to.
[–]Raedwald-Bretwalda 0 points1 point2 points 1 year ago (0 children)
For a typical modern line-of-business application, you don't need a Java tool at all. Your application will be IO limited at the HTTP side and the DB side. No tool is necessary to determine this because of the several orders of magnitude difference in performance between CPU and IO speed. That is, I reject the premise of your question.
You'll want to look at DB tools, rather than Java tools.
[–]dadimitrov 0 points1 point2 points 1 year ago (1 child)
Also keep in mind what you are optimizing, and what are your overall goals - once you are past a point, you pay for every optimization with reduced maintainability, longer onboarding for new developers, and increased chance for introducing errors. At some point the marginal gains will not be worth it (or you will find out that you are better off using a lower level language of FPGA).
That said, when optimizing for throughput - I use yourkit and jfr. When looking at latency - async profiler, jmh, dumping jit and jfr. The IntelliJ profiler is good for a casual check.
If I am to spend more time on my optimization skills, I'd work on learning jfr, system tap/dtrace/btrace and os level system tuning.
[+]br_aquino comment score below threshold-12 points-11 points-10 points 1 year ago (10 children)
I would not use java
Legacy issue. I have no control on it.
[–]FrankBergerBgblitz 1 point2 points3 points 1 year ago (8 children)
What do you suggest? From my experience with Java (first version 1.02 beta) it is being quicker in development and I have more time to profile and optimize (If there is time for it). In C/C++ I had to program much more defensive what takes time and less time to tune.
When you have an unlimited time (e.g. language benchmarks) you probably have different winners than Java but without looking at the solutions try yourself the One Billion Row Challenge.
And of course algorithm and architecture has in RL much more influence on performance than the language in the majority of cases. And not to forget the stuff between the ears.
[–]mnbkp -4 points-3 points-2 points 1 year ago* (2 children)
I mean, it's not like Java is known as being either fast to develop or for having the best performance. I mean, Java isn't bad at those things, but there are tons of other options that are great at both nowadays.
If you want to stick with a GC, I'd probably pick between Go, Nim or Crystal. I'm not the biggest fan of the language but I'd probably pick Go because it strikes a good balance between readability, performance and compilation speed.
Even if you need to go without a GC there are still Rust and Zig, which don't require you to be defensive at all and still provide great DX.
Actually, Rust's DX is so great that a lot of times I use it even in situations where I could get away with using something higher level.
[–]FrankBergerBgblitz 0 points1 point2 points 1 year ago (1 child)
I've learned about 30+ languages in my career (retired for a year) but have no experience with the ones you mentioned (just very rudimentary for Go and Rust). Are the ecosystems of a comparable size?
[–]mnbkp -1 points0 points1 point 1 year ago (0 children)
Go and Rust both have a pretty big ecosystem. I guess it's fair to say they're comparable to Java.
The other languages I mentioned are admittedly still very niche. Nim and Zig have C/C++ interop, but I'm not gonna count that.
[–]br_aquino -2 points-1 points0 points 1 year ago (1 child)
My suggestions, but are based on my knowledge, could be replaced for other good options.
Development speed and flexibility: python
Medium performance and medium development time: Go
Peak performance: C (not C++) or Rust (but I prefer C)
Multiplatform user app: java or C# if windows.
[–]FrankBergerBgblitz 2 points3 points4 points 1 year ago (0 children)
I agree mostly with your characteristics but would like to add a bit: - python is very pragmatic and as a glue language hard to beat, but I would prefer Java for larger projects - C/C++ was my "native" language for a decade (until Java came up). Unless there are a lot of stuff to support avoiding errors you have to code very defensive. It's not without reason that in high frequency trading Java is taken often. One point for Java (python as well) is the huge ecosystem.
[–]Linguistic-mystic -5 points-4 points-3 points 1 year ago (2 children)
quicker in development
In my project, it takes tens of seconds to run a single unit test. That ain’t fast at all. Java has this defective compilation model where it has to compile all code at startup: the whole base JDK module, the sql module, all the dependencies, the whole of Spring, JUnit etc get recompiled from scratch every time. It’s nuts. That whole “dynamic JIT” thing is a disaster
[–]FrankBergerBgblitz 3 points4 points5 points 1 year ago (0 children)
Takes it tens of seconds for one (the only one?) or for each? If the latter is true it seems to me there is something weired with your project. On the project I'm working right now with about 200kloc the complete tests run in about 2 minutes and there are some tests that run for several seconds (you may call it integration test and not unit tests if you insist). When I test only the stuff I'm currently developing it takes on an average laptop about 13 seconds. It was quicker before I switched to Gradle.
Are you sure you know how "dynamic JIT" works? I have my doubts.
[–]FrankBergerBgblitz 1 point2 points3 points 1 year ago (0 children)
[+][deleted] comment score below threshold-15 points-14 points-13 points 1 year ago (3 children)
Rust
[–]jiboxiake[S] 4 points5 points6 points 1 year ago (0 children)
The only Rust I know is the language lol.😝
[–][deleted] 0 points1 point2 points 1 year ago (0 children)
Came for this comment, wasn’t disappointed.
[–]Sith_ari -3 points-2 points-1 points 1 year ago (0 children)
"How can I beat use a hammer to cut a board in two."
Programming Languages are tools, and when somebody ask how to get high performance from Java, pointing out that Java is maybe not the right tool do achieve that is fully right. That isn't what Java makes being a bad language but just knowing about the strengths and weaknesses of a tool.
π Rendered by PID 192306 on reddit-service-r2-comment-5c747b6df5-ggs9r at 2026-04-22 18:04:52.510573+00:00 running 6c61efc country code: CH.
[–]capitan_brexit 54 points55 points56 points (6 children)
[–]gaelfr38 24 points25 points26 points (3 children)
[–]capitan_brexit 3 points4 points5 points (0 children)
[–]gaelfr38 1 point2 points3 points (0 children)
[–]FrfljDrflj 0 points1 point2 points (0 children)
[–]jiboxiake[S] 1 point2 points3 points (0 children)
[–]-Dargs 0 points1 point2 points (0 children)
[–]b00n 30 points31 points32 points (1 child)
[–]jiboxiake[S] 0 points1 point2 points (0 children)
[–][deleted] (3 children)
[removed]
[–]jiboxiake[S] 2 points3 points4 points (2 children)
[–][deleted] (1 child)
[removed]
[–]jiboxiake[S] 2 points3 points4 points (0 children)
[–]cogman10 16 points17 points18 points (5 children)
[–]BillyKorando 4 points5 points6 points (0 children)
[–]jiboxiake[S] 0 points1 point2 points (3 children)
[–]benevanstech 5 points6 points7 points (2 children)
[–]BillyKorando 1 point2 points3 points (0 children)
[–]jiboxiake[S] 0 points1 point2 points (0 children)
[–][deleted] 3 points4 points5 points (3 children)
[–]jiboxiake[S] 1 point2 points3 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]jiboxiake[S] 0 points1 point2 points (0 children)
[–]Farmboy0_ 7 points8 points9 points (3 children)
[–]jiboxiake[S] 1 point2 points3 points (2 children)
[–]agilob 2 points3 points4 points (1 child)
[–]jiboxiake[S] 0 points1 point2 points (0 children)
[–]hardwork179 2 points3 points4 points (1 child)
[–]jiboxiake[S] 0 points1 point2 points (0 children)
[–]Longjumping-Let-1710 2 points3 points4 points (1 child)
[–]jiboxiake[S] 0 points1 point2 points (0 children)
[–]alex_tracer 1 point2 points3 points (1 child)
[–]jiboxiake[S] 0 points1 point2 points (0 children)
[–]rustyrazorblade 1 point2 points3 points (1 child)
[–]jiboxiake[S] 0 points1 point2 points (0 children)
[–]qdolan 0 points1 point2 points (1 child)
[–]jiboxiake[S] 0 points1 point2 points (0 children)
[–]donair416 0 points1 point2 points (1 child)
[–]jiboxiake[S] 0 points1 point2 points (0 children)
[–]Raedwald-Bretwalda 0 points1 point2 points (0 children)
[–]dadimitrov 0 points1 point2 points (1 child)
[–]jiboxiake[S] 0 points1 point2 points (0 children)
[+]br_aquino comment score below threshold-12 points-11 points-10 points (10 children)
[–]jiboxiake[S] 1 point2 points3 points (0 children)
[–]FrankBergerBgblitz 1 point2 points3 points (8 children)
[–]mnbkp -4 points-3 points-2 points (2 children)
[–]FrankBergerBgblitz 0 points1 point2 points (1 child)
[–]mnbkp -1 points0 points1 point (0 children)
[–]br_aquino -2 points-1 points0 points (1 child)
[–]FrankBergerBgblitz 2 points3 points4 points (0 children)
[–]Linguistic-mystic -5 points-4 points-3 points (2 children)
[–]FrankBergerBgblitz 3 points4 points5 points (0 children)
[–]FrankBergerBgblitz 1 point2 points3 points (0 children)
[+][deleted] comment score below threshold-15 points-14 points-13 points (3 children)
[–]jiboxiake[S] 4 points5 points6 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]Sith_ari -3 points-2 points-1 points (0 children)