Source: coreutils
Severity: normal
Tags: patch
X-Debbugs-Cc: [email protected]

Dear Maintainers,

I am forwarding Ubuntu bug report[1] about slow Lustre filesystem performance:
---
Users running Lustre filesystems on Ubuntu experience severe performance
degradation with 'du' on large directories (10K+ files). Operations that
should take seconds can take minutes.

The issue occurs because by default, coreutils sorts directory entries by
increasing inode number for large directories. This breaks Lustre's
"statahead" prefetching feature, which activates when it detects sequential
file access patterns and prefetches metadata accordingly. When coreutils sorts
entries by inode (which are scattered), Lustre sees random access and doesn't
activate statahead at all, forcing every file access to be an individual
network round-trip to the server instead of being served from prefetched cache.

Testing the du command after applying the patch to coreutils demonstrates ~5x
performance improvement, with ~9x improvement reported in production
environments. This primarily affects HPC and research environments,
where Lustre is commonly deployed.

The fix adds Lustre's filesystem magic number (0x0BD00BD0) to the list of
filesystems where inode sorting should be skipped, matching existing behavior
for NFS, CIFS, and tmpfs. The change is minimal, has been accepted upstream in
coreutils, and only affects Lustre filesystems - all other filesystems remain
unchanged.
---

The issue can be fixed either by applying the upstream patch[2], or upgrading
coreutils to 9.10.

[1] https://bugs.launchpad.net/ubuntu/+source/gnulib/+bug/2137373
[2]
https://github.com/coreutils/gnulib/commit/578b8d7dc5e3fc00d308660fa60bb529a2e42bb3


-- System Information:
Debian Release: trixie/sid
  APT prefers noble-updates
  APT policy: (500, 'noble-updates'), (500, 'noble-security'), (500, 'noble'), 
(100, 'noble-backports')
Architecture: amd64 (x86_64)

Kernel: Linux 6.17.0-1011-oem (SMP w/24 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

-- no debconf information

Reply via email to