Disk I/O Test tools bonnie++ Topics

Source: Internet
Author: User
Tags array file size file system net version variable versions oracle database



Topics on disk I/O test tools bonnie++



Author Introduction:

Zhang, commonly used in the network named Kamus, also used Seraphim, now working in a large Beijing software company, Oracle Database DBA, mainly responsible for the securities industry's core trading system database management and maintenance work.

Keen focus on Oracle technology and related operating system technology, haunt the major database technology forums, is currently China's largest Oracle technology forum www.itpub.net Database management version of the moderator.

Read more technical articles and essays can log in to my personal blog,http://blog.cdsn.net/kamus



Directory

Objective.... 1

Installation.... 2

Use... 4

Evaluation... 7

RELATED LINKS .... 8


Objective
Eygle first recommended this tool on itpub because of my doubts about Sun's soft raid performance, and later Eygle used the tool to test disk array Io, including some comparisons between EMC and T3.

These test results are published on Eygle's personal site, as shown in the last link section of this article.



But I've never used my own bonnie++ tested IO performance, the most recent customer to modify their array raid configuration, is the use of D2 array, can only support soft raid a poor performance of the old Dongdong, In our testing process suddenly found that 12 disk array configuration is RAID10, but at the same time only 2 disk in the read-write, that is, stripe set is only 2, this problem in a year ago just on the system is so, incredibly has not been found to take so long time.

The customer finally decided to reset the RAID configuration, first the redo and datafile separate, redo on the disk with 4 blocks for RAID10, leaving 8 pieces for the RAID10, for data file use, and reset Stripe,redo is located in the LUN set to 2, The LUN in which DataFile is located is set to 4.

In theory, such a modification would make a significant reference to the I/O efficiency of the entire database, but the customer would require a realistic report of the modification effect, which would require a comparison of the changes before and after the modification.

This makes it a decision to use bonnie++ to report the disk-level modification effect. As for the database-level modification effect naturally has the pressure test procedure may complete, does not have the table here.



Now that you decide to use it, it's natural to think about how to use it. Just bonnie++ already started to run, so idle down, wrote this article.


Installation
In fact, most of the time today is spent on how to let bonnie++ run up.



Download the latest source,bonnie++1.03a.tgz from Bonnie++ 's home page.

Gunzip bonnie++-1.03a.tgz

Generate Bonnie++-1.03a.tar file, then unpack

Tar xvf Bonnie++-1.03a.tar

Generate bonnie++-1.03a Folder

CD bonnie++-1.03a

Make

Error.

/usr/ucb/cc:language Optional software package not installed



The original compiler is not installed at all.

First introduced the host situation, a Sunfire v480, two 73G internal hard disk, 4 ultrasparc-iii+ cpu,8g memory, installed is SOLARIS8, because of the need to simulate the real environment, So the older version of the 02.2 was installed, and no patch was made.



In the Sun to the installation CD can not find the companion CD, the compiler should be on this disk, there is no way to find the Internet, fortunately, soon found a great site Blastwave, including the SOLARIS8, 9 of the SPARC and x86 versions of all the required package.



According to the instructions in the GCC package download page, you need to download the following four package.

Common-1.3.3-sunos5.8-sparc-csw.pkg.gz

Gcc3rt-3.3.3,rev=2004.04.23-sunos5.8-sparc-csw.pkg.gz

Libiconv-1.8,rev=2003.01.12-sunos5.8-sparc-csw.pkg.gz

Gcc3-3.3.3,rev=2004.03.22-sunos5.8-sparc-csw.pkg.gz



The previous three packages are prerequisites for the last GCC3 package and must be installed. All downloaded, began to install the first package, that is, common that packet, the error.

Tip the OS 110934 patch version is too low and needs to be upgraded.



OK, then the Internet to find, direct Google search, the key word is "110934 soalris", usually the first few link will point to the Sunsolve site download page, patch is not usually small, quickly downloaded.



Start patching, Patchadd 110934-21.

System running Half-day, error.

To install this patch, you need to install the 110380-04 patch first. Aggravation

Then the Internet to find, download 110380-04, first patchadd 110380-04, all normal.

Again Patchadd 110934-21, all normal.



After the patch, reinstall the common package, OK, all normal.

Pkgadd-d common-1.3.3-sunos5.8-sparc-csw.pkg.gz



Then install the other packages in turn, everything is OK.



This package installs GCC in the/OPT/CSW/GCC3 directory.

The documentation indicates that the installation of GCC will create the GCC execution program under/opt/csw/bin, so the path is required to be added to the user's path variable, but after the gcc3.3 version is actually installed, no files are generated in the path above.

Later, when I installed the gcc2.95 version, I found that this version of the installation is to build GCC into the/opt/csw/bin.

So if we are installed in the Solaris8 of the gcc2.95 and installed the gcc3.3, then pay attention to these two versions of the GCC files in different paths, in fact, this should be, otherwise the new version will cover the old versions, often many people do not want.



Back to the top, after installing GCC3, run make again, still error.

/usr/ucb/cc:language Optional software package not installed



Check the PATH environment variable and have joined the/opt/csw/gcc3/bin directory.

Thought for a moment, the feeling should be the system is still using the original/USR/UCB/CC. The CC is then linked to the newly installed GCC so that whenever CC is invoked, it is actually directly using GCC.

Whereis cc

Cd/usr/ucb

MV CC cc.org

Ln-s/opt/csw/gcc3/bin/gcc/usr/ucb/cc



Note: If you want to install GCC2 packages, you need to download the following two package.

Gcc2rt-2.95.3,rev=2003.03.01-sunos5.8-sparc-csw.pkg.gz

Gcc2-2.95.3-sunos5.8-sparc-csw.pkg.gz

After installation, the same is the CC link to this version of GCC.

Whereis cc

Cd/usr/ucb

MV CC cc.org

Ln-s/opt/csw/bin/gcc/usr/ucb/cc



The compilation succeeds after the modification is complete.



Run bonnie++, error.

Libstdc++.so.5:cannot open Shared object file:no such file or directory.



Continue to check the data, found that bonnie++ looking for the Lib path is the environment variable ld_library_path specified path, but this path does not libstdc++.so.5 file, so manual will libstdc++. The so.5 file is under GCC3 from the installation path of LN to/usr/lib.

# ln-s/opt/csw/gcc3/lib/libstdc++.so.5/usr/lib/libstdc++.so.5

Run again, and still complain.

Libgcc_s.so.1:cannot open Shared object file:no such file or directory.

This time the familiar, direct again link.

# ln-s/opt/csw/gcc3/lib/libgcc_s.so.1/usr/lib/libgcc_s.so.1



Finally, bonnie++ can run normally.



We can not need to compile ourselves, in the Eygle site has Solaris8 download compiled good bonnie++. Can be used directly, of course, if you run the newspaper libstdc++.so.5 not find the problem, you need to follow the above method to solve.
Use.
Next, we will continue to introduce the use of bonnie++ (version:1.03) and the implications of the results.

usage:bonnie++ [-D scratch-dir] [-S size (Mb) [: Chunk-size (b)]]]

[-N number-to-stat[:max-size[:min-size][:num-directories]]]

[M Machine-name]

[R Ram-size-in-mb]

[-X Number-of-tests] [-U Uid-to-use:gid-to-use] [G Gid-to-use]

[Q] [F] [b] [-P processes |-y]



First, describe the parameters commonly used in the command.

-D path to build test file

-S generates the size of the test file, in M (if you do not use the-r parameter, the file size is at least twice times the system physical memory)

-M machine name, in fact, we can think of this test is the scheme name, can be arbitrarily defined. The default is the hostname for this machine.

-R memory size, specifying the memory size, which allows you to create r*2 sized files with the-s argument, typically to shorten test time, but be aware that because memory cache may result in inaccurate test results

Number of-X tests

-U tests the owner and group of files, by default, the current user and current group executing bonnie++

-G test file group, default is to execute bonnie++ current group

-B calling the Fsync () function every time the file is written is appropriate for testing the mail server or database server, which typically requires synchronization, rather than using this parameter to be more efficient at testing copy files or compiling operations.



In general, we can simply run the following command for disk performance testing:

bonnie++-d/global/oradata–m sun3510

This will result in a file that is twice times the physical memory of the host, and generates multiple files of size 1G if the total is greater than 1G, in the specified directory (usually we specify a mount point for the disk array). Assuming the host memory is 4G, 8 1G files will be generated in the test, and the files will be deleted automatically when the test is finished.



If our host memory is 4G, but we want to shorten the test time, for example, write only 2G files, you should execute the following command:

bonnie++-d/global/oradata–m sun3510–s 2048–r 1024



Bonnie++ typically consumes a lot of IO and CPU during testing, so do not test during the business peak of the production environment.



Let's look at a test result, and we'll explain exactly what bonnie++ did during the test, and what the results of each output represented.

This test result is on a Sunfire V880 + D2 Array, host configuration is 2 ultrasparc-iii+ 900MHz cpu,4g memory, while the D2 array is full of 12 36G SCSI disk, divided two LUNs, our test destination/ Global/oradata is built on one of the LUNs, uses 8 disks, and Raid10,stripe (that is, Ncol) is set to 4 with Veritas Volum Manager.

bonnie++-d/global/oradata-s 8192-m d2new-u Oracle

Using uid:1001, gid:101.

Writing with PUTC () ... done

Writing Intelligently...done

Rewriting...done

Reading with getc () ... done

Reading Intelligently...done

Start ' Em...done...done...done ...

Create files in sequential order...done.

Stat files in sequential order...done.

Delete files in sequential order...done.

Create files in random order...done.

Stat files in random order...done.

Delete files in random order...done.

Version 1.03------Sequential Output--------Sequential input---random-

-per chr---block---rewrite--per chr---block----seeks--

Machine Size k/sec%cp k/sec%cp k/sec%cp k/sec%cp k/sec%cp/sec%CP

D2new 8G 18275 62 32832 26 25423 55 27444 94 106842 60 549.9 7

------Sequential Create--------------Random Create--------

-create----Read----Delete---Create----Read----delete--

Files/sec%cp/sec%cp/sec%cp/sec%cp/sec%cp/sec

16 1723 15 +++++ +++ 5059 40 4821 37 +++++ +++ 653 5



In turn, start with the writing with PUTC () to delete files in random order ... At the end, this is the 12 test of bonnie++, the 12 tests correspond to 12 results, and the 12 results are divided into 5 categories, namely sequential Output (write test), sequential Input (read test), Random Seeks (read and write test), sequential create (sequential read-write file test) and random create (read-write file test).

The order in which the test steps and test results correspond sequentially is:

Writing with PUTC ()-> sequential output of per CHR

Writing intelligently-> sequential output block

Rewrite of rewriting-> sequential output

Reading with getc ()-> sequential input of per CHR

Block of Reading intelligently-> sequential input

Start ' em-> Random seeks

Create files in sequential order-> sequential Create

Stat files in sequential order-> sequential Create read

Delete files in sequential order-> sequential Create delete

Create files in random order-> random Create

Stat files in random order-> random Create read

Delete files in random order-> random Create Delete

Each result includes 2 values, one is K-byte or number of files, and the other is%CP, which is the average CPU occupancy rate when performing this test.



For the evaluation of output results, we think that in the case of an equal CPU occupancy rate, the higher the number of bytes accessed means the greater the throughput of the storage device, the better the natural performance.

It is noteworthy that, when testing raid, for a multiple-CPU system, bonnie++ does not play the maximum potential of the CPU, that is to say, bonnie++ I/O requests are usually not enough to meet the maximum CPU and disk pressure, The throughput shown at this time is not the maximum value that the storage device can achieve. We can monitor the system condition by Iostat,mpstat,sar and so on while testing, if there is no obvious I/O wait, it usually indicates that the test software is not enough pressure. The bonnie++ home page also indicates that support for multiple CPUs is going to be implemented in version 2.0.



After you understand the test steps and the test results, let's take a closer look at what each test result means.



Sequential Output

1. Per Char

Is the meaning of per-character. Using the PUTC () function for looping writes, each write byte is very small, can basically put into any one i-cache, in this case CPU consumption in processing PUTC () code and allocating disk file space.

2. Block

Use the Write (2) function to create a file. In this case, CPU consumption is only allocated to disk file space.

3. Rewrite

Read the file using the Read (2) function, and then modify and write back with the Write (2) function. Because the file space is already allocated, this method can effectively test the speed of file system caching and data transfer.



Sequential Input

1. Per Char

Use the GETC () function to iterate through the contents of a file

2. Block

Use the Read (2) function to iterate through the contents of a file to effectively test the efficiency of disk reads.



Random Seek

The default 3 processes are tested 8,000 times. Use the Read (2) function to read the block of the file, while 10% of the action is to write the block modified back to the file using the Write (2) function. In this test, if the amount of memory is greater than the size of the file created, a higher number appears, which may not accurately reflect the I/O efficiency of the disk itself.



Sequential Create and Radom create

Both types of tests are used to create, read, and delete a large number of small files to test disk efficiency. The file name is made up of 7 digits and any number (0-12) of any English letters. In the sequential section, the letters are after the numbers, and the random part is the letters before the numbers.

Parameters such as minimum and maximum values for creating files can be controlled with the-n argument on the bonnie++ command line.


Evaluation.
We test various disk configurations through bonnie++, or test disk efficiency under various RAID settings, and can help us to have a general understanding of the efficiency of disk throughput for each product or program.

The last line of the test results is a comma-separated list of digits, the first position is the machine name that we specify with the-m parameter when we run bonnie++, and the second position is the size of the file generated at the time of the test, followed by the results of various tests. By pasting the last line of multiple tests into Excel and then using the chart function to generate a histogram, you can have a very intuitive evaluation comparison of multiple tests.

Here are a few of the results of the evaluation, and will be added more evaluation, and welcome to your own evaluation results mail to me, I will join in this article. My email address is kamus@itpub.net.



Sunfire v480 4* (ultrasparc-iii+ 1050MHz) 8GRAM Local fibre drive

>bonnie++-D. -S 16384-m report-u ORACLE:DBA

Version 1.03------Sequential Output--------Sequential input---random-

-per chr---block---rewrite--per chr---block----seeks--

Machine Size k/sec%cp k/sec%cp k/sec%cp k/sec%cp k/sec%cp/sec%CP

16G 18703 52 28812 17 10800 12 33700 98 68172 32 260.1 2

------Sequential Create--------------Random Create--------

-create----Read----Delete---Create----Read----delete--

Files/sec%cp/sec%cp/sec%cp/sec%cp/sec%cp/sec

16 99 0 +++++ +++ 166 1 101 0 +++++ +++ 205 1

report,16g,18703,52,28812,17,10800,12,33700,98,68172,32,260.1,2,16,99,0,+++++,+++,166,1,101,0,+++++,+++,205,1



Sunfire v880 2* (ultrasparc-iii+ 900MHz) 4GRAM D2 Array (36g*12,raid10,2 stripe)

>bonnie++-d/global/oradata-s 8192-m d2org-u Oracle

Version 1.03------Sequential Output--------Sequential input---random-

-per chr---block---rewrite--per chr---block----seeks--

Machine Size k/sec%cp k/sec%cp k/sec%cp k/sec%cp k/sec%cp/sec%CP

d2org 8G 15681 55 26302 23 13877 31 26420 91 88215 49 462.6 5

------Sequential Create--------------Random Create--------

-create----Read----Delete---Create----Read----delete--

Files/sec%cp/sec%cp/sec%cp/sec%cp/sec%cp/sec

16 1245 10 +++++ +++ 3541 27 2837 21 +++++ +++ 385 3

d2org,8g,15681,55,26302,23,13877,31,26420,91,88215,49,462.6,5,16,1245,10,+++++,+++,3541,27,2837,21,+++++,+++, 385,3



Sunfire v880 2* (ultrasparc-iii+ 900MHz) 4GRAM D2 Array (36g*8,raid10,4 stripe)

>bonnie++-d/global/oradata-s 8192-m d2new-u Oracle

Version 1.03------Sequential Output--------Sequential input---random-

-per chr---block---rewrite--per chr---block----seeks--

Machine Size k/sec%cp k/sec%cp k/sec%cp k/sec%cp k/sec%cp/sec%CP

D2new 8G 18275 62 32832 26 25423 55 27444 94 106842 60 549.9 7

------Sequential Create--------------Random Create--------

-create----Read----Delete---Create----Read----delete--

Files/sec%cp/sec%cp/sec%cp/sec%cp/sec%cp/sec

16 1723 15 +++++ +++ 5059 40 4821 37 +++++ +++ 653 5

d2new,8g,18275,62,32832,26,25423,55,27444,94,106842,60,549.9,7,16,1723,15,+++++,+++,5059,40,4821,37,+++++,+++, 653,5
RELATED LINKS
bonnie++ Home

http://www.coker.com.au/bonnie++/



Special site for disk I/O test software under various operating systems

Http://www.acnc.com/04_02_01.html



The station also has various types of RAID concept description, advantages and disadvantages, including illustrations, is worth a look

Http://www.acnc.com/04_00.html



Thematic discussion on disk I/O testing

Http://www.itpub.net/266416.html



Eygle articles about bonnie++ on personal sites

Http://www.eygle.com/unix/Use.Bonnie++.To.Test.IO.speed.htm


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.