Top IO Tools Bonnie ++

xiaoxiao2021-03-06  67

Topic for Disk I / O Test Tools Bonnie

About the Author:

Zhang Lezhen, usually used the net name to kamus, and has used SERAPHIM, now serves in a large software company in Beijing, Oracle Database DBA, mainly responsible for the core trading system database management and maintenance of the securities industry.

Eat care of Oracle technology and related operating system technology, out of the major database technology forums, currently China's largest Oracle technology forum www.itpub.net database management version of the Lord.

Read more Technical Articles and Essays You can log in to my personal blog, http://blog.cdsn.net/kamus

table of Contents

Preface .... 1

Installation .... 2

Use ... 4

Evaluation ... 7

Related links .... 8

Foreword

The earliest is Eygle recommended this tool on ITPUB, which is the labination of SUN's soft RAID performance. Later, EYGLE continued to use this tool to test some of the tested IO test, including some comparisons of EMC and T3.

These test results are published on the Eygle's personal site, see the last associated link part of this article.

But I have not tested IO performance with Bonnie . Recently, a customer wants to modify the RAID configuration of your own board. It is the use of D2 arrays, which can only support a soft RAID, a poor performance, in us. During the test process, I suddenly found 12-piece disk array configuration of RAID10, but only 2 pieces were written in reading, that is, Stripe settings just 2, this problem is just more than a year ago, it is like this. I have never been found for so long.

The customer finally decided to reset the RAID configuration. First, the REDO and DataFile are separated, and the disk where REDO is located is used as RAID10. There is 8 pieces to make RAID 10, which is used for data files, and reset the Stripe, RUN settings in REDO. For 2, the LUN where DataFile is located is set to 4.

In theory, such modifications should significantly mention the I / O efficiency of the entire database, but customer requirements can have an actual modification report, which is to make a comparison before and modified.

In this way, it is determined using Bonnie to make a modified effect report of the disk level. As for the database-level modification, natural pressure test procedures can be done, here.

Since I decided, then I naturally want to think about it. Just bonnie has already started running, so I left, I wrote this article.

installation

In fact, most of the time today is how to make Bonnie run up.

Download the latest Source, Bonnie 1.03a.tgz from the Bonnie 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 introduce the host situation, one Sunfire V480, two

73G

Built-in hard drive, 4 Ultrasparc-III CPU,

8G

Memory, installation is Solaris8, because you need to simulate real environments, so installing is more old 02.2, and no Patch is called. In the installation CD given in the installation CD, the compiler should be on this plate, there is no way to find it yourself, it's okay, so I will find a great site Blastwave, including Solaris8, 9 All the required packages of the SPARC and X86 versions.

According to the instructions in the GCC package download page, find the following four packages.

Common-

1.3.3

-Sunos5.8-sparc-csw.pkg.gz

GCC3RT-

3.3.3

, REV = 2004.04.23-sunos5.8-sparc-csw.pkg.gz

LIBICIONV-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 front three packages are the prerequisites for the last GCC3 package, must be installed. All downloaded, start to install the first package, that is, the COMMON package, error.

Tip 110934 patch version of the operating system is too low, need to be upgraded.

OK, then find it online, use Google to check, the keyword is "110934 soalris", usually a few links to the SUNSOLVE site download page, the patch is usually not large, and it will be overloaded.

Start patch, Patchadd 110934-21.

The system is run for half a day, an error.

It is necessary to install 110380-04 patches to install this patch. I fell.

Look online, download 110380-04, first Patchadd 110380-04, everything is normal.

Reproduction Patchadd 110934-21, everything is normal.

After finishing the patch, reinstall the Common package, OK, everything is normal.

Pkgadd -d Common-

1.3.3

-Sunos5.8-sparc-csw.pkg.gz

Then install other packages in turn, everything is normal.

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

The file indicates that the GCC will create the GCC execution program under / opt / csw / bin, so the path is required to join the user's PATH variable, but after installing the version of GCC3.3, it is not on the top path. Any file is born.

Later I installed the GCC2.95 version, I found this version of the installation was to generate the GCC to / OPT / CSW / BIN.

So if we install GCC2.95 in Solaris8 installed GCC3.3, then pay attention to these two versions of GCC files in different paths, in fact, this should also be, otherwise the new version will overwrite the old version, often It is a lot of people who are unwilling.

Back to top, after the GCC3 is installed, run Make again, still report error.

/ usr / ucb / cc: Language Optional Software Package Not Installed

Check the PATH environment variable, which has been added to the / opt / csw / gcc3 / bin directory.

Think of it, it feels that the system is still using the original / usr / ucb / cc. So link the CC to the newly installed GCC, so when you call CCs, 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 the GCC2 package, you need to download the following two packages. 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 the installation is complete, the CC is also linked to this version of the GCC.

Whereis cc

CD / USR / UCB

MV cc cc.org

LN -S / OPT / CSW / BIN / GCC / USR / UCB / CC

After the changes were completed, it was successfully compiled.

Run Bonnie , error.

LibSTDC . SO.5: Cannot Open Shared Object File: No Such File or Directory.

Continue to check the information, found that the LIB path of Bonnie is the path specified by the environment variable ld_library_path, but this path does not have libstdc . SO.5 file, so manually use the libstdc . SO.5 file from the GCC3 installation path LN to / usr / lib under.

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

Run again and still report.

Libgcc_s.so.1: Cannot Open Shared Object File: No Such File ORECTORY.

This time, the light car is rushing, and I will do a LINK again.

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

Finally, Bonnie can run normally.

We don't need to compile yourself, there is Solaris8 download compiled Bonnie on the Eygle site. Can be used directly, of course, if you run the file libstdc . SO.5 can't find the problem, you will also need to solve it in the above method.

use.

Next, you will continue to introduce the use of Bonnie (Version: 1.03) and the meaning of the result.

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, explain the parameters commonly used in commands.

-d generates the path to the test file

-s Generate the size of the test file, in m units (if the -R parameter is not used, the file size is required to be 2 times the system physical memory)

-m machine name, in fact, we can think that it is a scheme name this test, which can be defined casually. The default is the host's hostname.

-r memory size, specify memory size, which can create R * 2 size files through -s parameters, usually used to shorten test time, but it is necessary to pay attention to this because the memory cache may result in inaccurate test results.

-X test

-u Test file owner and group, by default is the current user and current group of Bonnie

-g Test file group, the default is the current group of Bonnie

-b Call the fsync () function each time you write files, which is suitable for testing the mail server or the database server, which is usually suitable, without using this parameter, is more suitable for testing the efficiency of the Copy file or compilation. Usually we can simply run the following command for disk performance test:

Bonnie -d / global / oraData -m sun3510

This will be in the specified directory (usually we specify a mount point on a disk array), generate twice the host physical memory, if the total amount is greater than

1G

Then generate multiple sizes

1G

document. Assume that the host memory is

4G

, Then generate 8 in the test

1G

Document, to the end of the test, these files will be automatically deleted.

If our host memory is

4G

But we want to shorten the test time, such as only writing

2G

The file should be performed below:

Bonnie -d / global / oraData -m sun3510 -s 2048 -r 1024

Bonnie usually takes up a lot of IO and CPUs during testing, so please do not test during the production environment of business.

Let's take a test result. Through this result, we explain what Bonnie has made what is done during the test, and what is the result of each output.

This test result is on a Sunfire V880 D2 array, the host configuration is the CPU of 2 Ultrasparc-III 900MHz,

4G

Memory, and D2 arrays are full 12 pieces

36G

SCSI disk, divided two LUNs, our test destination / global / oraData is built on one of the LUNs, using 8 disks, using Veritas Volum Manager, and Stripe (ncol) is set to 4.

Bonnie -d / global / oradata -s 8192 -m d2new -u oracle

USIING 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 ------ - Squential 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 2744 94 106842 60 549.9 7 -------------- Random Create --------

-Create ------ -ndelete ---create-- ------ndelete--

Files / sec% CP / sec% CP / sec% CP / sec% CP / sec% CP / SEC% CP

16 1723 15 5059 40 4821 37 653 5

In turn, from Writing With Putc () to Delete Files In Random ORDER ... End, this is the 12 tests made by Bonnie . These 12 tests correspond to 12 results, and the 12 results are divided into 5 big. Class, SEQUENTIAL OUTPUT, SEQUENTIAL INPUT, Random Seeks, Sequential Create, and Random Create (free read and write file test).

Then the test steps and test results are in order:

Writing with putc () -> Sequential Output PER CHR

Writing Intelligently-> Sequential Output Block

ReWriting -> Sequential Output ReWrite

Reading with getc () -> Sequential Input PER CHR

Reading Intelligently-> Sequential Input Block

Start 'em -> random seeks

Create Files in Sequential Order -> Sequential Create Create

Stat Files in Sequential ORDER -> Sequential Create's Read

DELETE FILES in Sequential Order -> Sequential Create delete

Create Files in Random ORDER -> Random Create Create

Stat Files in Random ORDER -> Random Create READ

DELETE FILES in Random Order -> rDOM CREATE DELETE

2 values ​​in each result, one is the number of K bytes or the number of files, the other% CP, is the average usage of the CPU when performing this test.

For the evaluation of the output results, we believe that the number of access by the byte is higher in the case of equal CPU, the greater the throughput of the storage device, the better natural performance.

It is worth noting that when testing RAID, for multi-CPU-based systems, Bonnie does not play the biggest potential of the CPU, that is, the I / O request from Bonnie is usually not enough to reach the maximum pressure of the CPU and disk, showing this time The throughput is not the maximum value that the storage device can reach. We can monitor system conditions through Iostat, MPSTAT, SAR, and other commands while testing, and if there is no obvious I / O waiting, it usually indicates that the pressure of the test software is not enough. On the home page of Bonnie , it also indicates that support for multi-CPU multi-process will be placed in version 2.0. After understanding the test steps and test results, let's further see what all the test results are.

Sequential Output

1. Per char

It is the meaning of Per-Character. Using the PUTC () function to loop writing, each write is small, basically in any I-cache, in which case the CPU consumption is handled by the PUTC () code and allocated disk files Space.

2. Block

Create a file using the Write (2) function. In this case, the CPU consumption is just on the dispensing disk file space.

3. Rewrite

Use the READ (2) function to read the file, then modify it to write back with the Write (2) function. Since the space of the file has been allocated, this way can effectively test the speed of file system cache and data transmission.

SEQUENTIAL INPUT

1. Per char

Use the getc () function loop to read the file content

2. Block

Use the READ (2) function to loop the file content and effectively test the efficiency of the disk read.

Random Seek

Default 3 processes for 8000 tests. Use the read (2) function to read the block Block, and 10% of the operation is to use the Write (2) function to write the block modification back to the file. In this test, if the memory capacity is greater than the created file size, the relatively high value will not appear to accurately reflect the I / O efficiency of the disk itself.

Sequential Create and Radom Create

Both of these tests are used to create, read, and delete a large number of small files to test disk efficiency. The file name consists of 7 digits and any of the number of English letters (0-12). At the Sequential section, the letters are behind the numbers, while the Random section is before the letters are numbers.

Parameters such as the minimum and maximum values ​​of the creation file can be controlled in the Bonnie command line.

Evaluation.

We test various disk configurations via Bonnie , or test the disk efficiency under various RAID settings, which can help us have a general understanding of the disk throughput efficiency of each product or various programs.

The last line of the test results are a column of numbers with a comma. The first location is the machine name specified by the -m parameter when running Bonnie , the second location is the file size generated when testing, and the following is in turn The result of the class test. We paste the last line of multiple tests into Excel, then generate a histogram with chart features, you can have an extremely intuitive evaluation comparison of multiple tests.

The results of several evaluations are listed below, and later will add more evaluation, and you will welcome yourself to give me your evaluation results, I will join this article. My email address is kamus@itpub.net.

Sunfire V480 4 * (Ultrasparc-III 1050MHz) 8GRAM Local Fiber Hard Disk

> 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

Report

16G

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

------ Sequential Create ------------------------------------------------------------------------------------------------------------------------------------------------

-Create ------ -ndelete ---create-- ------ndelete--

Files / sec% CP / sec% CP / sec% CP / sec% CP / sec% CP / SEC% CP

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 ------ - Squential 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 ------------------------------------------------------------------------------------------------------------------------------------------------

-Create ------ -ndelete ---create-- ------ndelete--

Files / sec% CP / sec% CP / sec% CP / sec% CP / sec% CP / SEC% CP

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, 3Sunfire 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 ------ - Squential 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 ------------------------------------------------------------------------------------------------------------------------------------------------

-Create ------ -ndelete ---create-- ------ndelete--

Files / sec% CP / sec% CP / sec% CP / sec% CP / sec% CP / SEC% CP

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 homepage

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

There are also various types of RAID concept description, advantages and disadvantages, including illustration, worth seeing

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

Special discussion on disk I / O test

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

Eygle Personal Site About Bonnie

http://www.eygle.com/unix/Use.bonnie .to.test.io.speed.htm

转载请注明原文地址:https://www.9cbs.com/read-90075.html

New Post(0)