4 ms·
I've made java services respond with 500us on average for in-memory queries. Yeah, average, including GC stops. This is where things grow really fun, because ev
by tetha 9y ago
I've made java services respond with 500us on average for in-memory queries. Yeah, average, including GC stops. This is where things grow really fun, because every lock, every array access, every method call becomes a problem.
It's an interesting world. Closed and not entirely relevant to most developers.
- Bjartr 9y agoWhat are good, up to date resources for performance tuning to that degree in Java? I've looked into this a few times and keep hitting walls where the resources I have found say "let the JVM do it's thing".
- wpietri 9y agoThis mailing list is amazing: https://groups.google.com/forum/#!forum/mechanical-sympathy https://groups.google.com/forum/#!forum/mechanical-sympathy I understand maybe a third of it, but what I do get is high quality.
- tetha 9y agoMechanical sympathy is a good source, probably the source for java specific topics. In general, you'll want to really, really learn the internals of the JIT so you can structure your application to cooperate with the JIT and the GC. Beyond that, I've found the biggest throughput gains and/or latency decreases by implementing the right threading or lack of threading, locking or lock-free implementations, and then tuning, profiling and optimizing things just right for the target hardware. That's just a little sentence, but it's an amazingly hard topic. There are not many resources about this out there beyond just looking at high performance systems, regardless of language. The innodb storage engine is a fun project with some interesting locking, and I like reading about the things the kernel does.
- pjmlp 9y agoBesides what the others pointed out, check profilers like VisualVM, ControlCenter, Netbeans integrated one. There is also the option to get the generated machine code, here is a recent example with the Oracle JDK about SIMD programming in Java. http://prestodb.rocks/code/simd/ http://prestodb.rocks/code/simd/ Finally, note that just like many programming languages, Java enjoys multiple implementations, each with its own JIT.