On Fri, May 26, 2017 at 4:42 PM, Zoran Regvart <[email protected]> wrote: > Hi, > awesome work Claus :) > > Just to add that you can do a lot with just VisualVM (bundled with > JDK), or if you run Oracle JDK Mission Control/Java Flight Recorder > which does not require a license when used in development[1]. > > And let me throw a few things into the mix: there is a great tool for > finding leaked file handles[2]; and one potential performance gain we > can work on is using > java.nio.file.Files.newInputStream/newOutputStream instead of > FileInputStream/FileOutputStream as demonstrated by Hadoop[3]. > > zoran > > [1] http://www.oracle.com/technetwork/java/javase/terms/license/index.html > [2] http://file-leak-detector.kohsuke.org/ > [3] https://issues.apache.org/jira/browse/HDFS-8562 >
Thanks for the extra details. About the file thingy, we have a ticket about it https://issues.apache.org/jira/browse/CAMEL-11188 And btw for mission control there is a plugin in hawtio web console in latest release so you can view it from there. > On Fri, May 26, 2017 at 3:59 PM, Claus Ibsen <[email protected]> wrote: >> Hi >> >> We have found a few spots to optimize the camel-core source code for >> thread contention and something else. >> >> You can use a profile tool such as YourKit which is excellent at >> identifying spots and visualizing what goes on in the JVM. >> >> We have used it in the past to optimise stuff. However recently Luca >> asked about making Camel startup faster: >> https://issues.apache.org/jira/browse/CAMEL-11321 >> >> And although fast startup is not excatly the same as runtime >> performance then they are still related. A profile can help identify >> places for improvements. >> >> I have pushed a sample project at >> https://github.com/davsclaus/camel-profile-sample >> >> You can then run this via >> >> mvn spring-boot:run >> >> And then attach YourKit profiler. >> >> However if you use IDEA then you can start YourKit, then from YourKit >> you can choose Integrate with IDE ... and then chose IDEA and then say >> ok even if IDEA is also running. >> >> In IDEA you should see a YourKit icon if you right-click on the >> SampleCamelApplication to run this application, then you can chose >> that to profile, and it run the app with profiler. >> >> You then switch to YourKit and you should start see data. >> To check for thread contention, then select the "Monitor Usage" tab, >> and then click the gear button with the play icon "Start Monitor >> Profile" which then starts capture data. >> >> For YourKit you can request a trial license that works for 2 weeks. >> >> >> -- >> Claus Ibsen >> ----------------- >> http://davsclaus.com @davsclaus >> Camel in Action 2: https://www.manning.com/ibsen2 > > > > -- > Zoran Regvart -- Claus Ibsen ----------------- http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2
