Main Content

Recommended System Limits forMacintoshandLinux

If you use a UNIX®system (Linux®orMacintosh), it is recommended that you adjust your operating system limits. Check and set limits with theulimitorlimitcommand, depending on your installation. Note that these commands might require root access.

系统限制 Recommended Value Option (ulimit) Option (limit)

Maximum number of user processes

23741

-u

maxproc

Maximum number of open file descriptors

4096

-n

descriptors

For example, these commands set the maximum number of user processes.

ulimit - u 23741 limit maxproc 23741

Changing a limit inside a shell affects only that shell and any subsequent MATLAB®sessions you start there. To make this setting persistent system-wide, you must modify the relevant file.

  • Linux – Modify thelimits.conffile.

  • Macintosh– Modify plist files, such aslimit.maxfiles.plistandlimit.maxproc.plist.

For assistance, check with your system administrator.

For more information onulimit,limit, orlimits.conf, see their man pages.

Without these settings, large parallel pools can error, hang, or lose workers during creation. These problems occur when MATLAB attempts to create more user processes or file handles than your operating system allows.

If you use a cluster of machines, you must set the maximum number of user processes for each machine.

Related Topics

Baidu
map