Proper use of CUDA MPS?

is anyone here familiar with the usage of CUDA MPS on Jetson Orin devices?

Historically MPS has not been available on Tegra devices, but they brought MPS to Jetson with Jetpack 6.1/CUDA 12.5. ref: Jetson Orin with JetPack6.1 support MPS? - #6 by AastaLLL
“MPS (Multi-process service) is now supported on L4T and embedded-Linux Tegra platforms”

I have an Orin NX 8GB with Jetpack 6.2/CUDA 12.6 that I am trying to use MPS on. I’m familiar with MPS and use it regularly on my x64/PCIe machines, but this is the first time trying to use it on the Jetson platform. nothing in the documentation indicated that the usage is any different.

however when starting the MPS daemon (nvidia-cuda-mps-control -d), it will not automatically initiate the MPS server when CUDA applications start like what happens on the x64 systems. so I tried to manually start the server, which I can start it, but then the client applications do not hook into the MPS server process like it should. they run independently of MPS and the MPS server lists no client IDs (ie no application running under MPS).

tried setting EXCLUSIVE_PROCESS, but that is not allowed on Tegra
tried starting MPS with the -multiuser-server argument, again, not allowed on Tegra.

anyone using it successfully? what is the secret sauce? or is it just broken?

Hi,

MPS can work on JetPack 6.2.

For example: testing with the below document:
https://docs.nvidia.com/deploy/mps/index.html#on-a-single-user-system

$ export CUDA_VISIBLE_DEVICES=0 
$ export CUDA_MPS_PIPE_DIRECTORY=/tmp/nvidia-mps
$ export CUDA_MPS_LOG_DIRECTORY=/tmp/nvidia-log
$ nvidia-cuda-mps-control -d
$ nvidia-cuda-mps-control 
start_server -uid 1000       
get_server_list
21677
$ echo quit | nvidia-cuda-mps-control

Then we can find it works normally from the log under /tmp/nvidia-log:
control.log

[2025-06-27 05:47:10.306 Control 21732] Starting control daemon using socket /tmp/nvidia-mps/control
[2025-06-27 05:47:10.306 Control 21732] To connect CUDA applications to this daemon, set env CUDA_MPS_PIPE_DIRECTORY=/tmp/nvidia-mps
[2025-06-27 05:47:10.306 Control 21732] CUDA MPS Control binary version: 12060
[2025-06-27 05:47:17.509 Control 21732] Accepting connection...
[2025-06-27 05:47:17.509 Control 21732] NEW UI
[2025-06-27 05:47:21.960 Control 21732] Cmd:start_server -uid 1000
[2025-06-27 05:47:21.961 Control 21736] Starting new server 21736 for user 1000
[2025-06-27 05:47:21.965 Control 21732] Accepting connection...
[2025-06-27 05:47:21.965 Control 21732] Accepting connection...
[2025-06-27 05:47:22.083 Control 21732] NEW SERVER 21736: Ready
[2025-06-27 05:47:27.482 Control 21732] Cmd:get_server_list
[2025-06-27 05:47:27.482 Control 21732] 21736
[2025-06-27 05:47:29.979 Control 21732] UI closed
[2025-06-27 05:48:16.103 Control 21732] Accepting connection...
[2025-06-27 05:48:16.103 Control 21732] NEW UI
[2025-06-27 05:48:16.103 Control 21732] Cmd:quit
[2025-06-27 05:48:16.103 Control 21732] Try shutting down server 21736, backoff is disabled
[2025-06-27 05:48:16.124 Control 21732] Server 21736 exited with status 0
[2025-06-27 05:48:16.124 Control 21732] Exit with status 0

server.log

[2025-06-27 05:47:21.965 Other 21736] Startup
[2025-06-27 05:47:21.965 Other 21736] Connecting to control daemon on socket: /tmp/nvidia-mps/control
[2025-06-27 05:47:21.965 Other 21736] Initializing server process
[2025-06-27 05:47:22.025 Server 21736] Creating server context on device 0 (Orin)
[2025-06-27 05:47:22.083 Server 21736] Created anonymous shared memory region mps.shm.1000.21736
[2025-06-27 05:47:22.083 Server 21736] CUDA MPS Server for Linux/Unix. Binary version: 12060
[2025-06-27 05:47:22.083 Server 21736] Active Threads Percentage set to 100.0
[2025-06-27 05:47:22.083 Server 21736] Server Priority set to 0
[2025-06-27 05:47:22.083 Server 21736] Server has started
[2025-06-27 05:48:16.103 Server 21736] Server has been notified to shutdown
[2025-06-27 05:48:16.103 Server 21736] Waiting for current clients to finish
[2025-06-27 05:48:16.103 Server 21736] Exiting

Thanks.

Yes that’s exactly the commands that I have sent but the daemon never starts a server. The daemon is runnning but no server.

First, on my x64 based normal computers, it is not necessary to manually start a server like that. It detects when a CUDA app is running and attaches to the server. But here it doesn’t do that. And when I manually start the server just as you have done, the CUDA apps still do not attach to the server and are not listed with the get_client_list command

There is no update from you for a period, assuming this is not an issue anymore.
Hence, we are closing this topic. If need further support, please open a new one.
Thanks
~0716

Hi,

Could you share the app you tried to run so we can check it further?
Thanks.