How to run jetson_clocks inside docker container?

Hi Everyone,

I need to run jetson_clocks inside a docker container as I deploy applications as docker containers however I couldn’t find a way to do it.

My application is working a couple of hours a day so my intention was to boost clocks while the application is running and restore the defaults when it’s waiting on idle.

I’ve written an application to overclock the engines inside from a docker container however it doesn’t make it as fast as jetson clocks (the difference is 5 FPS in my main application). What is missing here?

overclock_jetson.txt (10.1 KB)

Hi,

Just want to confirm first.
The jetson_clocks is working inside the container but the performance is not as expected.
Is that correct?

Thanks.

Hi,

No, I cannot run jetson_clocks in a docker container.

I can run an application that I’ve written (overclock_jetson.c in the first entry) in a docker container however it doesn’t satisfy me.

So I need to find a way to run jetson_clocks inside a docker container. (Or I need to know what is missing inside my source file to reach maximum performance just as jetson_clock does)

Hi,

You can find the source code of jetson_clocks in /usr/bin/jetson_clocks.
It basically changes the configure of each hardware in /sys/device/

To access these nodes inside the container, you might need to add them through the --device configure.
Thanks.

This is something that I didn’t understand since I took jetson_clocks as a reference to develop my script but it doesn’t behave the same.

In both cases, the hardware clocks are the same however jetson_clocks script gives more performance than my script but why?

In the jetson_clocks case, the jetson uses more power than my script while my application is running(I see in jtop and the difference is around 1W)

Is there anyone to help me debug it?

Hi,

It sounds like the clocks aren’t maximized with your script as expected.

Do you meet any failure or error when using your script (ex. any permission issue)?
Could you check the clock before/after the script to confirm if the script is applied correctly?

Thanks.

Hi,

There was indeed a bug in the code that showed me the wrong clocks.

Thanks for the help.