performance test: CPU memory, HDD IO read/write, bandwidth speed, Unixbench
First, CPU physical number, kernel, hyper-threading, multi-core
1, login terminal, execute: cat/proc/cpuinfo, will show the VPS host CPU detailed parameters, such as the core, frequency, model and so on, the following is my Linux system host CPU:
2, the main parameter physical_id represents the number of physical CPUs, CPU cores is the number of cores, siblings represents the number of logical processors located on this physical package, they may or may not support Hyper-Threading (HT) technology.
3. If more than one logical processor has the same core ID and physical ID, the system supports Hyper-threading (HT) technology. If two or more two logical processors have the same physical ID, but the core ID is different, this is a multi-core processor.
4. If "siblings" and "CPU cores" are consistent, hyper-threading is not supported, or hyper-threading is not open. If "siblings" is twice Times "CPU cores", then hyper-Threading is supported and Hyper-threading is turned on.
5, directly view the number of logical CPUs, execute: cat/proc/cpuinfo |grep ' physical id ' |sort |uniq
6, direct view of the CPU model, execution: Cat/proc/cpuinfo |grep ' model name ' |sort |uniq
7, the number of cores of a single CPU, execution: Cat/proc/cpuinfo |grep ' CPU cores ' |sort |uniq
8, the total number of CPU threads, execution: Cat/proc/cpuinfo |grep ' processor '
Second, memory size, swap space, cache, actual use of memory
1, view the memory information of the host, execute: cat/proc/meminfo, mainly look at memory size, swap space, cache.
2, the host actually uses the memory size. Linux manages memory in such a way that, regardless of the size of physical memory, Linux is fully utilized to read some program-invoked hard disk data into memory, using the high-speed features of memory read and write to improve the data access performance of the Linux system.
3, that is, Linux will use the free physical memory, divided into a portion of space, as a cache and buffers, in order to improve data access performance. The cache is primarily used to reduce I/O operations on the disk. So we often see a Linux VPS with a total memory of 8GB tested out to occupy the memory is also 8GB.
4. How do you know how much memory Linux really occupies? Execute command: free–m
5, the real memory of the host computer method is: total-free-cached= real use of memory, that is, 1016912-18584-206944=791384, that my host real memory used is 791384MB.
Three, disk IO read-write speed test
1, disk IO, that is, input/output (input/output), this is a test disk performance an important indicator.
2, test the performance of the host disk IO can execute the following two commands:
DD If=/dev/zero of=test bs=64k count=4k Oflag=dsync
DD If=/dev/zero of=test bs=8k count=256k Conv=fdatasync
3. The difference between Conv=fdatasync and Oflag=dsync is that the sync function simply queues all the modified block buffers into the write queue and then returns, not waiting for the actual write disk to end.
4. The Fsync function only works on a single file specified by the file descriptor Filedes, and waits for the write disk operation to end and then returns. This is the hard drive IO test result of my computer.
Iv. speed test: Upload download speed, server bandwidth
Test VPS Host entry with egress bandwidth One-click Script, execute command:
wget https://github.com/sivel/speedtest-cli/raw/master/speedtest_cli.py
Python speedtest_cli.py--share
Five, VPS performance Comprehensive test: Unixbench run sub-tool test
1, Unixbench is an open-source testing system basic performance of UNIX tools, is a more common test performance tools, Unixbench's main test projects are: System call, read and write, process, graphical test, 2D, 3D, Pipeline, operation, c library and other system benchmark performance to provide test data.
2, Unixbench test results not only CPU, memory, or disk as a benchmark, but also depends on the hardware, operating system version, compiler, test system of various aspects of a series of performance, and then compare each test result and a benchmark value, get an index value, The index values of all test items are combined to form a test score.
3. Unixbench Test Execute the following command:
wget http://teddysun.com/wp-content/uploads/unixbench.sh
chmod +x unixbench.sh
./unixbench.sh
4, the test time may be longer, please wait patiently. Finally, Unixbench will detail the scores of each test project and the results of the integrated running of the host performance. For example, the score is 879.7.
Performance testing based on Linux system