px2 Real-time process performance

platforms px2 :
Linux nvidia 4.9.38-rt25-tegra #1 SMP PREEMPT RT Mon Jan 8 01:00:48 PST 2018 aarch64 aarch64 aarch64 GNU/Linux

application: have 5 processes

process0: from ttyUSB0 read data and record the receive time; cpu : 40%
process1: from ttyUSB1 read data cpu : 15%
process2: from ttyUSB2 read data cpu : 5%
process3: cap from camera and record image cpu : 80%
process4: the algorithm sdk cpu : 100%

my question:
process0 the recorded and adjacent receive time difference is too large to reach 100ms.
change the process0 for sched_fifo and set cpu affinity to CPU0 and CPU1,the time difference is 20ms
but that is still too large for me.
my goal is < 10ms

any has ideas ?

Dear alex_wang,

If this topic is related to an optimization issue, could you please check your application using “NVIDIA System Profiler” https://docs.nvidia.com/drive/devtools/nsp/3.9/index.html ?

the “NVIDIA System Profiler” is only one tool for me to trace,
but i need a solution to fix my question.

Now I have got that the cpu resource of process0 is seized by the system services,
which resulting in the delay for process0.


Do you check our DriveWorks sample?

It may give you some idea to do optimization.