Modify Ulimit parameters under Mac OS X

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.