TECHNOLOGY

Find live GPU users before unloading a driver module

In this article
THE QUICK TAKE

Identify process and module reference owners before planning driver removal; a stopped main server is insufficient evidence of quiescence.

A maintenance procedure finds the GPU module still in use after the visible inference server exits. User processes, monitoring helpers and dependent kernel modules can retain different kinds of references. Diagnose those owners before planning removal; a familiar process name disappearing does not establish that every device and module reference has ended.

Identify remaining users

Record the service’s actual process membership and relevant device identities through authorized metadata. A supervisor can leave children, and a monitoring service can be independent of inference. Correlate open device descriptors with ownership where visible. Avoid dumping request contents or killing every process with a GPU-related name to make a reference count decline.

Read loaded module relationships

lsmod presents the kernel’s loaded-module view, including information useful for dependency investigation. A module reference count is not simply a count of model requests or client processes. Compare dependent modules and the intended device stack with the process observations. A zero-looking number in one summary is insufficient evidence that arbitrary unloading will be supported safely.

Keep dependencies ordered

The module-management tools document dependency-aware removal differently from raw removal of a named object. Preserve the intended supported order rather than trying repeated names until one works. A dependency can be busy because a legitimate service still uses its device path. That needs lifecycle coordination, not an assumption that the dependency itself is defective.

Avoid force as diagnosis

Forced unloading bypasses conditions that normally prevent removal and has documented risks. It cannot prove that users have quiesced or that the device state is safe. Stopping the intended workload through its normal lifecycle and observing released references provides stronger evidence. Separate read-only owner discovery from any later explicitly planned maintenance action on the driver stack.

Verify cleanup in an isolated fixture

Use harmless device work in a disposable maintenance environment to observe process exit, descriptor release and the documented module lifecycle. Include an independent helper so the difference is visible. Acceptance means ownership and release are explained for that setup. It does not authorize live unloading, guarantee reset behavior or establish that a successfully removed module leaves every external client and persistent service in a valid state.

Primary references

Loaded Kernel Modules.

Module Dependency Resolution.

Kernel Module Removal.

Process File Descriptors.

Related reading: A Change Register for GPU Drivers and Server Settings; Graceful inference-server termination with active streams.

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles