Update System Resources

NvSciIpc must 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 two system resources are updated to support max endpoint count:
  • 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.d/driveos-limits.conf.

$cat /etc/security/limits.d/driveos-limits.conf
* hard nofile 131072
* soft nofile 131072
root hard nofile 131072
root soft nofile 131072
* hard msgqueue 134217728
* soft msgqueue 134217728
root hard msgqueue 134217728
root soft msgqueue 134217728
  
#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.
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/driveos-limits.conf overrides the settings in the /etc/security/limits.conf during boot time.

Regarding msgqueue, NvSciIpc has one more tuning point in /etc/sysctl.conf.

$cat /etc/sysctl.conf
fs.mqueue.msg_max=256
fs.mqueue.queues_max=16384

#Check your current resource limits using "sysctl fs.mqueue.msg_max" and "sysctl fs.mqueue.queues_max" command, and compare it to upper setting.
#If your limits are lower than recommended values, you have to update them.
Note:

To apply new limits, reboot the system or execute the sudo sysctl -p command.