Ask the Expert

How to configure Oracle DB_BLOCK_SIZE and Solaris operating system block size

Could you please explain how to set the DB_BLOCK_SIZE and why it needs to be a multiple of the operating system block size? I am using a Solaris 10 operating system and an Oracle 10g database.

    Requires Free Membership to View

Oracle stores its data on disk devices. Oracle must write new data to the disk unit and read old data off the disk unit. Every read or write operation is performed in units of work. Those units of work are defined by the Oracle DB_BLOCK_SIZE initialization parameter. For instance, let's assume your transaction will write 32KB of data to the disk units and the DB_BLOCK_SIZE parameter is set to 8KB. In this example, Oracle must performfour units (32KB/8KB=4) of I/O work to complete the operation.

Similarly, the operating system has its own block size. In Unix/Linux systems, that block size is configurable. In Windows systems, the OS block size is normally 2KB.

When Oracle needs to perform I/O, its smallest unit of I/O is the DB_BLOCK_SIZE as discussed above. But Oracle then passes that I/O request to the operating system. If the DB_BLOCK_SIZE is 2KB and the OS block size is 4BK, then every time Oracle requests 2KB of data to be read from disk, the OS reads 4KB. In this scenario, time is wasted reading the extra 2KB that Oracle does not need. So to properly configure the block sizes, we need to ensure that the DB_BLOCK_SIZE parameter is an integer multiple of the OS block size. If the ratio between these two block sizes is a floating point number, performance can be affected.

This was first published in September 2008

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: