CONSIDERED INFRASTRUCTURE. INDIVIDUAL PROPOSALS.alonzofelixa@alonzo.cloud
HELP CENTER / Troubleshooting

Investigate disk and memory pressure safely

Distinguish full filesystems, inode exhaustion, normal caching, and sustained memory pressure without destructive cleanup shortcuts.

By ALONZO & ALONZO, LLCPublished Updated

Applies to Authorized read-only investigation on an existing Linux VPS; journal examples assume systemd.

Before you begin

  • A clear symptom, its UTC observation time, and the affected application or filesystem.
  • Permission to inspect relevant metadata; sudo checks require authorized administrative access.
  • A recoverable backup and a separately approved change plan before cleanup, resizing, or service intervention.

Start with the symptom and a small observation window

Record whether the application reports no space, allocation failure, slow responses, or unexpected restarts. Note the time, affected path, recent workload changes, and whether the condition is persistent. Storage exhaustion and memory pressure can produce similar symptoms but require different remedies.

Begin with read-only checks. Do not reboot, delete data, drop caches, or kill processes to make a graph look better. Those actions can destroy evidence or interrupt recovery. Run commands as an ordinary authorized user when possible; use sudo only for permitted inspection, and omit it when already in an authorized root shell.

Check both filesystem capacity and inode availability

Inspect filesystem type, space, and inode use:

df -hT
df -i

Match the affected application path to its actual mount. Free space on another filesystem does not help a full data volume. Inode exhaustion can prevent new files even when byte capacity remains. Filesystem-reserved blocks can also make administrator and application behavior differ.

Identify temporary memory-backed filesystems separately from persistent disks. A high percentage alone does not establish urgency without the remaining capacity and growth rate. Do not format, unmount, resize, or move application directories during diagnosis. Save a small redacted snapshot of the relevant rows for comparison.

Inspect only a known relevant directory

Replace TARGET_DIR with one verified absolute application or log directory, not the filesystem root, a broad parent, or a wildcard:

sudo du -xhd1 "TARGET_DIR"

The depth limit bounds reported entries, not the work required to inspect a large tree. The -x option avoids crossing filesystem boundaries. Run once during a suitable period and stop further investigation if it adds noticeable load.

A difference between df and du can involve inaccessible directories, reserved space, mount boundaries, or deleted files still held open. Investigate the responsible application rather than deleting more files or restarting everything. Apply retention changes only through a reviewed, backup-aware process.

Interpret memory availability over bounded samples

Collect a memory summary and five short samples:

free -h
vmstat 1 5

In free, available memory estimates what can be used without substantial swapping; a small free column can be normal because Linux uses memory for cache. Swap occupancy alone does not show current distress. Look for repeated swap-in or swap-out activity and relate it to the application's latency.

The first vmstat report represents averages since boot; subsequent reports cover each interval. A short sample can miss intermittent peaks. Containers or service-specific limits can cause failures before the whole VPS runs out of memory, so compare the relevant limit with the workload owner's monitoring.

Collect bounded process and kernel evidence

List only the highest memory-ranked entries, without full command arguments:

ps -eo pid,comm,%mem,%cpu --sort=-%mem | head -n 11

The header plus ten rows is a snapshot, not a complete history. CPU percentages and shared memory require context; do not sum process percentages as an exact accounting of physical memory. Avoid collecting environments or full arguments, which can expose secrets.

For recent kernel evidence, use a bounded journal query:

sudo journalctl -k --since "1 hour ago" --no-pager -n 80

Look for out-of-memory events or storage errors near the symptom. Missing entries do not rule out pressure or service-level limits. Preserve relevant excerpts without killing the named process.

Choose a reviewed remedy and verify the result

Possible next steps include fixing excessive application allocation, reviewing log retention, moving approved data through a migration plan, or requesting capacity clarification. Each requires its own authorization and recovery precautions. Do not remove database files, package files, or unknown logs simply because they are large.

After an approved remedy, repeat the same small measurements and application health check under comparable load. Confirm usable capacity or available memory improved without new errors.

For escalation, share UTC times, affected mount type, relevant capacity and inode rows, bounded memory samples, and redacted kernel excerpts. Remove paths, usernames, addresses, customer data, and sensitive process names. Never attach private files or an unreviewed system dump.

Final checklist

  • The affected path was matched to its mount, and both space and inode availability were checked.
  • Directory inspection was targeted and did not become a whole-filesystem scan.
  • Available memory, swap activity, sample timing, and any service limits were interpreted together.
  • Process and journal output stayed bounded; no blind deletion, cache dropping, or process killing occurred.
  • An approved remedy was followed by comparable checks, with only redacted evidence retained.

Sources & further reading

YOUR NEXT STEP

Discuss your requirements.

For a VPS proposal, share your workload, preferred region and resource needs. Availability, specifications and terms are confirmed separately; an inquiry does not place an order or provision a server.

Start an inquiry