How to measure CPU and memory during load test
Asked Answered
A

5

21

We are using JMeter in a heterogeneous environment and we would like to measure CPU and memory while we are producing heavy load on a server where our service or web application is running. What would you recommend to use? Is there any software solution (open source or commercial) available which records CPU and memory usage in a file or to a database?

Thank you!

Abyssinia answered 16/11, 2010 at 9:34 Comment(0)
P
8

From the java perspective, you can use jconsole or write your own code to monitor the memory usage.

  1. Measure CPU and memory consumption of a Java application
  2. javasysmon on github
  3. dstat for linux and perfmon for windows. Read more
Perse answered 16/11, 2010 at 9:38 Comment(3)
Thank you!! Great answer! I'm looking currently at jconsole and javasysmon. It would be great if there is a tool which runs as a service and records CPU and memory usage of an application doesn't matter if its a java or native application.Abyssinia
I meant, is the OP looking for a "a tool which runs as a service and records CPU and memory usage" for any particular OS?Perse
if possible. and we are also looking for a tool which capture the usage of the whole computer system while running a load test.Abyssinia
V
15

You can use our JMeter perfmon plugin to measure CPU, memory and a lot of other metrics:

Vulpecula answered 3/12, 2010 at 18:59 Comment(1)
Thank you. I'll have a look at PerfMon.Abyssinia
P
8

From the java perspective, you can use jconsole or write your own code to monitor the memory usage.

  1. Measure CPU and memory consumption of a Java application
  2. javasysmon on github
  3. dstat for linux and perfmon for windows. Read more
Perse answered 16/11, 2010 at 9:38 Comment(3)
Thank you!! Great answer! I'm looking currently at jconsole and javasysmon. It would be great if there is a tool which runs as a service and records CPU and memory usage of an application doesn't matter if its a java or native application.Abyssinia
I meant, is the OP looking for a "a tool which runs as a service and records CPU and memory usage" for any particular OS?Perse
if possible. and we are also looking for a tool which capture the usage of the whole computer system while running a load test.Abyssinia
L
2

You could take a look at Cacti.

It could collect resource usages like CPU, MEM easily with built-in templates and display them in nice graphics. Both Windows and Uni* are supported.

Lemay answered 14/1, 2012 at 10:15 Comment(0)
D
0

One you install the Perfmon plugin, I also had to install the server agent, and open the firewall port 4444.

Here's a link which I found super useful.

http://grosan.co.uk/web-application-performance-testing-using-apache-jmeter-part-2-monitor-server-resources/

Demon answered 19/2, 2014 at 20:4 Comment(0)
M
0

Perhaps you can take a look to collectd if you run in some unix/linux flavour. It will bring you not only CPU but also memory, Disk IO, network and a good number of plugins available.

Meagher answered 8/1, 2015 at 11:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.