Measure EC2 performance
When you have EC2 (VM) instances, you may want to test the performance of servers. This is not only for knowing how much stress it can endure but also checking the vendor, the zero-trust on service providers.
The metrics for the measurement can be various but they commonly are CPU, memory, and FileIO for the computing performance and TCP testing for the network performance.
Tools for computing performance
Tools for network performance
- iPerf / iPerf3
- Ping
Let’s try to test servers provided by AWS.
Sysbench
Installation of sysbench
- sudo apt-get update
- sudo apt-get install sysbench
Run the CPU test
- sysbench — test=cpu — num-threads=4 — cpu-max-prime=10000 run
Result

Memory Testing
- sysbench — test=memory — num-threads=4 — memory-total-size=10G — memory-oper=write — memory-scope=global run
Result

Run the network performance test
I will use iperf to test the network performance.
Installation
- sudo apt-get install iperf
There will be two types of measurement which are TCP and UDP and some tunable parameters (TCP window size, UDP buffer size and sending rate)
The testing will be done by setting up ‘client-server’ structure so in server side you can set up the window with ‘iperf -s -w 256K’ and client side will have IP address of server like ‘iperf -c <server IP address> -w 256K’

The result will be like above so it could be useful to measure your inter-communicated structure between two nodes. (Like between applications, services, microservices, etc.)
Those measurement (performance testing) has been usually used for on-premises server to check your hardware capability, but now it is more commonly used in any computing environment.