Linux Resource Limit level rollup

Source: Internet
Author: User

Linux resource limitations can be categorized into system-level and kernel-level:

First: System-level limitations:

/etc/security/limits.conf


The limits.conf format is as follows:
username| @groupname Type Resource limit
username| @groupname: Sets the user name that needs to be restricted, the group name is preceded by the @ and the user name differs. You can also use the wildcard character * to restrict all users.
Type: Has Soft,hard and-,soft refers to the setting value that the current system is in effect for. Hard indicates the maximum value that can be set in the system. The soft limit cannot be higher than the hard limit. -The soft and hard values are also set.
Resource
Core-limits the size of the kernel file
Date-Maximum data size
Fsize-Maximum file size
Memlock-Maximum lock memory address space
Nofile-Maximum number of open files
RSS-Maximum Persistent setting size
Stack-Maximum stack size
CPU-Maximum CPU time in minutes
Noproc-Maximum number of processes
As-address space limitations
Maxlogins-Maximum number of logons allowed by this user


For the limits.conf file configuration to take effect, you must make sure that the pam_limits.so file is added to the startup file.
View/etc/pam.d/login file with: (not added)
Session required/lib/security/pam_limits.so
Attention:
A lot of people have set up limitc.conf no test, the test found not effective, most of the reasons are:
32-bit System session required/lib/security/pam_limits.so
64-bit System session required/lib64/security/pam_limits.so

Second: Apply software-level limitations:

This is more common, such as nginx in this piece is better

Third: Kernel-level limitations:

This is more, I slowly collect

Linux Resource Limit level rollup

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.