Introduction to several tools for stress testing on Linux disks or other types of servers

Source: Internet
Author: User


Introduction to several tools for stress testing on Linux disks or other types of servers (I) dd: reads data from one source and writes it to another destination address in BITs [SQL] [root @ linwaterbin ~] # Dd if =/dev/zero of =/home/oracle/disktest bs = 1 M count = 512 conv = fdatasync www.2cto.com comment if: from where to go bs: data Block Size read each time count: Number of bs conv read: eliminate the impact of Linux memory cache and ensure that data is directly written to the disk. Test procedure: we recommend that you run the command multiple times to obtain the average value, before each operation, the Linux cache is cleared [SQL] www.2cto.com [root @ linwaterbin ~]. # Echo 3>/proc/sys/vm/drop_caches [root @ linwaterbin ~] # Dd if =/dev/zero of =/home/oracle/disktest bs = 1 M count = 512 conv = fdatasync 512 + 0 records in 512 + 0 records out 536870912 bytes (537 MB) copied, 27.4893 seconds, 19.5 MB/s [root @ linwaterbin ~] # [Root @ linwaterbin ~] # [Root @ linwaterbin ~] # [Root @ linwaterbin ~] # Echo 3>/proc/sys/vm/drop_caches [root @ linwaterbin ~] # Dd if =/dev/zero of =/home/oracle/disktest bs = 1 M count = 512 conv = fdatasync 512 + 0 records in 512 + 0 records out 536870912 bytes (537 MB) copied, 17.3697 seconds, 30.9 MB/s [root @ linwaterbin ~] # [Root @ linwaterbin ~] # [Root @ linwaterbin ~] # [Root @ linwaterbin ~] # [Root @ linwaterbin ~] # Echo 3>/proc/sys/vm/drop_caches [root @ linwaterbin ~] # Dd if =/dev/zero of =/home/oracle/disktest bs = 1 M count = 512 conv = fdatasync 512 + 0 records in 512 + 0 records out 536870912 bytes (537 MB) copied, 14.9991 seconds, 35.8 MB/s [root @ linwaterbin ~] # [Root @ linwaterbin ~] # [Root @ linwaterbin ~] # [Root @ linwaterbin ~] # Echo 3>/proc/sys/vm/drop_caches [root @ linwaterbin ~] # Dd if =/dev/zero of =/home/oracle/disktest bs = 1 M count = 512 conv = fdatasync 512 + 0 records in 512 + 0 records out 536870912 bytes (537 MB) copied, 15.2154 seconds, 35.3 MB/s 19.5 MB/s + 30.9 MB/s + 35.8 MB/s + 35.3 MB/s the sum of these values to obtain the average (ii) hdparm has two parameters:-t: disk Performance Test-T: memory cache performance test. We also recommend that you perform multiple tests to obtain the average value [SQL] [root @ linwaterbin ~]. # Hdparm-t/dev/sda: Timing buffered disk reads: 226 MB in 3.02 seconds = 74.82 MB/sec [root @ linwaterbin ~] # Hdparm-t/dev/sda: Timing buffered disk reads: 244 MB in 3.10 seconds = 78.59 MB/sec [root @ linwaterbin ~] # Hdparm-t/dev/sda: Timing buffered disk reads: 246 MB in 3.12 seconds = 78.87 MB/sec and above, only the read/write performance is returned, the test is relatively simple. Before using bonnie ++ or iozone to generate more detailed disk reports for installation, you must first configure the following to go to The repoforge website to download the corresponding version [plain] [root @ linwaterbin Desktop] # rpm-ivh -- node PS rpmforge-release-0.5.2-2.el5.rf.i386.rpm warning: rpmforge-release-0.5.2-2.el5.rf.i386.rpm: Header V3 DSA signature: NOKEY, key ID 6b8d79e6 Preparing... ############## ########################### [100%] 1: rpmforge-release ##################################### ###### [100%] [root @ linwaterbin Desktop] # cd/etc/yum. repos. d [root @ linwaterbin yum. repos. d] # ls base. repo mirrors-rpmforge-extras redhat. repo rpmforge. repo mirrors-rpmforge-testing rhel-debuginfo.repo (3) bonnie ++ installation: [plain] [root @ linwaterbin yum. repos. d] # yum install-y bonnie ++ Parameters used. -D: Path to generate the test file-s: size of the generated test file, in MB (if the-r parameter is not used, the file size must be at least twice the physical memory of the system) -m machine name, which can be considered as the solution name for this test. The default value is the local hostname-r memory size, which specifies the memory size. In this way, you can use the-s parameter to create an r * 2 file, it is usually used to shorten the test time, but it should be noted that the memory cache may lead to inaccurate test results-x test times-u test file owner and group, the default value is the group of the current user executing bonnie ++ and the current group-g test file. The default value is that the current group-B executing bonnie ++ calls fsync () each time a file is written () function, which is suitable for testing mail servers or database servers that usually require synchronization operations, without this parameter, it is more suitable for testing the efficiency of copying files or compiling operations. [SQL] [root @ linwaterbin ~] # Bonnie ++-s 512-r 256-u root main output: [plain] Version 1.96 ------ Sequential Output ------ -- Sequential Input--- Random-Concurrency 1-Per Chr--- Block ---Rewrite---Per Chr--- Block -- Seeks -- Machine Size k/sec % CP linwaterbin 512 M 217 99 32403 14 13798 7 378 99 49235 10 347.0 3 Latency 154 ms 2218 ms 2099 ms 125 ms 63304us 2672 ms Version 1.96 ------ S Equential Create ------ -------- Random Create -------- linwaterbin-Create -- Read ----Delete -- files/sec % CP/ sec % CP/sec % CP 16 15508 52 + ++ 27215 91 ++ ++ Latency 43819us 20118us 19580us 19834us 19699us 20435us (1) Sequential Output: write operation ① Per Chr: character ② Block: Block (2) Sequential Input: read operation (3) K/sec: Speed (k/S) (% CP: CPU usage Rate (4) iozone supports multi-process concurrent testing and can be output to excel for drawing. It is also the most commonly used tool for routine stress testing. Installation: [plain] [root @ linwaterbin ~] # Yum install-y iozone parameter description:-l: Minimum number of processes-u: Maximum number of processes-r: Basic read/write unit, take the block size of the test object as the standard. For example, if the Oracle block is set to 8 k, you can set it to 8 k-s: it is consistent with the meaning of the s parameter of bonnie ++. If this value is too small, the test results will be affected because many programs have run out of the memory-f: cached file [plain] [root @ linwaterbin ~] # Iozone-l 1-u 1-r 8 K-s 128 M Record Size 8 KB File size set to 131072 KB Command line used: iozone-l 1-u 1-r 8 K-s 128 M Output is in Kbytes/sec Time Resolution = 0.000001 seconds. processor cache size set to 1024 Kbytes. processor cache line size set to 32 bytes. file stride size set to 17 * record size. min process = 1 Max process = 1 Throughput test with 1 process Each process writes a 131072 Kbyte file in 8 Kbyte records Children see throughput for 1 initial writers = 125057.24 KB/sec Parent sees throughput 1 initial writers = 30640.70 KB/sec Min throughput per process = 125057.24 KB/sec Max throughput per process = 125057.24 KB/sec Avg throughput per process = 125057.24 KB/sec Min xfer = 131072.00 KB children see throughput for 1 rewriters = 513780.34 KB/sec Parent sees throughput for 1 rewriters = 31989.50 KB/sec Min throughput per process = 513780.34 KB/sec Max throughput per process = 513780.34 KB/sec avg throughput per process = 513780.34 KB/sec Min xfer = 131072.00 KB Children see throughput for 1 readers = 889758.12 KB/sec Parent sees throughput for 1 readers = 849615.75 KB/sec Min throughput per process = 889758.12 KB/sec Max throughput per process = 889758.12 KB/sec Avg throughput per process = 889758.12 KB/sec Min xfer = 131072.00 KB the value here is very large, this is because our s parameter settings are a little small.

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.