Update System Resources

NvSciIpc needs to open endpoint-related resources such as shared memory, message queues, and device node. When the number of endpoints increases, the number of resources to open also increases, and it can exceed the system resource limit, which leads to NvSciIpc failure at initialization.

The following system resources are important:
  • RLIMIT_NOFILE – maximum number of files to open
  • RLIMIT_MSGQUEUE – maximum number bytes to be allocated for message queue

The resources can be increased in /etc/security/limits.conf.

$cat /etc/security/limits.conf
* hard nofile 32768
* soft nofile 32768
* hard msgqueue 18874368
* soft msgqueue 18874368
root hard msgqueue 18874368
root soft msgqueue 18874368
  
#Check your current resource limits using "ulimit -a" command then compare it to above settings.
#If your limits are lower than recommended values, you have to update them.
$sudo sed -i '$ a * hard nofile 32768' /etc/security/limits.conf
$sudo sed -i '$ a * soft nofile 32768' /etc/security/limits.conf
$sudo sed -i '$ a * hard msgqueue 18874368' /etc/security/limits.conf
$sudo sed -i '$ a * soft msgqueue 18874368' /etc/security/limits.conf
$sudo sed -i '$ a root hard msgqueue 18874368' /etc/security/limits.conf
$sudo sed -i '$ a root soft msgqueue 18874368' /etc/security/limits.conf
Note:

Existing sessions still have old limit values.

To apply new limits, reboot the system or use a new session (login).

/etc/security/limits.d/nofile.conf overrides the settings in the /etc/security/limits.conf during boot time.