Advanced

Asynchronous I/O implementation for Red Hat Linux 9 .Relinking Oracle9iR2 to utilize AIO

Posted by dba477 on · 6 comments
LXer; By Boris Derzhavets
Mail this story
Print this story

Asynchronous I/O doesn't go along with Red Hat Linux 9 automatically. It's affecting performance of any database server working in Red Hat Linux environment , which is not RHEL Advanced Server or Entry Level Server

Installation of new kernel with AIO support and patched version of libaio library

1. rpm -i kernel-2.4.20-35.9.i686.rpm from http://atrpms.com
2. rpm -i libaio-0.3.93-4.src.rpm
3. cd /usr/src/redhat/SOURCES
4. gunzip libaio-0.3.93.tar.gz
5. tar xf libaio-0.3.93.tar -C /tmp
6. cd /tmp/libaio-0.3.93/src
7. Modify files:

compat-0_1.c io_queue_init.c io_submit.c

as advised in [1],[2] 8. cd /tmp 9. tar cvf libaio-0.3.93.tar libaio-0.3.93 10. gzip libaio-0.3.93.tar 11. cp libaio-0.3.93.tar.gz /usr/src/redhat/SOURCES 12. rpmbuild -ba /usr/src/redhat/SPECS/libaio.spec 13. cd /usr/src/redhat/RPMS/i386 14. rpm -i libaio-0.3.93-4.i386.rpm 15.Check for file /usr/lib/libaio.so.1 to appear 16. cd /lib 17. ln -s /usr/lib/libaio.so.1 libaio.so

Relinking Oracle to utilize AIO for filesystems

Shutdown Oracle:-

1. cd $ORACLE_HOME/rdbms/lib
2. make -f ins_rdbms.mk async_on
3. make -f ins_rdbms.mk ioracle
4. cd $ORACLE_HOME/dbs

Add to init.ora files of instances currently installed on box:-

disk_asynch_io=true
filesystem_io=asynch

Startup Oracle

References
1.http://www.hyperic.net/support/tech-notes/oracle-setup.htm
2.http://developer.osdl.org/daniel/libaio/patch.libaio-0.3-93.fix

  Nav
» Read more about: Story Type: Tutorial

» Get new stories by e-mail: nightly or as they are published

« Return to the newswire homepage

  Related stories
» More like this

Comments (6)

Just to avoid any misunderstanding

dba477 Story submitter ·
Phase of new kernel and libaio.so install should be done by root.Restart RHL 9 with latest version of kernel. Login as oracle and perform relinking phase. You always can turn things back:- Shutdown Oracle. 1. cd $ORACLE_HOME/rdbms/lib 2. make -f ins_rdbms.mk async_off 3. make -f ins_rdbms.mk ioracle (every time backup copy of oracle binary is created) 4. cd $ORACLE_HOME/dbs Remove lines:- disk_asynch_io=true filesystem_io=asynch from init.ora files. Startup Oracle

filesystem_io=asynch should be filesystemio_options=asynch

dba477 Story submitter ·
In case when init.ora doesn't install:-

filesystemio_options=asynch

Modify SPFILE screen in OEM Console. Then click apply. Parameter will be changed dynamically and corresponding file $ORACLE_HOME/dbs/spfile will be updated. Restart instance to make sure that "filesystemio_options= asynch" is installed

Quick upgrade Red Hat Linux 9 to get AIO working

dba477 Story submitter ·
rpm -i kernel-2.4.20-35.9.i686.rpm rpm -i libaio-0.3.96-3.i386.rpm \ libaio-devel-0.3.96-3.i386.rpm Restart RHL9 Login as oracle:- Shutdown Oracle cd $ORACLE_HOME/rdbms/lib make -f ins_rdbms.mk async_on make -f ins_rdbms.mk ioracle Startup Oracle. Login to OEM Console. Modify "Spfile" screen:- disk_async_io=true filesystemio_options=asynch Click "apply". Restart instance. Gives the same result with no patches to be applied and no links created mannually.

Kernel 2.4.20-35.9 does not support AIO on Red Hat Linux 9.

dba477 Story submitter ·
Let us consider two examples: 1.Normal aio-stress behavior under kernel 2.6

# gcc -Wall -laio -lpthread -o aio-stress aio-stress.c #./aio-stress -s 300 -m -S -l -L -t 10 file1

dropping thread count to the number of contexts 1 file size 300MB, record size 64KB, depth 64, ios per iteration 8 max io_submit 8, buffer alignment set to 4KB threads 1 files 1 contexts 1 context offset 2MB verification off adding file file1 thread 0 latency min 0.07 avg 0.64 max 53.48 600 < 100 0 < 250 0 < 500 0 < 1000 0 < 5000 0 < 10000 completion latency min 0.02 avg 59.13 max 699.38 3625 < 100 883 < 250 228 < 500 13 < 1000 0 < 5000 0 < 10000 write on file1 (57.78 MB/s) 300.00 MB in 5.19s thread 0 write totals (25.23 MB/s) 300.00 MB in 11.89s latency min 0.22 avg 0.56 max 1.22 600 < 100 0 < 250 0 < 500 0 < 1000 0 < 5000 0 < 10000 completion latency min 0.01 avg 11.66 max 777.21 4610 < 100 122 < 250 56 < 500 11 < 1000 0 < 5000 0 < 10000 read on file1 (293.03 MB/s) 300.00 MB in 1.02s thread 0 read totals (292.75 MB/s) 300.00 MB in 1.02s latency min 0.07 avg 0.32 max 57.93 600 < 100 0 < 250 0 < 500 0 < 1000 0 < 5000 0 < 10000 completion latency min 0.02 avg 648.07 max 43866.41 3806 < 100 134 < 250 436 < 500 315 < 1000 43 < 5000 0 < 10000 < 62 random write on file1 (5.97 MB/s) 300.00 MB in 50.26s thread 0 random write totals (4.70 MB/s) 300.00 MB in 63.83s latency min 0.44 avg 0.68 max 30.32 600 < 100 0 < 250 0 < 500 0 < 1000 0 < 5000 0 < 10000 completion latency min 0.01 avg 2.36 max 166.30 4804 < 100 3 < 250 0 < 500 0 < 1000 0 < 5000 0 < 10000 random read on file1 (718.66 MB/s) 300.00 MB in 0.42s thread 0 random read totals (538.19 MB/s) 300.00 MB in 0.56s

2. aio-stress behavior on Red Hat Linux 9 upgraded with kernel 2.4.20-35.9

# uname -a Linux ServerI685 2.4.20-35.9 #1 Thu Jun 24 07:09:26 EDT 2004 i686 i686 i386 GNU/Linux

# gcc -Wall -laio -lpthread -o aio-stress aio-stress.c # ./aio-stress -s 300 -m -S -t 10 -l -L file1

dropping thread count to the number of contexts 1 file size 300MB, record size 64KB, depth 64, ios per iteration 8 max io_submit 8, buffer alignment set to 4KB threads 1 files 1 contexts 1 context offset 2MB verification off adding file file1 thread 0 io_queue_setup(512) returned -38 (Function not implemented)

Same picture under 2.4.20-8

Conclusions:

1.Site http://atrpms.net provides untrustable information 2.Successful relink of Oracle9iR2 binaries and instance restart with parameters: disk_asynch_io=true filesystemio_options=asynch is not a fair. AIO was not implemented because kernel doesn’t support it.

Axel.Thimm@atrpms.net feedback (rh9 kernel 2.4.20-35.9&AIO)

dba477 Story submitter ·
I would also like to express my appreciations Axel Thimm at atrpms.net for explanations how to read and understand RHL 9 Kernel 2.4.20-35.9 features description at mentioned site:-

On Sun, Sep 19, 2004 at 10:46:34AM +0000, Boris Derzhavets wrote:

Please, view link:- http://atrpms.net/dist/rh9/kernel-redhat/kernel-2.4.20-35.9.... You state on this page:- Tue Mar 26 23:00:00 2002 Benjamin LaHaise - add aio 20020326 - correct aio library install path

Axel Thimm answers:-

That's a changelog made by Red Hat, even if after two years the aio patches got removed or are malfunctioning, the changelog is still valid and cannot be altered (it is there for documenting historical steps).

Please view final results at the link bellow:-

Post a comment

A free account is needed to post. Write your comment here first: your text is kept in this browser while you sign up or log in, and is waiting for you when you come back.

Your message:
|||||
10
Markdown: **bold**, *italic*, [text](https://link), - lists, > quotes, $x^2$ for math. Formatting help

Sign up and post (it is free)  or  Log in and post