ls command output slow in Veritas filesystem

book

Article ID: 100026009

calendar_today

Updated On:

Cause

Directory fragmentation is a result of frequent creation and deletion of files in the directory.

Resolution

Perform routine defragmentation on filesystems. Directory fragmentation is a result of frequent creation and deletion of files in the directory. Thus during 'ls' the name lookups can take much longer.
Schedule monthly or weekly defrags depending on the file creation/deletion frequencies.

Example:
Check for need of defragmentation:
# fsadm -F vxfs -ED /Mount-Point
Dirs Total Immed Immeds  Dirs to  Blocks to
Searched Blocks Dirs to Add Reduce Reduce
total 11  906788    2        1         2       844893

To defrag:
# fsadm -F vxfs -ed /Mount-Point

Check again:
# fsadm -F vxfs -ED /Mount-Point
Dirs Total Immed Immeds Dirs to Blocks to
Searched Blocks Dirs to Add Reduce Reduce
total 11    15         2         1        1             1


Issue/Introduction

"ls" command output slow in Veritas filesystem.