CPU, memory, IO, and network stress testing under Linux

Source: Internet
Author: User
Tags natural logarithm

First, a simple test of the CPU:

1. Calculate special functions by BC command

Example: Calculating pi

echo "scale=5000; 4*a (1) "| Bc-l-Q

MATH LIBRARY
If BC is invoked with THE-L option, a math library is preloaded and the default scale is set to 20.
The math functions would calculate their results to the scale set at the time of the their call. The Math
Library defines the following functions:
S (x) the sine of x, X is in radians. Zheng Xuan function
C (x) The cosine of x, X is in radians. Yu Xuan function
A (x) the arctangent of X, Arctangent returns radians. Inverse tangent function
L (x) The natural logarithm of X. Log function (base 2)
E (x) the exponential function of raising E to the value x. exponential function of E
J (n,x) the Bessel function of the integer order n of X. Bessel functions



2.Tool Two: Super Pi for Linux

Super pi is used to calculate Pi (pi) using the floating-point arithmetic of the CPU, so it is commonly used by overclocking players to test the stability of the system and to test the time required for a specific bit of pi after the CPU has been calculated.
http://www.super-computing.org/
download page:ftp://pi.super-computing.org/

wgetftp://pi.super-computing.org/Linux/super_pi.tar.gz
TAR-XZVF super_pi.tar.gz
./super_pi
20 is the number of digits. Indicates how many times to calculate the azimuth of 2, such as the 1M bit after the decimal points are usually counted.

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/54/4E/wKiom1R-rnXCmbdwAASCjAYEnzQ462.jpg "title=" Super_ Pi.png "alt=" Wkiom1r-rnxcmbdwaascjayenzq462.jpg "/>


Second, a simple test of memory:

Tool: Memtester
official:
http://pyropus.ca/software/memtester/

wgetHttp://pyropus.ca/software/memtester/old-versions/memtester-4.3.0.tar.gz
TAR-XZVF memtester-4.3.0.tar.gz
CD memtester-4.3.0
Make && make install

Usage: Usage:./memtester [-P physaddrbase [-D device]] <mem>[b| k| m| G] [loops]
Example: Memtester 1G5
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/54/4D/wKioL1R-s8yAbf4yAAKk1_Y7zbE003.jpg "title=" Memtester.png "alt=" Wkiol1r-s8yabf4yaakk1_y7zbe003.jpg "/>


Third, a simple test of IO:

1, the use of DD to test:

time DD If=/dev/zero of=test bs=1m count=4096

View wa% and write drive speed with top and Iostat

2. Use the FIO command to test:

Fio is a great tool for testing IOPS, for stress testing and validation of hardware, supporting 13 different I/O engines,
Includes: Sync,mmap, Libaio, Posixaio, SG v3, splice, NULL, network, Syslet, Guasi, Solarisaio, etc.

Description
FILENAME=/DEV/SDB1 test file name, usually select the data directory of the disk you want to test.
The Direct=1 test process bypasses the machine's own buffer. Make the test results more realistic.
Rw=randwrite test for random write I/O
RW=RANDRW test for random write and read I/O
bs=16k a block file size of 16k for one-time IO
bsrange=512-2048, setting the size range of the data block
size=5g this time the test file size is 5g, with every 4k IO to test.
Numjobs=30 this time the test thread is 30.
runtime=1000 test time is 1000 seconds, if not write the 5g file will be divided into 4k each time until the end of writing.
Ioengine=psync IO engine uses pync mode
Rwmixwrite=30 in mixed read and write mode, write 30%
Group_reporting information about each process that displays the results.
In addition
LOCKMEM=1G only uses 1g of memory for testing.
Zero_buffers initializes the system buffer with 0.
Nrfiles=8 the number of files generated per process.


Random read:
Fio--filename=/dev/sdb1--direct=1--iodepth 1--thread--rw=randread--ioengine=psync--bs=16k--size=200G--numjobs= Ten--runtime=1000--group_reporting--name=mytest
Sequential reads:
Fio--filename=/dev/sdb1--direct=1--iodepth 1--thread--rw=read--ioengine=psync--bs=16k--size=200G--numjobs=30--r untime=1000--group_reporting--name=mytest
Random write:
Fio--filename=/dev/sdb1--direct=1--iodepth 1--thread--rw=randwrite--ioengine=psync--bs=16k--size=200G--numjobs= --runtime=1000--group_reporting--name=mytest
Sequential write:
Fio--filename=/dev/sdb1--direct=1--iodepth 1--thread--rw=write--ioengine=psync--bs=16k--size=200G--numjobs=30-- runtime=1000--group_reporting--name=mytest
Mixed random Read and write:
Fio--filename=/dev/sdb1--direct=1--iodepth 1--thread--rw=randrw--rwmixread=70--ioengine=psync--bs=16k--size= 200G--numjobs=30--runtime=100--group_reporting--name=mytest--ioscheduler=noop


This article is from the "Autumn Fairy tale" blog, please be sure to keep this source http://wushank.blog.51cto.com/3489095/1585927

CPU, memory, IO, and network stress testing under Linux

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.