R36.x has a major performance regression over R35.x. The problem is all PCIe MSI interrupts are now routed to CPU 0 whereas they used to be distributed across all CPU cores. For any workload requiring high I/O bandwidth, e.g. multiple NVME devices, this results in lower performance and system lock ups due to CPU 0 being overwhelmed with interrupts.
There was an earlier thread on this issue but with no solution: [Orin NX R36.2 cannot change IRQ smp affinity - #7 by thegtx25]
I’ve ported the original code and changed it around slightly so it doesn’t change kernel behaviour for other platforms. I also increased the number of available MSIs to the maximum 352, helpful when dealing with large numbers of NVMe devices, which allocate an MSI for each CPU core.
I’m posting the patch here in case it’s useful for others, and in the hope that this patch or something based on it could be incorporated into future R36.x releases to address this problem.
It’s very easy to reproduce the issue on the AGX Orin Developer kit. Simply attach two NVMe SSDs (I used Samsung 980 Pro, but any high performance SSDs would do), one in M.2 slot C4 and the other in C5 with an adapter board.
Create fio configuration files for each device (replace nvme0 with nvme1 for the 2nd device):
[global]
thread
ioengine=libaio
iodepth=8
direct=1
bs=1M
[device0]
filename=/dev/nvme0n1
- Run fio to read from one device - performance was about 4GiB/s and 80-90% of CPU 0 time spent handling interrupts.
- Run a second instance of fio to read from the other device - CPU 0 locks up, ssh connections timeout, display freezes, GPU time outs appear in the kernel logs and the system becomes unusable.
With the patch, both fio processes read at 4GiB/s and system is stable.
msi-patch-kernel.txt (15.7 KB)
msi-patch-dt.txt (4.4 KB)