I create API that just return string("OK").
And I test it with following configuration.
I monitor it with visualVM, and notice that heap usage increase continuously. Eventually jvm perform gc.
Question.
- why heap usage increase continuously?
CodePudding user response:
Hello,I guess there is other classes in SpringMVC is created。such as threadlocal
CodePudding user response:
Better than guessing you can actually use jvisualvm to help you find what objects are there in heap by memory sampling. You can see the number of instances of objects and total size in the profiling section as shown in below screenshot. You can take snapshots while your load test runs and you can then later analyze them. You can even take a heap dump and analyze that with tools like