Server benchmarks measure the performance of application servers and database servers used to host the DNIF application. The benchmarking helps in Maintaining high server performance and appropriate scale to keep up with growing computing demands. This document provides insights on how to benchmark the performance of the DNIF servers using the benchmarking tools.
Sysbench is a free & open source benchmarking tool that is used to benchmark Linux. It evaluates OS parameters like CPU usage, memory usage, Disk IO & MySQL performance. Especially it becomes extremely important to benchmark these parameters when running a load intensive database.
To install sysbench on the server refer below link
To perform the CPU benchmark on Linux, use the following command,
$ sysbench --test=cpu --cpu-max-prime=20000 run
Though it generates reports with lots of statistics, the main thing to check on CPU benchmarking is ‘total time’ under ‘General Statistics’.
The above command will provide the output as below;
Running the test with following options Number of threads: 1 Initializing random number generator from current time Prime numbers limit: 20000 Initializing worker threads... Threads started! CPU speed: events per second: 381.72 General statistics: total time: 10.0010s total number of events: 3820
The expected value will be under 10 seconds for the running application.
To benchmark Linux system’s memory (RAM), execute the following command,
$ sysbench memory --threads=2000 run
Here two things that are to be considered are ‘Total Operations’ & amount transferred.
The above command will provide the output as below, the below stats are taken for RAM=92GB.
Running the test with following options: Number of threads: 2000 Initializing random number generator from current time Running memory speed test with the following options: block size: 1KiB total size: 102400MiB operation: write scope: global Initializing worker threads... Threads started! Total operations: 90668643 (9055539.63 per second) > Total operations 88543.60 MiB transferred (8843.30 MiB/sec) > amount transferred
The total operations and amount transferred will vary for different memory size,
- Value for 62GB memory
Total operations: 65190817 (6509130.79 per second) 63662.91 MiB transferred (6356.57 MiB/sec)
- Value for 32GB memory;
Total operations: 39451539 (3935010.75 per second) 38526.89 MiB transferred (3842.78 MiB/sec)
These are the accepted set of values, for the running instance. We have recorded these values while the application is in running state.
- I/O Benchmarking
While performing I/O benchmark on Linux systems, we will have to first create some test files. To create test files, use the following command,
- Create a directory in /path/to/D-key/ with naming "testio" and run the below command inside that directory.
Please make sure that you should select the size of text file to be more than your amount of RAM, so that the IO process does not get affected duet RAM operation. Test file creation will take some time based on amount you have selected. Once test files have been created
- Execute the following command to start the benchmarking.
$ sysbench --test=fileio --file-total-size=150G prepare $ sysbench --test=fileio --file-total-size=150G --file-test-mode=rndrw --max-requests=0 run
- To cleanup the test data after benchmarking, execute the following command;
$ sysbench --test=fileio --file-total-size=150G cleanup
Take the readings of “read and write operations” and “Throughput” and validate them with healthy servers test reports.
iperf is a free open source, cross-platform command-line based program for performing real-time network throughput measurements. It is one of the powerful tools for testing the maximum achievable bandwidth in IP networks (supports IPv4 and IPv6).
- Step 1: Install iPerf
The iperf package is included in most Linux distribution’s repositories.
For Debian and Ubuntu $ apt-get install iperf For CentOS $ yum install epel-release $ yum update $ yum install iperf
How to Use iPerf
- iPerf must be installed on the computers at both ends of the connection you’re testing.
- iPerf requires two systems because one system must act as a server, while the other acts as a client. The client connects to the server you’re testing the speed of.
- On the server 1 you plan to test, launch iPerf in server mode, You should see output similar to:
$ iperf -s Server listening on TCP port 5001 TCP window size: 85.3 KByte (default)
On your second server, connect to the first. Replace 198.51.100.5 with the first servers IP address.
$ iperf -c 198.51.100.5 ------------------------------------------------------------ Client connecting to 198.51.100.5, TCP port 5001 TCP window size: 45.0 KByte (default) ------------------------------------------------------------ [ 3] local 198.51.100.6 port 50616 connected with 198.51.100.5 port 5001 [ ID] Interval Transfer Bandwidth [ 3] 0.0-10.1 sec 1.27 GBytes 1.08 Gbits/sec
- You will also see the connection and results on your iPerf server:
Server listening on TCP port 5001 TCP window size: 85.3 KByte (default) ------------------------------------------------------------  local 198.51.100.5 port 5001 connected with 198.51.100.6 port 50616 [ID] Interval Transfer Bandwidth  0.0-10.1 sec 1.27 GBytes 1.08 Gbits/sec
- To stop the iPerf server process, press CTRL + c.
To see the full functionalities of the iPerf tool use below link.
Netcat or nc is a networking utility for debugging and investigating the network. This utility can be used for creating TCP/UDP connections and investigating them.
Add “-u” after nc command in case of the UDP port hosting and “-k” for the multi session TCP.
- The netcat utility can be run in the server mode on a specified port listening for incoming connections.
$ nc -l 2389
- Also, it can be used in client mode trying to connect on the port(2389) just opened
$ nc localhost 2389
- Now, if we write some text on the client-side, it reaches the server-side.
$ nc localhost 2389 HI, server
- On the terminal where server is running :
$ nc -l 2389 HI, server
So we see that netcat utility can be used in the client-server socket communication.
DNIF components will require a specific range of ports to communicate with each other. Please find the below URL, to check the required ports for the DNIF.