In this section, you will run a tool called stress-ng on the Cluster Head node and monitor the different metrics in the Master Node Details Dashboard.
In the AWS Cloud9 terminal login to the head node of your cluster as below. Type yes when prompted.
pcluster ssh perflab-yourname -i ~/.ssh/lab-4-key
stress-ng is a stress test tool which is designed to exercise various physical subsystems of a computer system as well as various operating system kernel interfaces. It provides over 240 stress tests including CPU, virtual memory and I/O specific stress tests.
Install the stress-ng tool on the head node of your cluster as follows:
sudo yum -y install stress-ng
Now, we’ll run some stress tests and monitor the performance metrics in the Grafana Dashboard. Since you will be running these tests on the Master Node, you will look for the metrics in the Master Node Details Dashboard.
stress-ng --cpu 4 --timeout 120s --metrics-brief
stress-ng --vm 4 --vm-bytes 1G --timeout 120s --metrics-brief
--vm 4 will start 4 workers continuosly calling mmap/munmap and writing to the allocated memory.
The Memory Basic in the dashboard should show the utilization of 4 GB of physical memory for 2 minutes as below:
stress-ng --dir 4 --timeout 120 --metrics-brief
stress-ng --cpu 2 --dir 1 --vm 1 --vm-bytes 1G --timeout 120 --metrics-brief
In the next section, you will monitor the performance of the compute nodes in your cluster.