htop and TX2

When I run htop, I just get four CPU cores. How does one see the utilization of all the CPU cores nvidia@tegra-ubuntu:~/1$ cat /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

Probably you have the Denver cores (1 & 2) disabled.
Try :

sudo nvpmodel -m0  #or -m2

and give htop a new trial to see if it has changed.

Thanks that worked. I wonder why the cores are disabled by default…

Mainly for saving power…although in some cases this is not what we are looking for !
For performance you may also try the jetson_clocks.sh script in ubuntu or nvidia home directory.
And if you are not looking for power saving and intend to use USB devices, you may also disable usb core autosuspend in extlinux.conf.

Thanks. We are looking at some performance tests for the X2. I appreciate any pointers you can give me for adjusting and running the various cores.

You can control if each core is on/off with

sudo cat /sys/devices/system/cpu/cpu*/online

(be careful cpu0 has no online node and is not listed, only cores 1 to 5). But you may not be able to change it this way.
You may also adjust frequencies. Having a look to jetson_clocks.sh script could help a lot.

In short, using this will give you most of performance:

sudo nvpmodel -m0
sudo /home/ubuntu/jeston_clocks.sh

Checking clocks should display something like:

sudo /home/ubuntu/jeston_clocks.sh -show
SOC family:tegra186  Machine:quill
Online CPUs: 0-5
CPU Cluster Switching: Disabled
cpu0: Gonvernor=schedutil MinFreq=2035200 MaxFreq=2035200 CurrentFreq=2035200
cpu1: Gonvernor=schedutil MinFreq=2035200 MaxFreq=2035200 CurrentFreq=2035200
cpu2: Gonvernor=schedutil MinFreq=2035200 MaxFreq=2035200 CurrentFreq=2035200
cpu3: Gonvernor=schedutil MinFreq=2035200 MaxFreq=2035200 CurrentFreq=2035200
cpu4: Gonvernor=schedutil MinFreq=2035200 MaxFreq=2035200 CurrentFreq=2035200
cpu5: Gonvernor=schedutil MinFreq=2035200 MaxFreq=2035200 CurrentFreq=2035200
GPU MinFreq=1300500000 MaxFreq=1300500000 CurrentFreq=1300500000
EMC MinFreq=40800000 MaxFreq=1866000000 CurrentFreq=1866000000 FreqOverride=1
Fan: speed=255

NVIDIA has done some of the work for you in the tool nvpmodel. Here’s a short article summarizing usage:

The different modes represent the best energy/performance tradeoffs for clock frequencies of the different CPU clusters and GPU.

I read, while trying to find out just what a Denver CPU is, that the Denvers are not wonderful at multi-threading but the other 4 are. Design accordingly.

So if I create a program using pthreads and spawn several threads, they will evenly distribute across all 6 cores (including the Denver cores)… ?

K-

Yes.

Do keep in mind that if you spawn many threads which are bound by I/O to outside devices (e.g., cameras over CSI/MIPI, GPIO, USB, ethernet) then although the software threads can work on all cores that you will still be bottlenecked by your method of I/O.

That makes sense.
Thx.
K-