Unix/Linux system process resource limit parameters

Source: Internet
Author: User

The following list contains the single-process resource parameter limits for Unix/Linux systems. The rlimit_core parameter is much used in server development (when core dump is required ).

Code snippet:

                memset(&limit, 0, sizeof(limit)); limit.rlim_cur = RLIM_INFINITY; limit.rlim_max = RLIM_INFINITY; if(setrlimit(RLIMIT_CORE, &limit)) {spd_log(LOG_WARNING, " unable to disable core size res limit %s\n", strerror(errno)); } if(getrlimit(RLIMIT_CORE, &limit)) {spd_log(LOG_WARNING, "unable to check rlimit of fd%s\n", strerror(errno));}

Name Meaning
Rlimit_as Maximum memory size available to processes
Rlimit_core The maximum size of the core file. If it is 0, the core file cannot be created.
Rlimit_cpu Maximum CPU time (unit: seconds)
Rlimit_data Maximum Data Segment Size
Rlimit_fsize Maximum size of the created File
Rlimit_locks Maximum number of file locks that can be created by a process
Rlimit_memlock Use mlock to lock the maximum memory size in the process
Rlimit_nofile Maximum number of files opened in a process
Rlimit_nproc Maximum number of sub-processes per real User ID
Rlimit_rss Maximum size of resident storage Zone
Rlimit_sbsize Maximum Socket buffer size
Rlimit_stack Maximum stack size
Rlimit_vmem = Rlimit_as

 

Platform support

Restrictions

FreeBSD 5.2.1

Linux 2.4.22 Mac OS X 10.3 Solaris 9
Rlimit_as N   N  
Rlimit_core        
Rlimit_cpu        
Rlimit_data        
Rlimit_fsize        
Rlimit_locks N   N N
Rlimit_memlock       N
Rlimit_nofile        
Rlimit_nproc       N
Rlimit_rss       N
Rlimit_sbsize   N N N
Rlimit_stack        
Rlimit_vmem   N N

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.