# Improving ext3 filesystem performance with directory indexing

**URL:** <https://linux-tips.com/t/improving-ext3-filesystem-performance-with-directory-indexing/152>\
**Category:** Kernel\
**Created:** [April 16, 2008, 5:55pm UTC](https://linux-tips.com/t/improving-ext3-filesystem-performance-with-directory-indexing/152 "2008-04-16T17:55:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![demirten](https://linux-tips.com/user_avatar/linux-tips.com/demirten/32/64_2.png) [@demirten](https://linux-tips.com/u/demirten)\
**Post date:** [April 16, 2008, 5:55pm UTC](https://linux-tips.com/t/improving-ext3-filesystem-performance-with-directory-indexing/152/1 "2008-04-16T17:55:18Z")

</div>

Directory indexing feature improves file access time in large directories or directories containing many files by using hashed binary trees to store the directory information. It is a good way to enable it for example on a web server which has thousands of files in a single directory:

```
tune2fs -O dir_index /dev/sda3

```

Directory index will be created for new files but you can regenarate index with:

```
e2fsck -D -f /dev/sda3
```
