According to Wikipedia, is a form of dynamic program analysis that measures, for example, the space (memory) or time complexity of a program, the usage of particular instructions, or the frequency and duration of function calls. Software profiling Most commonly, profiling information serves to aid program optimization. Profiling is achieved by instrumenting either the program source code or its binary executable form using a tool called a profiler (or code profiler). One of the most popular profilers in the Java world is . It is a visual tool that integrates command line JDK tools and lightweight profiling capabilities. The project is Open Source and maintained by Oracle, you can find the codebase . The tool was designed for development and production time use. VisualVM here VisualVM was included in the JDK until version 8. Some of its main features: Display Local And Remote Java Processes Display Process Configuration And Environment Monitor Process Performance And Memory Visualize Process Threads Profile Performance And Memory Usage Take And Display Thread Dumps Take And Browse Heap Dumps Analyze Core Dumps Analyze Applications Offline You could find more information about the different features in the project’s webpage, but definitely I would suggest you to just download it and start playing around, it’s “easy” to use. And then there’s , I mean, everybody knows and loves it! Seriously, it’s by far the most used and loved Java Runtime and Framework platform, take a look at the . Spring Boot JRebel 2020 Report Recently I needed to profile a Spring Boot app and made some interesting findings that I wanted to share since these are not really obvious. Prepare your app for profiling Something really cool about Spring Boot is , by “default” you can benefit from one single executable JAR with all the app classes and dependencies in it. One JAR, one App, just execute it and that’s it! FAT JARs FAT JARs are definitely powerful, but there are some tradeoffs when you use them. For example . when creating Docker images And… Explode your FAT JAR. This is fundamental, I wasted a lot of time before on a Windows machine with JDK 8 trying to profile an unexploded JAR (it failed silently). When you need to profile an application using VisualVM! On my current computer, a Mac with JDK 12, the profiler fails to start! (ERROR: ). It’s clear, the classes cannot be found therefore cannot be instrumented. Profiler engine warning: class *FAKE_CLASS_1* that should be instrumented is not loaded by target VM I’ll demo my point using… The ! The best Spring demo project ever! Spring Petclinic Demo App Clone the repo, build the app and explode the JAR file in a new folder: git https://github.com/spring-projects/spring-petclinic.git spring-petclinic mvn package mkdir jar-content jar-content/ jar xvf ../target/spring-petclinic-2.4.0.BUILD-SNAPSHOT.jar clone cd cd At the end of the process, you should end up with the following folders: BOOT-INF: Contains all classes and dependencies META-INF: Contains all JAR metadataorg: Contains Spring Boot launcher classes It’s of special interest the file , there you’d find what are your main and start classes. With all that info you’re ready to execute/start your app: META-INF/MANIFEST.MF java -cp .:BOOT-INF/lib/*:BOOT-INF/classes org.springframework.boot.loader.JarLauncher org.springframework.samples.petclinic.PetClinicApplication NOTE: If you’re using Windows, remember to change by and slashes by backslashes. “:” “;” There you go, that’s all we need for now! Profile your app In order to profile your app, and execute it. You should see your app configured under the Local menu. In case you’re trying to profile a remote app keep in mind the download VisualVM following configurations Double click on your app, go to the profile tab and change the profile class to match your Spring Boot app root package! Important: add to the end (to include all classes in that package). For example: “.**” org.springframework.samples.petclinic.** One last final tip: from my experience the best view is the Hot Spots, it allows you to quickly see where are your potential bottlenecks. Final words Software profiling is definitively very useful when trying to understand bottlenecks and potential areas of improvement. A must to know tool for understanding your application and tuning it. Tools like VisualVM really empower you and are super useful to have in your toolbox. Especially useful, the Open Source nature of the tool, you’d find tons of related information out there! And finally, but not least, yes, you can profile a Spring Boot App! In later articles I might write about heap and stack dumps, and see how you can even use Spring Boot Actuators for getting that information. Also published at https://medium.com/kayvan-kaseb/tips-and-tricks-for-profiling-your-spring-boot-app-using-visualvm-de627cae02d1