Skip to Main Content

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, John.

Asked: December 10, 2016 - 2:40 am UTC

Last updated: December 12, 2016 - 1:13 am UTC

Version: 11.2

Viewed 1000+ times

You Asked

Good Evening,

I would like to bring up a topic that comes up every time I work on a brand new Unix database server, but I never do anything about it. I mention it to the system administrators, but basically get ignored. The reason I am not very persuasive though is because I really don't know have an idea of the impact on not setting the operating system block size = db block size. On Linux, the default operating system block size is 4k while I usually set 8k database blocks. The direction is for Database Block size be equal or a multiple of the OS block size. Now, it isn't clear if Oracle is saying that having both be equal is preferred or not. Please answer that. Does it really make a difference if the OS block size is 8k compared to 4k on a database with an 8k blocksize? If it does, how much of an impact will it have? More or less than having the system admin place our data only on the outside of the disk? More or less than placing database data on RAID 1+0 instead of RAID 0+1? Those requests really annoy most system admins.

Thanks for your help.

John

and Connor said...

The arguments for matching the OS block size and db block size are perhaps more historical than anything else. A reflection of the days when you placed datafiles on a single disk, and file systems did not understand direct or asynchronous I/O.

I would contend (subjectively without evidence) that over 99% of Oracle installations are done on 8k blocksizes.

When it comes to quality of support, encountering bugs that no-one has seen, etc etc.... I would much rather be in the 99% camp than the 1% camp :-)

But for your own site - you could easily download (for example) Swingbench and do a benchmark on 4k and 8k and measure the differences. That would only take a few hours to do.

Rating

  (1 rating)

Is this answer out of date? If it is, please let us know via a Comment

Comments

John cantu, December 11, 2016 - 3:20 pm UTC

Hi Connor,

Thanks for your help once again.

So since there won't be any significant performance gain to having the system admin set the OS block size to be 8k, right?

I was concerned with encountering unforeseen issues with the 8k OS block size, too. I definitely don't want to be a pioneer. No one recognizes the performance gains when taking a chance to do something out of the ordinary, but we will hear about it when something was not "done right" and has to get redone because we did something out of the ordinary.

John






Connor McDonald
December 12, 2016 - 1:13 am UTC

I did say "set the OS block size to be 8k"

I said:

- leave the OS block size at default
- ensure your file system support asynch/direct IO

or use ASM to avoid the file system at all.

And then leave the db block size at 8k unless there is a specific need to set it to anything else.