Considerations for Oracle DB_BLOCK_SIZE



The setting of the parameter DB_BLOCK_SIZE depends on the type of data you are looking at, the application and implementation.

The main considerations are as follows:

1. Balance with Operating System Block Size

   For good performance, Oracle Block size should be made equal to or a
   multiple of the operating system blocksize. If you do not do this then the
   operating system may be doing many reads and writes to process Oracle
   blocks. This is inefficient and wastes CPU cycles.

   If your rows are small and you use a large blocksize, when you fetch a block
   you may get lots of rows that you are (probably) not interested in. The
   operating system has to do more work to get the row(s) that you are
   interested in.

   On the other hand, if you were interested in the extra rows then although
   this may waste CPU on the initial fetch then you have already loaded the
   block containing the rows in to the buffer cache.

   Larger blocks also mean more rows cached for the same number of
   DB_BLOCK_BUFFERS (taking up more memory).


2. Index Branches

   Larger Oracle block sizes may give better index balancing with more rows in
   each branch.


3. Locking/Block Contention

   Remember that with more processes looking at the same block you are more
   likely to get block contention.


4. Row Length

   If your rows are comparatively large then you may need a large blocksize to
   (possibly) prevent chaining.