Is there any practice to align file system block size with database block size?
0
votes
1
answer
194
views
This topic has already been discussed here: https://dba.stackexchange.com/questions/15510/understanding-block-sizes
But I have few more things to add for my use case.
Generally, most
database systems
use a default block size
of 8 KB
, though some allow it to be modified. On the other hand, modern operating systems
often use a 4 KB
block size for file systems
. This discrepancy can result in multiple physical I/O
requests to fill a single database page
.
A smaller file system block size benefits random reads
, such as index lookups
, while larger block sizes are advantageous for sequential scans
and heap fetches
. Considering these points, I have a few questions:
1. Is there a common practice to align the database block size with the
file system block size for OLTP?
2. In a clustered system
(e.g., SQL Server Availability Groups
or
PostgreSQL streaming replication
) with a primary and one or more
secondaries, is it acceptable to have different file system block
sizes, or is this something that should always be avoided?
3. For analytical databases
or columnar tables
, is it beneficial to use
a larger block size?
Asked by goodfella
(595 rep)
Dec 11, 2024, 06:30 AM
Last activity: Dec 11, 2024, 06:10 PM
Last activity: Dec 11, 2024, 06:10 PM