Script for maximum clockspeeds and performence

Hi,

does anyone yet have a max-performence script like for the TX1?

TX1: Nvidia's Max Performance Script for Tegra X1 · GitHub

I´m not talking about Max-P, I mean real maximum, i.e GPU 1,3 Ghz and all CPU cores 2 Ghz.

Thanks.

Please see this post for enabling Denver2 and increasing clock governor frequencies:
[b][url]https://devtalk.nvidia.com/default/topic/1000345/jetson-tx2/two-cores-disabled-/post/5110960/#5110960[/url][/b]

Thanks Dusty.

Using nvpmodel -m with profiles is a very nice and comfort way.

Hi Dusty,

I only want to boom the performance whenever necessary but save power the rest of time.
After I run the jetson_clock.sh is there a way to stop it?

Thanks!
Ray

Hi Ray, try running jetson_clocks.sh --help to see info about the store and restore commands. When the system is at it’s default clocks (i.e. before you run jetson_clocks), run jetson_clocks.sh --store. Then later after you have maximized the governors, you can run jetson_clocks.sh --restore to restore it to the way it was without rebooting.

Hi dusty,

Is there a way to make jetson_clocks.sh run at startup? I’ve tried the “Startup Applications” app but it doesn’t work (doesn’t run it as sudo I guess). I’ve also tried the following from [1]:

also didn’t work out. Is there a more straightforward solution to this?

[1] GPU clock - Jetson TX2 - NVIDIA Developer Forums

Hi buraksoner, were you able to use the nvpmodel utility at startup instead?

[url]http://www.jetsonhacks.com/2017/03/25/nvpmodel-nvidia-jetson-tx2-development-kit/[/url]

Hi dusty,

No I haven’t yet tried nvpmodel.

By the way, it turned out the following method actually works, I just didn’t have rc.local running at startup

Thanks for the help,
Burak

I solved it this way:

On the TX2 I created a startup service named jetsonClocks.service with the below lines of code in it and put it in etc/systemd/system folder:

[Unit]
Description=Maximize Jetson Performance
After=multi-user.target

[Service]
ExecStart=/bin/sh /home/path/to/clocks.sh

[Install]
WantedBy=multi-user.target

In the clocks.sh file just put:

#!/bin/bash
# Maximize performance on the Jetson
# How long would this hold up in a long environment? No idea

sleep 60

. "/home/nvidia/jetson_clocks.sh"

exit 0

Then you need to run the following commands to enable the service

sudo chmod 644 /etc/systemd/system/jetsonClocks.service
sudo systemctl daemon-reload
sudo systemctl enable jetsonClocks.service
sudo reboot

Hi,

I am getting around 1.5-2x improvement in my application by running jetson_clocks.sh.
Is it okay to use max clock all the time without worrying about temperature ?

Thanks for you help,
Shubham Jain

It shouldn’t matter, but it does turn on the fan at all times.

“jetson_clocks.sh” is a bash script, so it is human readable. There is a function within the script, “do_fan()”, which shows you can read fan speed setup via “cat /sys/kernel/debug/tegra_fan/target_pwm”, or write a number from 0 to 255 to manually set a speed. “255” is max, and “0” is automatic. If you run “jetson_clocks.sh” to set clocks to max, and do not want the fan to run except when needed, then you should be able to do this:

sudo echo 0 > /sys/kernel/debug/tegra_fan/target_pwm

FYI, you might consider “sudo nvpmodel -m 0” prior to jetson_clocks.sh. This turns on Denver cores and may change some clock settings. Think of nvpmodel as determining what performance range is allowed, and jetson_clocks.sh as implementation of turning to max rate.

Note that there are some different device trees for 24x7 versus stock, and this might reduce the maximum clock speed…I’m not sure, but the intent seems to lengthen the life of a Jetson which is always running at max load (setting jetson_clocks.sh makes max possible, but it would still idle somewhat cool if not under a load…a combination of always being under load and having clocks maxed would probably imply it is of interest to see what 24x7 changes might lengthen life.

Can anyone comment on whether a 24x7 device tree is relevant here? I don’t know much about this, I just know it has come up in past conversations.