Amazon Web Service provides on-demand cloud infrastructure on pay model. The AWS has many services that have made this IT world a flexible and complexity solving place . One of this is AWS.
A very well known service is EC2 .
To all those reading this blog probably know about EC2. It stands for Elastic compute cloud.These are basically virtual compute platforms with all the configurations with various processor .It provides scalable computing capacity in the AWS cloud.
Instance type
Instance types are group of family according to their use. For example :- t1.micro, t2.micro, t3.micro etc.
Now to evaluate performance there is an open source tool Sysbench which helps to compare these instance types.
What is Sysbench ?
Sysbench is an open-source and multi-motive benchmark software that evaluates the parameter functions assessments for CPU, memory, I/O, and database (MySQL) performance.
How to install Sysbench ?
To install sysbench follow the below steps.
1 – Run the below command to install in your system.
curl -s https://packagecloud.io/install/repositories/akopytov/sysbench/script.deb.sh | sudo bash
2- Then install using the below command.
sudo apt -y install sysbench
So the above image shows installation part and version of the sysbench.
To perform CPU benchmark using sysbench.
Using sysbench tool we can find the CPU performance . The complete report statistics is displayed on the terminal of the cpu usage.
sysbench --test=cpu run

The above image shows the evaluation of cpu usage.
The above statistic shows total time , total number of events and events per second. Now this can help in comparing the processing of different instances once installed in all.
For instance the comparison table is as shown below.
t1 | t2 | t3 | t3a | t4g | |
Total time | 10.0013s | 10.0012s | 10.0002s | 10.0003s | 10.0003s |
Events per second | 796.05 | 768.84 | 987.92 | 1205.66 | 2930.10 |
Total no. of events | 7963 | 7691 | 9881 | 12059 | 29306 |
In the above table we can find the comparison between different instance types. Few points to be noted are :
- The important value is number of events processed.
- Secondly important value is events per second.
- The t2 type is showing a decrease from its predecessor.
- The best performance can be seen by t4g as it shows the best performance among all.
To Perform Memory Benchmark using sysbench
In this the operation per second shows the performance of memory . Now looking at the statistic t3 type is much more good than others. Lets look at the memory benchmark of our system. The t3 is superior in terms of memory performance.
In the above figure it runs the memory test in comparison with the folllowing :
block size: 1KiB
total size: 102400MiB
operation: write
scope: global
So it shows how excellent is sysbench at performing the execution.
EC2 instance comparison on basis of Memory benchmark.
t1 | t2 | t3 | t3a | t4g | |
Total time | 10.0013s | 10.0013s | 10.0013s | 10.0013s | 10.0013s |
Operation per second | 365555 | 5247157.84 | 44161414.92 | 44389217.66 | 45452545.10 |
Total no. of events | 365555 | 5247157 | 44161414 | 44389217 | 45452545 |
Mib/sec | 290 | 510.25 | 4305.04 | 4330.056 | 3990.01 |
In the above comparison the following points is to be noted:
- The Mib/sec is the good observant of the memory.
- In this t3 is superior in performance.
File I/O Benchmarking using sysbench.
This test writes 128 files of 16MB each, to total up to 1.5GB.When supplying the file-total-size switch to the command, sysbench now writes 128 files of 800MB each, making a total of 19780GB. As can be seen, the average performance of the machine is 352863 /0.00.
The below is the output of the benchmark on file input and output.



So to get the benchmark use the below command.
sysbench --test=fileio --file-test-mode=seqwr run
Now the above command gives the above output.To get more values just set the values of parameter based on the requirements and can test the I/O of machine.
Deleting the test file.
Once the above test is complete you can delete the test file by below command.
sysbench --test=fileio --file-total-size=100G cleanup
The above command will delete all the test file.
Conclusion
Well to conclude the best way to select instances and machine is using sysbench. It helps to compare the performance. Also the different machines show up the different capacity of performance.So sysbench helps to show up the performance of different machines.
Reference
For more information you can visit the following link:-