Considerable File Fragmentation for Berkeley DB Database Files (Doc ID 1332501.1)

Last updated on MARCH 07, 2017

Applies to:

Berkeley DB - Version 4.0.14 to 5.2.28
Information in this document applies to any platform.
***Checked for relevance on 14-Dec-2012***

Symptoms

Berkeley DB database files might become seriously fragmented on disk. This could happen even on Linux/Unix filesystems which are less susceptible of fragmentation.
File fragmentation can be observed using various tools, such as the filefrag command on Linux/Unix. Bellow is a sample output of running filefrag on a Berkeley DB database file, which shows considerable fragmentation:

[user@machine dbdir]# filefrag <BDB_database_name.db>
<BDB_database_name.db>: 62002 extents found, perfection would be 98 extents


This might impact the random reads' performance, as the disk heads have to move intensively through non-contiguous disk space.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms