Skip to content

Explain silent du runs on large data sets and document ncdu usage - #556

Open
TimVNL wants to merge 2 commits into
masterfrom
free-disk-space-du-ncdu
Open

TimVNL wants to merge 2 commits into
masterfrom
free-disk-space-du-ncdu

Conversation

@TimVNL

@TimVNL TimVNL commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

What

The page recommends du -h /data/web /data/mysql | sort -h | tail -10, and customers regularly read the long silent wait that follows as a hung server: du reads the metadata of every file, so on shops with hundreds of thousands of files the scan runs for minutes, and the pipe through sort means nothing appears on screen until the whole scan has finished. Support has handled a ticket from a customer who followed this page, saw minutes of silence, and concluded the Hypernode was stuck.

Changes

  • Explain in the du section why the scan takes a while and why the terminal stays empty until it is done, so the silence is recognizably normal.
  • Add an un-piped du -hx --max-depth=1 variant that prints one line per top-level directory as soon as it is done, for anyone who wants visible progress.
  • Reword the intro's ncdu /data line: it described ncdu as "the disk usage report sorted in descending order", but ncdu is an interactive explorer with a live progress display while scanning, which is the better answer to "is it still working?".
  • New "Browse Your Disk Usage With ncdu" section: what it does, launch command, -q bandwidth tip, pointer to ncdu --help and the in-interface ? key list, plus two safety notes: deleting from ncdu is permanent (read-only mode via -r), and nothing under /data/mysql should ever be deleted by hand (the ibdata1 section on this page covers the only safe procedure).
  • Add -x to both example commands so scans stay on the /data filesystem instead of wandering into anything mounted underneath it (a remote storage mount, for example).

Verification

  • ncdu facts and options checked against the upstream manual for 1.15.1 (the version Ubuntu 22.04 ships, identical keys in 2.x): live scanning progress, -r read-only mode, -q, -x, ? help.
  • du behavior per GNU coreutils: no output until traversal completes when piped through sort; un-piped du prints each directory as its subtree finishes; -x skips other filesystems; --max-depth available on Ubuntu 22.04.
  • Local Sphinx build with the repo's warnings-as-errors settings: page builds clean.

…usage

du on /data/web and /data/mysql can run for minutes without printing
anything when piped through sort, which reads as a hung server and
generates support tickets. Set the expectation, show how to verify the
scan is still working from a second SSH session, and document ncdu
(scanning progress, key bindings, read-only mode) as the interactive
alternative.
Fold the silence explanation into the du paragraph, drop the separate
scan-time estimate and the second-session ps check (the ncdu live
progress display covers that), and replace the ncdu key table with a
pointer to ncdu --help and the in-interface ? help.
@github-actions

Copy link
Copy Markdown
Contributor

@TimVNL TimVNL changed the title docs: Explain silent du runs on large data sets and document ncdu usage Explain silent du runs on large data sets and document ncdu usage Nov 27, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant