OS X under Leopard, Yosemite version of the operating system, modify the Ulimit command default program is LAUNCHD.
The default Ulimit command inherits from Launchd, and the default limits parameters are as follows:
Daviddemacbook-pro:etc david$ sudo launchctl limit
Password:
CPU Unlimited Unlimited
FileSize Unlimited Unlimited
Data Unlimited Unlimited
Stack 8388608 67104768
Core 0 Unlimited
RSS Unlimited Unlimited
Memlock Unlimited Unlimited
Maxproc 709 1064
Maxfiles 256 Unlimited
If you need to modify Ulimit related parameters because of the small number of socket connections, you can follow these steps:
1. Add this line to the file in/etc/launchd.conf (if no, you need to create an account with root privileges):
echo "Limit maxfiles 65535 Unlimited" | sudo tee-a/etc/launchd.conf
The tee command waits for user input and writes the input to the specified file, and the-a parameter indicates that the add is append.
2. In this session, the LANUCHD command has been launched; If you want the configuration to take effect in any session of any user, the easiest way to do this is to reboot the server.
If you need to modify additional parameters, you only need to append to the/etc/launchd.conf file with the >> command.
Note:
----------------------------------------------------
1. Above
65535 Unlimited
These 2 parameters are set soft and hard values.
2. The Linux distribution Redhat/centos configuration is different from OS X, as follows:
vi/etc/security/limits.conf
# noproc number of processes, Nofile file open
# Soft soft limits, can be changed in the process of the program.
# Hard hard limit, the program can not be arbitrarily changed, unless you have root permissions.
* Soft Noproc 11000
* Hard noproc 11000
* Soft nofile 4100
* Hard Nofile 4100