Strange behavior when changing power mode.

Hi,

I measure ip camera latency by Xavier and LED.
When I changed power mode by nvpmodel and jetson_clock.sh, the latency on Mode 2 was lower than on Mode 0.
Why is this? Intuitively, the latency on Mode 0 seems to be lower than Mode 2.
This event happened when using H.264. When using MJPEG, the latency was no difference between MODE 0 and MODE 2.

import numpy as np
import cv2
import argparse
import time
import RPi.GPIO as GPIO

output_pin1 = 18 # BOARD pin 12, BCM pin 18
#pixel = (1335, 335) #(x,y)

def main():
    url = "rtsp://******@193.168.0.**/axis-media/media.amp?rate=0&videocodec=h264&resolution=1920x1080&fps=30&clock=0&camera=1&compression=0" 


    test_result = np.loadtxt("pixel_index.txt")
    pixel = (int(test_result[0]), int(test_result[1]))
    
    cap = cv2.VideoCapture()
    cap.set(cv2.CAP_PROP_BUFFERSIZE,1)
    cap.open(url)

    GPIO.setmode(GPIO.BCM)
    # set pin as an output pin with optional initial state of HIGH
    GPIO.setup(output_pin1, GPIO.OUT, initial=GPIO.LOW)
    start = -1000000
    i = 0
    j = 0
    try:
        while(True):
            ret, frame = cap.read()
            if frame[pixel[1], pixel[0]][2] > 100:
                stop = time.time()
                print(stop*1000 - start*1000) 
                GPIO.output(output_pin1, GPIO.LOW)
                break
            i = i+1
            if i >= 100 and j == 0 :
                #start = time.time()
                GPIO.output(output_pin1, GPIO.HIGH)
                start = time.time()
                i = 0
                j = 1
    finally:
        GPIO.cleanup()

if __name__ == '__main__':
    main()

Hi ataka
The 0 means without any power consumption limit.
Below are the detail information for the models.

Mode Name MAXN 10W 20W 20W 20W
Power budget n/a 10W 20W 20W 20W
Mode ID 0 1 2 3 4
Online CPU 6 2 6 4 2
CPU maximal frequency (MHz) 2000 1200 1300 1500 2000

Hi Shane

I use Jetson Xavier.
So, the power mode is like below site.
https://www.jetsonhacks.com/2018/10/07/nvpmodel-nvidia-jetson-agx-xavier-developer-kit/

I know the mode 0 meaning.
I’d like to know why mode 2 performance was greater than mode 0 on my experiment.
Thanks

No sure if the mode 0 trigger the thermal event to throttle the system.
Could you check the thermal and have external fan to make it cool to try.

Thank you for your advice.

I checked the thermals on cpu and gpu by below command.

cat  /sys/devices/virtual/thermal/thermal_zone0/temp 
cat  /sys/devices/virtual/thermal/thermal_zone1/temp

The values were less than 30000 in mode 0.
So, probably this cause is not thermal things.

Could you check the tegrastats for the different mode?
sudo tegrastats