I just wonder about additional overhead of remote debugging. I start application using HotSpot with these parameters:
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005
I heard about large impact on performance in much older versions of HotSpot but my application uses java 8 now and I can't find any up to date information about it.
Remote Java Debugging is the process of debugging a Java program or application running on another machine or a server environment.
Remove breakpoints off your method and use them inside the method as that can cause your debug to take a very long time. Try running IntelliJ as admin. I had this issue at work where debugging was extremely slow and running as admin actually made it a lot faster.
In simple terms, remote debugging is debugging an application that runs in a place other than your local environment. This is usually done by connecting the remotely running application with your development environment.
1.4.0 introduced "Full Speed Debugging" : In the previous version of HotSpot (prior to 1.4.0), when debugging was enabled, the program executed using only the interpreter. From 1.4.0 , the full performance advantage of HotSpot Technology was available to programs running with debugging enabled. The improved performance allows long running programs to be more easily debugged.
After 1.4.1 there are not performance related enhancement mentioned by oracle in JPDA area. Last one was done in JDK 1.4.0 for Java hotspot client VM and for Java Hotspot Server VM in JDK 1.4.1.
So it is safe to say that no performance improvement could be expected in debugging area from 1.4.1 to the latest version. Otherwise it would have been mentioned by oracle docs.
Sources: https://docs.oracle.com/javase/8/docs/technotes/guides/jpda/
Please go through the links under the enhancement section of the above link to confirm.
This article from AMD will help you find how much performance degredation will this cause, they've even made some tweaks to reduce the performance hit caused by remote debugging on a Hotspot JVM, and I quote:
"We will also show how we applied these changes to improve the performance of the Hotspot JVM in the OpenJDK when it is started with debugging enabled but the debugger has not yet attached."
http://developer.amd.com/resources/documentation-articles/articles-whitepapers/java-performance-when-debugging-is-enabled/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With