tx-2 max performance ?

I flashed my tx2 with the latest jetson while it arrived a few days ago, and I put my streaming platform on it, and I wanted to test to check how this thing can perform.
So I put my software to generate 1 camera feed to udp 10mbit 1080 h264 30 fps encoded since I dont have 6 cameras available.
Then 5 more streams udp to udp picking up one port after another, like this> 5101 -5102 - 5103 - 5104 - 5105, total 6 h264 encoded streams ending up on port 5105 with 1080 h264 encoded stream from the camera with omxh264enc as encoder, and the decoder as decoder before it encodes again. I can see the stream on the output port on my own stream client with the lowest possible latency.

For the first 10 seconds, I pickup 30 frames for each stream, then something happens. it drops. The fan doesnt turn on, so I suspected that the cores are not turned on.

I check with command top, and only 1 core is active out of the 4 it lists.

Then I check this:

sudo cat /sys/devices/system/cpu/online
0,3-5

The cores 1,2 are listed in the offline file.

I saw the TK1 max power script in another thread, and I tried that but it doesnt work as the path’s are different on tx2. But I managed to get my fan turned on.

So I customized the script partially, and I did this:

echo "Enabling fan for safety..."
if [ ! -w /sys/kernel/debug/tegra_fan/target_pwm ] ; then
	echo "Cannot set fan -- exiting..."
fi
echo 255 > /sys/kernel/debug/tegra_fan/target_pwm

echo 1 > /sys/devices/system/cpu/cpu0/online
echo 1 > /sys/devices/system/cpu/cpu1/online
echo 1 > /sys/devices/system/cpu/cpu2/online
echo 1 > /sys/devices/system/cpu/cpu3/online
echo 1 > /sys/devices/system/cpu/cpu4/online
echo 1 > /sys/devices/system/cpu/cpu5/online

The script complaines about permission denied on /sys/devices/system/cpu/cpu0/online
I researched this, and setting a core to same state as its already in, creates that error. so cpu0 was online only, which is a nice confirmation that only 1 cpu was online at reboot.

This script turns the fan on, and turns the cores listed in the sys/devices/system/cpu to online:

sudo cat /sys/devices/system/cpu/online
0-5

Then I run my streaming platform with the camera to udp, udp-udp 5 more streams and I get 30 frames per second again, but after about 10 seconds it drops again.

So Im wondering what the heck is going on ? Isnt the Tx2 supposed to manage these things including the fan by itself ? and why do I get great performance for about 10 seconds and then it drops ?

After I turned the cpu0-5 to online, I do see 0,3,4,5 cpus active in top command, but the 1,2 cpu doesnt do anything. The active cpus only do 15-20 percent activity.

Ive already seen this
http://elinux.org/Jetson/Performance

I already searched the issue alot, and feel Im stuck.

Thanks.

After I run the power script I check for frequencies:

cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
cat /sys/devices/system/cpu/cpu1/cpufreq/scaling_cur_freq
cat /sys/devices/system/cpu/cpu2/cpufreq/scaling_cur_freq
cat /sys/devices/system/cpu/cpu3/cpufreq/scaling_cur_freq
cat /sys/devices/system/cpu/cpu4/cpufreq/scaling_cur_freq
cat /sys/devices/system/cpu/cpu5/cpufreq/scaling_cur_freq

cat /sys/devices/system/cpu/online

1881600
345600
1267200
1881600
1574400
1420800
0-5

And this is cpu frequencies after I reboot. The reboot turns the fan off, and it seems like the cpu’s are back to the same state as before I ran the power script:

1420800
2035200
2035200
1574400
1267200
1267200
0,3-5

At bootup, I get the following with this command:

more /proc/cpuinfo
processor	: 0
model name	: ARMv8 Processor rev 3 (v8l)
BogoMIPS	: 62.50
Features	: fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer	: 0x41
CPU architecture: 8
CPU variant	: 0x1
CPU part	: 0xd07
CPU revision	: 3

processor	: 3
model name	: ARMv8 Processor rev 3 (v8l)
BogoMIPS	: 62.50
Features	: fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer	: 0x41
CPU architecture: 8
CPU variant	: 0x1
CPU part	: 0xd07
CPU revision	: 3

processor	: 4
model name	: ARMv8 Processor rev 3 (v8l)
BogoMIPS	: 62.50
Features	: fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer	: 0x41
CPU architecture: 8
CPU variant	: 0x1
CPU part	: 0xd07
CPU revision	: 3

processor	: 5
model name	: ARMv8 Processor rev 3 (v8l)
BogoMIPS	: 62.50
Features	: fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer	: 0x41
CPU architecture: 8
CPU variant	: 0x1
CPU part	: 0xd07
CPU revision	: 3

This is identical to the online command:

cat /sys/devices/system/cpu/online
0,3-5

After the power script I get:

more /proc/cpuinfo
processor	: 0
model name	: ARMv8 Processor rev 3 (v8l)
BogoMIPS	: 62.50
Features	: fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer	: 0x41
CPU architecture: 8
CPU variant	: 0x1
CPU part	: 0xd07
CPU revision	: 3

processor	: 1
model name	: ARMv8 Processor rev 0 (v8l)
BogoMIPS	: 62.50
Features	: fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer	: 0x4e
CPU architecture: 8
CPU variant	: 0x0
CPU part	: 0x003
CPU revision	: 0
MTS version	: 37620520

processor	: 2
model name	: ARMv8 Processor rev 0 (v8l)
BogoMIPS	: 62.50
Features	: fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer	: 0x4e
CPU architecture: 8
CPU variant	: 0x0
CPU part	: 0x003
CPU revision	: 0
MTS version	: 37620520

processor	: 3
model name	: ARMv8 Processor rev 3 (v8l)
BogoMIPS	: 62.50
Features	: fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer	: 0x41
CPU architecture: 8
CPU variant	: 0x1
CPU part	: 0xd07
CPU revision	: 3

processor	: 4
model name	: ARMv8 Processor rev 3 (v8l)
BogoMIPS	: 62.50
Features	: fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer	: 0x41
CPU architecture: 8
CPU variant	: 0x1
CPU part	: 0xd07
CPU revision	: 3

processor	: 5
model name	: ARMv8 Processor rev 3 (v8l)
BogoMIPS	: 62.50
Features	: fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer	: 0x41
CPU architecture: 8
CPU variant	: 0x1
CPU part	: 0xd07
CPU revision	: 3

Which is identical to:

cat /sys/devices/system/cpu/online
0-5

I ran the ./jetson_clocks.sh and it shows cpu 1-2 as off with ~/tegrastats:

RAM 704/7854MB (lfb 1652x4MB) cpu [0%@2035,off,off,0%@2035,0%@2035,0%@2035]

Same happens to my udp feed after I run the jetson_clocks.sh aswell.

Disregard all of this, I found the issue, it was a missing ! between my decode stream nvvidconv and omxh264enc for the udp to udp stream. weird thing is, nvvidconv didnt report any error messages.

Just for the reference, I can now run 1x camera feed, then 3x udp to udp streams with 30 fps. with maxP set. if I enable the 2 cores 1-2 they are not used.