Driver "startup" time

Hi all,

I tried to search this topic over the past threads and it seems it’s not been discussed before. If it has, I apologize.

I have a clean nvidia driver installation with no kernel modules option on. I don’t need the X server so I won’t let it start at boot time.
The output of lsmod | grep nvidia with no cuda applications running is correctly reported as

nvidia 10215173 0

so as to correctly indicate that no one is using it.

The problem shows up when I start a CUDA application. In order to use cuda devices there seems to be a driver start-up time of some seconds which, instead, is not there if I start a second CUDA application while the first is still running. I guess it’s the time spent in loading the nvidia driver (the number of lsmod “Used by” becoming greater than 0).

An ugly work-around would be to let a fake cuda application start which initializes a device and then sits there sleeping and doing nothing in order to let that number be not null all the time.

Is there a way to ask to the kernel not to unload the driver when all cuda applications are done? And, if this is not the problem, what is this time overhead I’m experiencing with and how to make it disappear?

Thanks all in advance!

Bye,
M.

Run nvidia-smi in daemon mode. This will keep all the driver state intact and reduce the launch overhead on an otherwise idle system. See this thread for more details.

Run nvidia-smi in daemon mode. This will keep all the driver state intact and reduce the launch overhead on an otherwise idle system. See this thread for more details.

Thanks for your answer.
I forgot to come back here to comment on it. Anyway, that answer is a bit outdated as of now, so I propose again here the very same question.

Are there any more standard ways of keeping up the driver whilst it’s not getting used by anyone in the system? It’s a bit of an annoyance to wait for it to come up every time I wanna run a system benchmark.

Thanks in advance.

M.