Friday, June 10, 2005

Physical I/O

Last week I was involved in solving a performance problem for a customer that suffered from enormous performance slow downs. The funny thing was that there was a special task force assigned to this problem by the customer and they had been working since half december on this problem. That task force consisted of 22 people and some were actually flown in to help solve the problem. A consultant was asked to have a fresh look at the problem by installing Veritas i3 for Oracle (that was used succesfully used in another project). After installing the tool and getting the performance data, he quickly called me after one day to confirm his findings (basically all the wait time was I/O related) and while we spoke on the phone we checked the mount options for the file systems and guess what, the directio mount option was commented out. It was used on many other servers, but on this particular server it was not. After talking to the task force it wasn't clear why this was done. So the decision made to include the directio mount option again and at the same time change two init.ora paramters: optimzer_index_cost_adj and optimzer_index_caching. The database was bounced and a simple batch job was run to validate the performance improvement. That batch job ran before with 50-70 calculations per hour and after the changes it ran with 2500+ calculations per hour. There was a factor of 35-50 times improvement. So this was great news ofcourse, however the next day one of the other databases on the system reported a severe performance problem. And in fact a quick check revealed that it was waiting most of the time in I/O related events. A further analysis showed a couple of things:
1) The Oracle buffer cache was really small and so the File System buffer cache was heavily used to compensate for that small Oracle buffer cache.
2) It also showed that a handfull of statements were responsible for 80+ percent of the I/O workload.
3) In fact it was discovered that one statement did around 600K physical I/Os in just over 2 hours.
4) And there were a couple of other statements just like that.

So it was clear that a handfull of statements that were poorly tuned were responsible for bringing down the performance of the whole machine (when the directio mount was not used). The other team working on this database with the large number of I/Os blamed the other thing for causing a performance problem in their database (in principle they are right about this) and basically wanted the directio option removed. So the question becomes should that be done? Or should the second team fix their SQL and application so that less physical I/O is done and everybody will have good performance? My take on it is that the second team should fix their application and that would be my recommendation, but clearly that team doesn't see it that way.
And a conflict is born ....

So who should win?

114 comments:

Anonymous said...

Hello,

How did you calculate the optimal values for optimzer_index_cost_adj and optimzer_index_caching ? Just by trial and error ? We have some databases where these parameters are left to their default values, but I'm not sure if we could get a better performance by optimizing them.

Other question : is the direct i/o option the recommended config for UNIX filesystems ? We use Oracle on AIX 5.2 with filesystems mounted on SAN devices (with cached i/o).

Greetings,
Matthias - Belgium

Don Burleson said...

Hi,

I use a script to calculate a starting value for OICA:

http://www.fast-track.cc/s68.htm

Anonymous said...

It would be interesting to see the Statspack reports before and after the changes were made. It's hard to believe the the directio mount option
caused "enormous performance slow downs."

Alberto Dell'Era said...

one of the other databases on the system reported a severe performance problem.

If the db is 9iR2+ - have you considered enabling directio for your instance only with FILESYSTEMIO_OPTIONS ?

Gabriel Paulovic said...

I'm not suprised. I saw a similar issue on Solaris 7 ... their filesystem cache is really badly designed, it can lead to paging out Oracle executables, so you have all data cached to improve performance ... but wait the exacutable code is paged out on the disk :-) ... they fixed it in Solaris 8.

Check O/S level stats for paging activity. I suspect it will be very high.

Gabriel Paulovic said...

And ... AIX has very similar issue ... see Metalink note# 316533.1

Anonymous said...

Yo Oracle Pro's:

I have hard time with any conclusion about turning on Direct I/O and as is well. I have seen at two large sites that turning on Direct I/O did absolutely nothing, although I do believe it has its calling with certain applications.

So after some research I discovered that in order for an application to take advantage of Direct I/O mount options and or direct I/O Oracle parameters the application it self has to make direct I/O system calls.

I would think one should be able to confirm this with a TRUSS. Although my research has not allowed me to confirm this 1 way or the other.

All I know is in some very large ( 12 Gig SGA environments. )Turning on this mount option did nothing by itself...Comments welcome.

CT, USA

Alistair said...

I've just gone through a similar situation, where the performance of a non-clustered Oracle server was ground to halt.

We investigated and saw the application using it was horrific, poor SQL all over the place, nearly no use of PL/SQL and so forth.

It seemed it was a a straight forward solution, tune the application code and everything would start singing again. The company didn't have the time for that and looking forward, they knew they were going to need more servers. With that in mind, they upgraded to 10g Enterprise (from Standard), purchased a second server with a SAN.

The performance problems of course went away immediately, so now they just have to commit to fixing the application or they'll be throwing more hardware and money at it again very shortly.

Anonymous said...

Wow This is Deep..I know all of this sounds good but if you really want to change yourself or someone important to you. If you need free tarot card reading in your life. If You can say no to all this free tarot card reading...

I am changing the way I live today ..Think it and believe it.. You can Change Your Life and Start Living Your Dreams Today..http://gregvb.tarotmind.hop.clickbank.net

Anonymous said...

stinkin spammer

affiliate program said...

Here are some Famous Quotes.... Waste your money and your only out your money,but waste your time and your out part of your life... Michael Leoboeuf

Inflation is when you pay fifteen dollars for the ten dollar hair cut you used to get for five dollars when you had hair... Sam Ewing

If You Find a need to become part of the affiliate program so you make a few extra bucks.. go to http://7day2success.com/ ....affiliate program...affiliate program....

Live a better life today..

Anonymous said...

Greetings,
First, let clarify that what direct i/o does. When the filesystem mounted with DIO the file caching will be ignored. No file caching at the o/s level for that filesystem. This scenario is done when system has limited amount of memory and to advoid double buffering a file. Direct io helps the most when filesystem is heavily hit by batch job with little to none re-referrent the data. So it's again depending on your particular situation, the "milages may be differrent".
Tuning bad SQLs/application will gain 80% of the performace while fidding with parameters (OS or Oracle) the most can get you 20% gain.

Escago!

start internet business said...

I'm not sure how I got here but am glad I came across your blog. Thx.

Steve@
http://www.lifeincome.org

Anonymous said...

I'm not experienced enough to talk about Direct I/O, but to answer your question: I would have to say your missing the "business" factor. Fixing the code seemed the obvious choice at first, but sometimes there is a business reason to not do the obvious. Fixing the code could take months or longer. It could be dependent on resources that are not available. The source could could not be available (who hasn't been forced to work around vendor limitations?)

So my final answer is: Document what you found, include your recommendations, and make sure all parties have a chance to review what was found.

Anonymous said...

I have been following a site now for almost 2 years and I have found it to be both reliable and profitable. They post daily and their stock trades have been beating
the indexes easily.

Take a look at Wallstreetwinnersonline.com

RickJ

Rick J said...

I have been following a site now for almost 2 years and I have found it to be both reliable and profitable. They post daily and their stock trades have been beating
the indexes easily.

Take a look at Wallstreetwinnersonline.com

RickJ

Greg said...

self help books

Anonymous said...

Getting all this much information on enterprise was interesting. Keeping this interest in mind, did we compile this informative article on enterprise.

Anonymous said...

Very nice site! alfa romeo de collection xt cartoon porn 525i bel detector radar awning

annerose said...

These comments have been invaluable to me as is this whole site. I thank you for your comment.

Iza Firewall said...

Dear administrator:

Some of our comments above may include links that are no longer valid or that do not have a nofollow value. They might very well lead you today to a third party. Therefore,
I ask you, if you would be so kind, to please delete or disregard those
comments.

Many thanks and best wishes,

Iza, Roberto Iza

Muy Señores Míos:

Algunos de nuestros comentarios incluyen vínculos rotos que bien pudieran llevar hoy a una tercera persona. Por tanto, le rogamos, por favor, que los deseche o desestime.

Gracias y recuerdos

Iza, Roberto Iza

<a href="http://m2.aol.com/tg6y/index.html">Anonymous</a> said...

Do you can write anything else about it? Great article!

<a href="http://medonlineshops.com">OnlinePharmacy</a> said...

4QiRyV Your blog is great. Articles is interesting!

<a href="http://m1.aol.com/CoryDyer55/index19.html">phentermine discount no prescription cheap</a> said...

e3JWmq Thanks to author.

<a href="http://m1.aol.com/IvySalas33/45_261007.html">loss meridia review weight</a> said...

Wonderful blog.

<a href="http://members.ospa.us/portal_memberdata/portraits/ttzqzjpsl">credit card injections</a> said...

actually, that's brilliant. Thank you. I'm going to pass that on to a couple of people.

name said...

Good job!

<a href="http://basran.t35.com/index9.html">canopy tour companies in costa rica</a> said...

Magnific!

<a href="http://users2.TitanicHost.com/chastka/index6.html">cycling tour of spain 2003</a> said...

Nice Article.

<a href="http://www.optimising.biz/portal_memberdata/portraits/tkffpabfj">application for low intere</a> said...

Please write anything else!

<a href="http://learning.hsc.hccs.edu/portal_memberdata/portraits/tnglpmobm">ringtones</a> said...

Good job!

<a href="http://www.bcrobotics.org/portal_memberdata/portraits/tunaqpwhm">Money to loan classifieds&lt;</a> said...

Please write anything else!

<a href="http://paydayadvisors.org">PaydayLoans</a> said...

7QuULd You have a talant! Write more!

<a href="http://tes.uab.es/MISS/portal_memberdata/portraits/twkgxziok">Auto insurance company</a> said...

orb2xf actually, that's brilliant. Thank you. I'm going to pass that on to a couple of people.

<a href="http://m1.aol.com/EloyRowe59/194-291007.html">fioricet generic</a> said...

NMOidB Wonderful blog.

<a href="http://hydrocodone.99k.org/index.php">Hydrocodone</a> said...

oY4RQO The best blog you have!

<a href="http://users2.titanichost.com/buyviagra/438.html">hoodia chews</a> said...

gZEcBA Thanks to author.

<a href="http://free.7host07.com/nmcfgy/234.html">alnwick castle tour package</a> said...

Thanks to author.

<a href="http://www.allnewsandvideos.com/">Washington</a> said...

great blog and good articles
thanks

<a href="http://fioricet.clanteam.com/?pharma=80">buy fioricet mortgage refinance refinance mort</a> said...

Wonderful blog.

<a href="http://celebrex.zxq.net/?pharma=1567">is celebrex safe for dogs</a> said...

Thanks to author.

<a href="http://m1.aol.com/BrettHead14/39.html">real estate loan opportunities phoenix</a> said...

Magnific!

<a href="http://users2.titanichost.com/buyviagra/index9.html">phentermine home</a> said...

Nice Article.

<a href="http://tramadol.newsit.es/instant-release-tramadol.html">instant release tramadol</a> said...

Wonderful blog.

<a href="http://tramadol.newsit.es/tramadol-beware-shipping.html">tramadol beware shipping</a> said...

Magnific!

<a href="http://xanax.newsit.es/interaction-between-herbal-products-and-xanax.html">interaction betw</a> said...

Thanks to author.

<a href="http://phentermine.whdot.com/index13.html">xenical hgh phentermine qu it smoking</a> said...

Good job!

<a href="users2.titanichost.com/amalopra">JohnBraun</a> said...

lKwjjh write more, thanks.

<a href="http://users2.titanichost.com/popebatret/index2.html">college school sex</a> said...

Please write anything else!

<a href="http://users2.titanichost.com/inoryum/index35.html">duclos caroline sex</a> said...

Thanks to author.

<a href="http://users2.titanichost.com/hviler/index28.html">anime cat sex</a> said...

Hello all!

<a href="http://users2.titanichost.com/ansfur/index25.html">lesbian moms sex</a> said...

Nice Article.

<a href="http://users2.titanichost.com/olds77/index9.html">double vaginal double anal</a> said...

Please write anything else!

<a href="http://users2.titanichost.com/shingro/index10.html">sex act mpeg</a> said...

Nice Article.

<a href="http://users2.titanichost.com/scersi/index23.html">eletric shock sex</a> said...

Nice Article.

<a href="http://users2.titanichost.com/t1fielde/index20.html">pa morgana sex</a> said...

Nice Article.

<a href="http://users2.titanichost.com/adjutes/index8.html">bareback sex clips</a> said...

Good job!

<a href="http://users2.titanichost.com/adjutes/index28.html">barba sex photos</a> said...

actually, that's brilliant. Thank you. I'm going to pass that on to a couple of people.

<a href="http://users2.titanichost.com/shiconta/index1.html">cp sex index</a> said...

Thanks to author.

<a href="http://users2.titanichost.com/gnites3/index4.html">horse sex download</a> said...

Nice Article.

<a href="http://users2.titanichost.com/marymeno/index31.html">profiling sex offenders</a> said...

Thanks to author.

<a href="http://users2.titanichost.com/vadhoms/index8.html">manaus sex industry</a> said...

Calvin, we will not have an anatomically correct snowman!

<a href="http://users2.titanichost.com/etooking/index34.html">ny wife sex</a> said...

640K ought to be enough for anybody. - Bill Gates 81

<a href="http://users2.titanichost.com/swiseny/index8.html">doctor free sex</a> said...

I'm not a complete idiot, some parts are missing!

<a href="http://users2.titanichost.com/Lostsoldier3/index5.html">free lesbian porn without credit ca</a> said...

When there's a will, I want to be in it.

<a href="http://users2.titanichost.com/pyzoid/index2.html">brendan reals sex</a> said...

Friends help you move. Real friends help you move bodies

<a href="http://users2.titanichost.com/pyzoid/index20.html">brazil lesbian sex</a> said...

If ignorance is bliss, you must be orgasmic.

<a href="http://users2.titanichost.com/selli83/index3.html">aika miura sex</a> said...

640K ought to be enough for anybody. - Bill Gates 81

<a href="http://users2.titanichost.com/numdaso/index10.html">japan car sex</a> said...

actually, that's brilliant. Thank you. I'm going to pass that on to a couple of people.

<a href="http://users2.TitanicHost.com/porada/get-amoxicillin-without-a-prescription.html">get amoxi</a> said...

Beam me aboard, Scotty..... Sure. Will a 2x10 do?

<a href="http://cialis.whdot.com/index14.html">cialis levitra sale viagra</a> said...

Hello all!

<a href="http://web.archive.org/web/20070818071840/freewebtown.com/loans1/consolidating-student-loans"></a> said...

Friends help you move. Real friends help you move bodies

<a href="http://users2.titanichost.com/numdaso/index1.html">inuyasha sex doujin</a> said...

Wonderful blog.

<a href="http://users2.titanichost.com/febisko/index28.html">belgian biscuit sex</a> said...

Please write anything else!

<a href="http://users2.titanichost.com/topletrufus/index1.html">gerbils and sex</a> said...

The gene pool could use a little chlorine.

<a href="http://users2.titanichost.com/yetzeit/index30.html">asian sex porno</a> said...

When there's a will, I want to be in it.

<a href="http://users2.titanichost.com/brittanyrogers/88-0411.html">all sex cartoons</a> said...

What is a free gift ? Aren't all gifts free?

<a href="http://users2.titanichost.com/glicia80/38-0411.html">sex and lust</a> said...

When there's a will, I want to be in it.

<a href="http://users2.titanichost.com/reekello/index6.html">daily sex cum</a> said...

What is a free gift ? Aren't all gifts free?

<a href="http://users2.titanichost.com/tortene/index17.html">office sex pics</a> said...

actually, that's brilliant. Thank you. I'm going to pass that on to a couple of people.

<a href="http://users2.TitanicHost.com/kopelar/clonazepam-tapering-schedule.html">clonazepam taperin</a> said...

I don't suffer from insanity. I enjoy every minute of it.

name said...

I'm not a complete idiot, some parts are missing!

<a href="http://users2.titanichost.com/cuhozhilov/index2.html">email subscription teen gay porn</a> said...

A lot of people mistake a short memory for a clear conscience.

<a href="http://users2.titanichost.com/robertf/index20.html">rape porn stories</a> said...

Magnific!

<a href="http://users2.titanichost.com/maxeevich/index2.html">ancient porn</a> said...

What is a free gift ? Aren't all gifts free?

<a href="http://users2.titanichost.com/dityroe/index19.html">linda rafar sex</a> said...

Friends help you move. Real friends help you move bodies.

<a href="http://users2.titanichost.com/liperwo/index14.html">auto oral sex</a> said...

Good job!

<a href="http://users2.titanichost.com/dasistorama/index20.html">freehardcore porn</a> said...

I don't suffer from insanity. I enjoy every minute of it.

<a href="http://users2.titanichost.com/rego07/index14.html">chuck conner porn</a> said...

Build a watch in 179 easy steps - by C. Forsberg.

<a href="http://users2.titanichost.com/artinko/index12.html">girl porn skirt tight</a> said...

Build a watch in 179 easy steps - by C. Forsberg.

<a href="http://users2.titanichost.com/lindafmosley/index29.html">do women like anal sex</a> said...

Ever notice how fast Windows runs? Neither did I.

<a href="http://users2.titanichost.com/tereritoa1/index28.html">funny sex animecomic</a> said...

Build a watch in 179 easy steps - by C. Forsberg.

<a href="http://users2.titanichost.com/eynol/index8.html">porn rabbits review</a> said...

Oops. My brain just hit a bad sector.

<a href="http://users2.titanichost.com/dentouj/index34.html">hentai sex change</a> said...

actually, that's brilliant. Thank you. I'm going to pass that on to a couple of people.

<a href="http://users2.TitanicHost.com/turtra/ibuprofen-heart-disease.html">ibuprofen heart disease&lt;</a> said...

When there's a will, I want to be in it.

<a href="http://users2.titanichost.com/bybonte/index24.html">celebs sex machine</a> said...

A flashlight is a case for holding dead batteries.

<a href="http://users2.titanichost.com/unareq/index25.html">pics anal sex</a> said...

Beam me aboard, Scotty..... Sure. Will a 2x10 do?

<a href="http://users2.titanichost.com/mezers/index18.html">caledonia minnesota sex</a> said...

Lottery: A tax on people who are bad at math.

<a href="http://users2.titanichost.com/deswef/index35.html">cartoon sex girl</a> said...

Thanks to author.

<a href="http://users2.titanichost.com/tedethe/index.html">forbidden pic sex</a> said...

Friends help you move. Real friends help you move bodies.

<a href="http://users2.titanichost.com/simpleplayer/index4.html">japanese porn pics</a> said...

Nice Article.

<a href="http://users2.titanichost.com/sobermi/index30.html">indonesia sex porno</a> said...

Oops. My brain just hit a bad sector.

<a href="http://users2.titanichost.com/clydej/index31.html">vintage porn blog</a> said...

If ignorance is bliss, you must be orgasmic.

<a href="http://users2.titanichost.com/xcalomi/index33.html">jock sex porn</a> said...

Give me ambiguity or give me something else.

<a href="http://users2.titanichost.com/ramisew/index5.html">pregnant ladies sex</a> said...

Lottery: A tax on people who are bad at math.

<a href="http://users2.titanichost.com/hegory/index23.html">big black dicks free porn</a> said...

640K ought to be enough for anybody. - Bill Gates 81

<a href="http://users2.titanichost.com/sidspros/index28.html">lady sonia sex</a> said...

Lottery: A tax on people who are bad at math.

<a href="http://users2.titanichost.com/whitedenster/index31.html">boy and mom porn</a> said...

The gene pool could use a little chlorine.

<a href="http://users2.titanichost.com/MarcellaDurant/index27.html">norwegian teen anal</a> said...

640K ought to be enough for anybody. - Bill Gates 81

<a href="http://users2.titanichost.com/cationie1/index23.html">passion camping sex</a> said...

Beam me aboard, Scotty..... Sure. Will a 2x10 do?

<a href="http://phentermine.43i.net/741-061107.html">phentermine generics online</a> said...

I'm not a complete idiot, some parts are missing!

<a href="http://phentermine.43i.net/687-061107.html">phentermine delivered cod</a> said...

Magnific!

<a href="http://phentermine.43i.org/35-061107.html">adipex p phentermine vs</a> said...

Calvin, we will not have an anatomically correct snowman!

Anonymous said...

URLsWithAHREF={1,5} buy discount tramadol | buy drug tramadol | buy tablet tramadol | buy tramadol 180 | buy tramadol cheap | buy tramadol cod | buy tramadol free shipping | buy tramadol hcl | buy tramadol no prescription | buy tramadol now | buy tramadol online cod | buy tramadol overnight
URLsWithURL={1,5}[url=http://cheaptramadol-lilu.blogspot.com/] buy discount tramadol [/url] | [url=http://gigo-tramadolonline.blogspot.com/] buy drug tramadol [/url] | [url=http://crushingultram.blogspot.com/] buy tablet tramadol [/url] | [url=http://tramadol-low-blood-pressure.blogspot.com/] buy tramadol 180 [/url] | [url=http://buy-tramadol-180.blogspot.com/] buy tramadol cheap [/url] | [url=http://buy-tramadol-cheap-saab.blogspot.com/] buy tramadol cod [/url] | [url=http://saab-buy-tramadol-cod.blogspot.com/] buy tramadol free shipping [/url] | [url=http://buy-tramadol-free-shipping-saab.blogspot.com/] buy tramadol hcl [/url] | [url=http://buytramadolhcl.blogspot.com/] buy tramadol no prescription [/url] | [url=http://buy-tramadol-no-prescription-saab.blogspot.com/] buy tramadol now [/url] | [url=http://tramfarmastoraz.blogspot.com/] buy tramadol online cod [/url] | [url=http://tramfarmastorag.blogspot.com/] buy tramadol overnight [/url]
Greatings=Cool site!|thanks for letting me view your guest book and giving me all the information|Really great site with alot of good information!! Keep up the good work!!!!|Nice! We really amused by the website.|A very interesting site with top design and contents!|Greetings Very good web site. I loved it. Found invaluable information. Just what I was looking for :-) Regards and best wishes|WOW, so much stuff here, an excellent resource. Thanks guys!|Hi everyone. Great site. Hold on.|Your site was so interesting and informative I had to call a friend to tell her about it. Great work|Hammm… Nice article… Interesting.|Hello, nice site look this:|See you...Thanks, its great to receive such positive comments.|Your site has very much liked me. I shall necessarily tell about him to the friends.|This is one of the best sites I have ever found. Thanks!!! Very nice and informal. I enjoy being here.|Very good site! I like it! Thanks!|Cool design, great info!|Hi! Guys how you manage to make such perfect sites? Good fellows!|very well made it .All information on this site is represented|I glad too see this interest site, I tell my friends about it! They like sites like that: site|This is a cool site! Thanks and wish you better luck! Brilliant but simple idea.|Here is intresting people… Lets talk!|Your site is very convenient in navigation and has good design. Thanks!|Very interesting and beautiful site. It is a lot of ful information. Thanks.|Very good site. Thank you!!!|Save time by hitting.|I really do like this place.|Very realistic and amusing site.|It is a member of the site.|Nice site. Thanks.|I would love to hear more about this …|hi, you have super site.|That was a very nice post, I’m proud of you!|hello, your site is lucky.|Hi this is a very informative site!|Save your time, please.|The mission of the your site.|hi im mohan i am having problems.|hi.. just droppin’ by your site.. it’s really cute… nice work!|Thanks for the interesting and informative site. That’s definitely what I’ve been looking for.|Very good site with a lot of useful information|Yes. Very good site! worth to visit!|archy it i, and i like you!|Very good website you have here.|Thanks for taking a few of us.|Keep up this great resource.|I found it very interesting.|i love is it.|The more you know about site|Hi, nice site! Your hard work paid off|The site’s very professional|Keep up this great resource|Exciting website. Thank you.|thanks you peopels.|The site’s very professional! Keep up the good work!|I like your diary. Allow to be friends!|good! support!|Great place to visit!