Linux Server Performance Stress test

Source: Internet
Author: User
Tags benchmark file copy

For newly purchased servers, you need to perform the necessary performance tests. Here you select the Unixbench tool for performance testing. The records are as follows:

1) Installation and use
The following script uses the latest version of the UnixBench5.1.3 to test, commented on the graphic test items (most VPS are no video card or set display, so the image performance without testing), after 10-30 minutes of operation (depending on the number of CPU cores, the computation time is unequal) to score, the higher the better. (The unixbench5.1.3.tgz was downloaded to the server's/root directory in advance)

[[email protected] ~]# cat bench.sh#! /bin/bashpath=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/binexport PATH#=================== ============================================================================# Description:unixbench for Test#==== ===========================================================================================# Create New Soft Download dirmkdir-p/opt/unixbench;mv/root/unixbench5.1.3.tgz/opt/unixbench;cd/opt/unixbench;# Download unixbench5.1.3#if [-S unixbench5.1.3.tgz]; then# echo "unixbench5.1.3.tgz [found]" #else # echo "Unixbench5.1.3.tgz not found!!! Download Now ... "# if! Wget-c http://byte-unixbench.googlecode.com/files/UnixBench5.1.3.tgz;then#echo "Failed to download Unixbench5.1.3.tgz,please download it to "/opt/unixbench" directory manually and rerun the install script. " #exit # fi#fitar-xzf unixbench5.1.3.tgz;cd unixbench;yum-y install gcc gcc-c autoconf gcc-c++ time Perl-time-hires#run Unixbenchsed-i "s/graphic_tESTS = defined/#GRAPHIC_TESTS = defined/g "./makefilemake;. /run;echo '; echo '; echo '; Echo ' ======= Script description and score comparison completed! ======= "; echo"; echo "; echo";

Ii. test results
The test results returned after execution are similar to the following (the performance test script will probably run for 10-30 minutes and be patient with the results):

[[email protected] ~]# sh-x bench.sh+ path=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/root /bin+ export path+ mkdir-p/opt/unixbench+ mv/root/unixbench5.1.3.tgz/opt/unixbench+ cd/opt/unixbench+ tar-xzf UnixBe nch5.1.3.tgz+ CD unixbench+ yum-y install gcc gcc-c autoconf gcc-c++ time perl-time-hires..................make[1]: Leavi  ng directory '/opt/unixbench/unixbench ' Sh:3dinfo:command not Found # # # # # # # # ##### ######    #    #   ####   #    #   #    #  ##   #  #   #  #           #    #  #       ##   #  #    #  #    #   #    #  # #  #  #       ##            #####   #####   # #  #  #       ######   #    #  #  # #  #    ##            #    #  #       #  # #  # #    #   #    #  #   ##  #   #  #           #    #  #       #   ##  #    #  #    #    ####   #    #  #  #    #          ## # # # # # # # # # # # # # # # # ###### # # # 5.1.3 Based on the Byte Magazine Unix Benchmark Mult                  I-CPU versionVersion 5 Revisions by Ian Smith, Sunnyvale, CA, USA January 13, 2011 Johantheghost at Yahoo period com1 x dhrystone 2 using Register variables 1 2 3 4 5 6 7 8 9 101 x double-precision W  Hetstone 1 2 3 4 5 6 7 8 9 101 x EXECL throughput 1 2 x file copy 1024x768 bufsize maxblocks 1 2 x File copy 256 BufSize maxblocks 1 2 x File Copy 4096 bufsize 8000 maxblocks 1 2 x Pipe throughput 1 2 3 4 5 6 7 8 9 101 X pipe-based Context Switching 1 2 3 4 5 6 7 8 9 101 x Process Creation 1 2 x System call Overhead 1 2 3 4 5 6 7 8 9 1 X Shell Scripts (1 concurrent) 1 2 x Shell Scripts (8 concurrent) 1 2 3=========================================== ============================= BYTE UNIX Benchmarks (Version 5.1.3) system:test-vm001:gnu/linux Os:gnu/linux--3. 10.0-514.el7.x86_64--#1 SMP Tue Nov 16:42:41 UTC machine:x86_64 (x86_64) Language:en_US.utf8 (charmap= "UTF   -8 ", collate=" UTF-8 ")CPU 0:intel (R) Core (TM) I7-4770HQ CPU @ 2.20GHz (4390.8 bogomips) x86-64, MMX, physical Address Ext, Sysenter/sy Sexit, Syscall/sysret 17:31:42 up 8:11, 6 users, load average:0.14, 0.09, 0.06; RunLevel 3------------------------------------------------------------------------Benchmark Run: 69 months 16 2017 17:31:42-17:59:591 CPU in System; Running 1 parallel copy of Testsdhrystone 2 using register variables 31665236.6 LPs (10.0 s, 7 samples) Double-prec Ision Whetstone 4345.5 Mwips (9.9 s, 7 samples) Execl Throughput 4163.9 L PS (30.0 s, 2 samples) file copy 1024x768 bufsize maxblocks 1091117.9 KBps (30.0 S, 2 samples) file copy BUFSI Ze maxblocks 299689.6 kbps (30.0 s, 2 samples) File Copy 4096 bufsize 8000 maxblocks 2535441.2 KBps (3 0.0 s, 2 samples) Pipe Throughput 1556494.1 LPs (10.0 s, 7 samples) pipe-based Context Switchi ng 362875.3 LPs (10.0 s, 7 samples) Process Creation 10440.1 LPs (30.0 S, 2 samples) Shell Scripts (1 concurren T) 5115.9 LPM (60.0 S, 2 samples) Shell Scripts (8 concurrent) 726.5 LPM (60.1 s,               2 samples) system call Overhead 2707740.8 LPs (10.0 s, 7 samples) system Benchmarks Index Values BASELINE RESULT indexdhrystone 2 Using register variables 116700.0 31665236.6 2713.4Doubl E-precision Whetstone 55.0 4345.5 790.1Execl throughput 43. 0 4163.9 968.3File copy 1024x768 bufsize maxblocks 3960.0 1091117.9 2755.3File Copy bufsize 50 0 maxblocks 1655.0 299689.6 1810.8File Copy 4096 bufsize 8000 maxblocks 5800.0 2535441.2 43                   71.5Pipe throughput 12440.0 1556494.1 1251.2pipe-based Context Switching 4000.0 362875.3   907.2Process Creation 126.0 10440.1 828.6Shell Scripts (1 concurrent)  42.4 5115.9 1206.6Shell Scripts (8 concurrent) 6.0 726.5 1210.8System Call                                                                   Overhead 15000.0 2707740.8 1805.2 ========system Benchmarks Index score 1482.1+ echo ' + echo ' + echo ' + E Cho ' ======= Script description and score comparison completed! ======= ' ======= Script description and score comparison completed! ======= + echo ' + echo ' + echo '

Note: There will be two running results, one is the result of 1 parallel process, and the other is the result of 4 parallel process (the output in HTML can be seen in detail). The difference between the two is that one is a single process run, and one is a multi-process run.
The test results are stored in the results directory after the default test is complete, as follows:

[Email protected] results]# Pwd/opt/unixbench/unixbench/results[[email protected] results]# lstest-vm001-2017-09-16-01  test-vm001-2017-09-16-01.html  test-vm001-2017-09-16-01.log

Results three files in the directory, the first is the same as the results of the above script , the second HTML file is to display the results as a page, you can use the browser to open the view, the third log file is the process of running the detailed test procedures section.

Third, the test project analysis

After each project in the test, there will be 1 2 3 4 5 6 7 8 9 10 numbers, which means that 10 sets of tests are carried out, and some of the contents and explanations of the test are as follows: 1. Dhrystone 2 Using Register variables 1 2 3 4 5 6 7 8 9 10 This entry is generated in 1984 and the string handling is tested because there is no floating-point operation, so Software and hardware designs (hardware and software Design), compilation and linking (compiler and linker options), code optimization (codes Optimazaton), Memory cache (cache memory), wait status (? Wait states) The effect of the integer data type (int data types)
2. ********************double-precision Whetstone 1 2 3 4 5 6 7 8 9 10 This one tests the speed and efficiency of the floating point operation. This test consists of several modules, each of which includes a set of operations for scientific calculations. A wide range of C functions: Sin,cos,sqrt,exp,log is used for mathematical operations of integers and floating-point numbers, array access, conditional branching (conditional branch), and program invocation. This test also tests both integer and floating-point arithmetic operations.
3. **************system Call Overhead 1 2 3 4 5 6 7 8 9 10 Test the cost of entering and leaving the operating system core, which is the cost of a single system invocation. It uses a small program that calls the Getpid function repeatedly to achieve this. 4. ***************pipe Throughput 1 2 3 4 5 6 7 8 9 10 Piping (pipe) is the simplest way to communicate between processes, where the pipe throughtput refers to a process in a second can write 512 words to a pipe The number of times the section data is then read back. It should be noted that the pipe throughtput does not have a corresponding real existence in the actual programming. 5. *************pipe-based Context Switching 1 2 3 4 5 6 7 8 9 10 This test two processes (per second) Exchange an increasing number of integers through a single pipe. This is very much to the practical application of programming, the test program first create a child process, and then the sub-process of two-way pipeline transmission. 6. ************process Creation 1 2 3 test the number of times a process can create a child process and then retract the child process per second (the child process must exit immediately). The focus of process creation is the creation of the new process control block and the memory allocation, which is sharply to the memory bandwidth. In general, this test is used to compare the different implementations of the operating system process to create this system call. 7. ***********execl Throughput 1 2 3 This test examines the number of EXECL system calls that can be performed per second. The EXECL system call is a member of the EXEC function family. It is the front end of the Execve () function, as is the case with some other similar commands. 8. *********** file Copy tests the rate at which data is transferred from one file to another. Each test uses a different size buffer. This test statistic for the file read, write, copy operation specifies the number of read, write, and copy operations for the file within the time (by default, 10s). Filesystem throughput bufsize maxblocks 1 2 3Filesystem throughput 3Filesystem bufsize maxblocks 1 2 Throughput 4096 BufSize 8000 Maxblocks 1 2 39. The shell scripts tests the number of times a process can concurrently start n copies of a shell script in a second, and n generally takes a value of 1,2,4,8. (My system takes 1, 8, 16). This script makes a series of transformations (? transformation) on a data file. Shell Scripts (1 concurrent) 1 2 3Shell Scripts (8 concurrent) 1 2 3Shell Scripts (concurrent) 1 2 3

You can test the performance of multiple servers and then compare the result values of the 9 test parameters above.

Linux Server Performance Stress test

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.