Linux – Lightweight Tools for On-Demand Performance Monitoring During Load Testing

linuxload-testingmonitoring

I'm tasked with testing out ProxySQL on a couple of Tomcat test servers, comparing its performance and resource utilization with the current Apache DBCP connection pooling. I've got a rough load testing plan in place, but I have near zero experience with monitoring and gathering/comparing system-level performance metrics (CPU, memory, disk, network, etc.)

My load testing will involve an Ansible playbook that does various preparatory tasks, triggers the load testing scripts, and finally cleans up after itself. I'd like to add "starts and stops the gathering of performance metrics before and after the load test, respectively", but I'm at a loss as to what tools I should look into.

The optimal solution, in my view, would look something like this:

  • Runs locally in the background on the Tomcat boxes
  • Simple configuration
  • Monitoring sessions can be started and stopped on demand
  • High resolution (metrics gathered once per second or even more frequently, if need be)
  • Results of monitoring runs easily readable into some kind of graphical tool for comparing different load test runs.

Given these specs, what kind of options am I looking at, both for the monitoring task itself and the graphical tool with which to examine them?

Best Answer

  1. Some essential information can be obtained from OperatingSystemMXBean using JConsole or equivalent, you won't have to install anything
  2. The most lightweight tool of will be sar
  3. You can take a look at Sigar which has Java API so you can create a web app which will collect and display the metrics of your choice. It's also used under the hood of PerfMon Plugin for Apache JMeter load testing tool
  4. If you prefer more or less ready solution take a look at Monitorix
Related Topic