Nvpmodel.service is slow

Hello,
we observed, that nvpmodel.service takes quire a long time to finish and its holding up other systemd units downstream. On a Jetson AGX Xavier with a carrier board running on r35.4.1 we saw 8s-9s and on a devkit we saw up to 12s.
This is already quite a big chunk of our total boot time. My question is, is there something we can do to speed this up or can we just disable this service without any issues. My guess is, that it deals with the power modes and we normally run on MAXN and would still like to do that. We don’t need any dynamic switching of powermodes.

Hi Jonas.L.Tietz,

Could you share the steps how you inspect nvpmodel.service taking 12s during boot up?
Have you also checked the latest R35.5.0?

I think you could not disable this service since it determine the current power mode and related power configs.

It is an unconstraint mode rather than the best performance mode.
We don’t suggest customer using this mode.

We checked both journalctl and used systemd-analyze. Here is a screenshot from systemd-analyze plot from the AGX on a carrier board.

Have you also checked the latest R35.5.0?

Not yet. I don’t have a devkit currently to experiment on and the carrierboard supplier states its compatible Jetpack 5.1.2. We could try either way and see if there are any issues. But unfortunately I don’t have time next week. So it has to wait.

It is an unconstraint mode rather than the best performance mode.
We don’t suggest customer using this mode.

Ok. We knew that it is not recommended, but we also assumed that its best performance with adequate cooling. Do you have any benchmarks we could look at which show which is the best performance mode?

Could you share the result of the following command on your board?

$ systemd-analyze blame|grep nvpmodel
~$ systemd-analyze blame | grep nvpmodel
11.838s nvpmodel.service 

Edit: This was from the devkit

The following is the result I checked from the AGX Xavier devkit with R35.5.0.

nvidia@tegra-ubuntu:~$ cat /etc/nv_tegra_release
# R35 (release), REVISION: 5.0, GCID: 35550185, BOARD: t186ref, EABI: aarch64, DATE: Tue Feb 20 04:46:31 UTC 2024
nvidia@tegra-ubuntu:~$ systemd-analyze blame|grep nvpmodel
 7.291s nvpmodel.service

Those results match the ones from our AGX running on a carrierboard. Back to my question. Is there anything we can do to improve this. You already stated that we should not disable this. 7s is in the same neighborhood of the time needed to load the default kernel. Which seems quite long for something that is part of the “boot” process.

Is there any update on this or is this expected behaviour and we can do nothing about this?

Last time, I checked the loading time for nvpmodel.service is about 7s, but I found it may be 3s on another AGX Xavier devkit.
I’ve checked this issue with internal and we think the behavior is expected.
nvpmodel will interact with several kernel drivers so that the loading time is depending on other drivers in use.

Is there any functionality issue with the 7s loading time for nvpmodel.service?

There is no functional issue. But the total boot time of the xavier is already quite slow and we would like it to be faster. Currently, for us at least, the userspace part of the boot process takes almost the longest, which nvpmodel.service is part of and takes by far the longest. So we thought it could be an easy time saving. But if you say it is needed and expected bahaviour then whe have I guess to look else where for time savings.

If you want to optimize the boot time, you could try to apply patch in the following thread.
Optimizing boot time on Orin NX (JP5.1.2) - #15 by KevinFFF

We already implemented most of this. That’s why we are looking else where. For us the UEFI currently needs 14s. So I will look more carefully through the thread too see what parts we are still missing to make the UEFI even faster. But the slowest part for us is userspace. After the kernel is done until we reach multi-user.target it takes ~16s. And 8s of this is nvpmodel.service.

You can also use public tool like ftrace or systemd analyze to check it in details.

We have tried systemd analyze before. That’s how we generated the graph and found nvpmodel.service being slow. But I will check out ftrace. Thank you :)

1 Like