Jmeter is used to check performance of a website or a web application.
We can also monitor server resources when jmeter makes some requests to a server
When a new application is developed in a development environment before hosting it on a server ,It is being run on our local server.
So we need to check 2 things when we put load on a website.
Firstly how the host server is behaving when we put load on a website that is the host where the site is hosted and our local server as well.
For testing purpose we don’t have access to host server of any website so we go with checking our local machine only .
For this we need a tool called yourkitjava profiler.
We can download it from below link and install it in our system https://www.yourkit.com/java/profiler/download/
Then we go to programs file foler or program files 86 folder wherever it is installed and go to bin folder and open the .exe file.
When we open it we will be able to monitor how much memory all the tools that work on jvm and are open at that time will consume.
Tools working on jvm are jmeter ,eclipse etc.
So this tool will show all the applications that run on jvm but to actally check the performance of an application we first need to click ready to attach and attach that application to our tool.
We then run the application like jmeter etc and in the performance metrics of our tool we see various thing like how much memory it is consuming. Like we can check Cpu memory,heao memory etc
Heap memory is memory which java uses to store something in heap memory and once the job is done garbage collectors will be remove everything from heap memory.
Non heap memory is memory that is not cleared or deleted once java application has completed running.
So once we run our script in jmeter we will see how much CPU memory jmeter is using etc. Like in our case jmeter is using 45 percent of CPU usage which is fine. Anything below 80 percent is fine. If more than 80 percent CPU is used by our jmeter we need to talk to our team.
Similarly we can uncheck all the items on the left and just click heap memory. We see total memory allocated in 500 mb and out of that only 65 memory is used. If 1 gb is allocated system will go for a toss.
If only a few mbs are allocated in heap memory then we might not be able to see all the performance of our application.
So in this way we can check server performance of our local machine as well as the host machine.