Skip to content
TheChatArchiveThe Chat Archive
GeminiGemini (model unspecified)· GoogleHugging Face ShareLM (browser-extension contributions)

hello gemini how to keep the persistence m in nvidia smi always on?

  1. User

    hello gemini how to keep the persistence m in nvidia smi always on?

  2. Gemini Assistant

    On a Linux system like your Ubuntu setup, you can enable persistence mode using the nvidia-smi command. Persistence mode keeps the NVIDIA driver loaded even when no applications are using the GPU, which can significantly reduce the startup time for new CUDA applications. This is especially useful for AI research, where you may be running frequent, short-duration jobs.Using the nvidia-smi commandTo enable persistence mode for all your GPUs, you can use the following command in your terminal. You'll need to run it with superuser privileges.The -pm flag stands for "persistence mode," and the 1 enables it. If you have multiple GPUs and only want to enable persistence mode for a specific one, you can use the -i flag followed by the GPU's index (starting from 0).For example, to enable persistence mode on the first GPU, you'd use sudo nvidia-smi -i 0 -pm 1.The nvidia-persistenced daemonWhile the nvidia-smi command works, its effect is only temporary and will be reset after you reboot your system. For a permanent solution on Ubuntu, you should use the NVIDIA Persistence Daemon. This daemon is designed to run in the background and ensure that persistence mode remains active across reboots.The nvidia-persistenced daemon is typically installed alongside the NVIDIA driver package. You can enable it as a service using systemd to have it start automatically on boot. Since you're running Ubuntu, systemd is the most common way to manage services.Here's how you can check its status and enable it:Check the status of the daemon:If it's not running, you can start it with:Enable the daemon to start on boot:This command will ensure that the daemon starts automatically every time you boot your laptop.This daemon-based approach is considered the more robust and recommended method by NVIDIA, as it manages the persistence state more reliably than the simple nvidia-smi command alone. This video provides a general overview of the nvidia-smi command on Ubuntu, which is directly relevant to your query.

  3. User

    when I run the enable command I get this The unit files have no installation config (WantedBy=, RequiredBy=, UpheldBy=, Also=, or Alias= settings in the [Install] section, and DefaultInstance= for template units). This means they are not meant to be enabled or disabled using systemctl.   Possible reasons for having these kinds of units are: • A unit may be statically enabled by being symlinked from another unit's   .wants/, .requires/, or .upholds/ directory. • A unit's purpose may be to act as a helper for some other unit which has   a requirement dependency on it. • A unit may be started when needed via activation (socket, path, timer,   D-Bus, udev, scripted systemctl call, ...). • In case of template units, the unit is meant to be enabled with some   instance name specified.

  4. Gemini Assistant

    The error message "The unit files have no installation config" means that the nvidia-persistenced.service unit is not designed to be enabled directly with systemctl enable. This is a common situation with services that are intended to be started by a dependency chain rather than manually by the user.In this case, the nvidia-persistenced service is often configured to be started automatically by other NVIDIA-related services when the system boots up. This is a deliberate design choice by the package maintainers to ensure that the persistence daemon is started at the correct time in the boot process, especially when a GPU is detected.The solution is to manually start the service.Since you are not meant to enable it with systemctl enable, you should just start the service directly. It will likely stay active and be re-started on subsequent boots by other services.Run the following command:You can then verify that it's running with:If the status shows as active (running), you have successfully started the daemon. In most modern Ubuntu installations with the NVIDIA proprietary drivers, this service will be started automatically on the next boot by other parts of the NVIDIA driver stack.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.