How to Influence Physical IO sizes with Oracle MBRC

I recently published a blog on restricting Linux block storage IO sizes using Kernel settings, but what if you don’t have root access, or want a more dynamic approach for your Oracle Database.

In this blog post I am going to explore the use of multiblock read count (MBRC) on an Oracle 19c Database.

Oracle Multi Block Read

The Oracle db_file_multiblock_read_count (MBRC) parameter specifies the maximum number of blocks read in one I/O operation during a sequential scan.

From the Oracle 19c Database documentation:

The default value of this parameter is a value that corresponds to the maximum I/O size that can be performed efficiently. This value is platform-dependent and is 1MB for most platforms.

If db_file_multiblock_count is not set, or set to 0, then the maximum value is the operating system’s maximum I/O size expressed as Oracle blocks ((max I/O size)/DB_BLOCK_SIZE). 

For example, for a database with a db_block_size of 8,192 (8K) we will typically see a default value db_file_multiblock_read_count of 128, as the default Linux size is 1MB, for example.

1,048,576 / 8,192 = 128 (1MB / 8K = 128)

Ok, let’s perform a Full Table Scan (FTS) and check physical block IO size.

From the FlashArray UI we can see an Read IO Size ~1MB.

FlashArray Volume performance Test 1

OK, knowing that my database is using a Pure FlashArray that supports 4MB IOs, let’s increase db_file_multiblock_read_count to 512 and see what happens.

4,194,304 / 8,192 = 512 (4MB / 8K = 512)

Let’s repeat the Full Table Scan (FTS) and check Read IO block size.

From the FlashArray UI we can now see a Read IO Size ~4MB.

FlashArray Volume performance Test 2

OK, let’s see the impact of reducing db_file_multiblock_read_count to 4.

32,768 / 8,192 = 4 (32KB / 8K = 4)

From the FlashArray we can now see a Read IO Size has been reduced to 32KB.

FlashArray Volume performance Test 3

Output from iostat -tkx 1 -d /dev/dm-18 confirms the average request size (avgrq-sz) for my FlashArray volume now never exceeds 64 sectors or 32KB (64*512B) as expected.

Summary

In this blog I have shared how the dynamic, system and session level db_file_multiblock_count (MBRC) parameter can be used to influence physical storage IOs for full table scans (FTSs) operations.

The unsupported, undocumented, underscore parameter _asm_maxio may offer alternative approach to control ASM maximum IO sizes for non-FTSs but that’s the topic for another post.

One thought on “How to Influence Physical IO sizes with Oracle MBRC

Add yours

Leave a Reply

Create a website or blog at WordPress.com

Up ↑

Discover more from Ron Ekins' - Oracle Technology, DevOps and Kubernetes Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading