- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- ulimit options in plain English
Operating System - Linux
1752584
Members
4812
Online
108788
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-03-2009 10:53 AM
тАО05-03-2009 10:53 AM
ulimit
-c The maximum size of core files created
-m The maximum resident set size
-n The maximum number of open file descriptors (most systems do not allow this value to be set)
I want to understand the above ulimit options in plain English, esp the last one (-n)
the IBM domino server, runs via an ordinary user 'notes', so before become 'notes'
# ulimit -n 40000
# su - notes
and then run the domino server.
Ok, one more thing
# ulimit -n
1024
while
# cat /proc/sys/fs/file-max
205044
why the difference ? which one is wrong ?
Regards
Maaz
-c The maximum size of core files created
-m The maximum resident set size
-n The maximum number of open file descriptors (most systems do not allow this value to be set)
I want to understand the above ulimit options in plain English, esp the last one (-n)
the IBM domino server, runs via an ordinary user 'notes', so before become 'notes'
# ulimit -n 40000
# su - notes
and then run the domino server.
Ok, one more thing
# ulimit -n
1024
while
# cat /proc/sys/fs/file-max
205044
why the difference ? which one is wrong ?
Regards
Maaz
Solved! Go to Solution.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-03-2009 10:31 PM
тАО05-03-2009 10:31 PM
Re: ulimit options in plain English
During our oracle install in Red Hat. this is the way I set up for oracle user
To make these changes, run the following as root:
cat >> /etc/security/limits.conf < oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
EOF
cat >> /etc/pam.d/login < session required /lib/security/pam_limits.so
EOF
Update the default shell startup file for the "oracle" UNIX account.
* For the Bourne, Bash, or Korn shell, add the following lines to the /etc/profile file by running the following command:
cat >> /etc/profile < if [ \$USER = "oracle" ]; then
if [ \$SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
EOF
To make these changes, run the following as root:
cat >> /etc/security/limits.conf <
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
EOF
cat >> /etc/pam.d/login <
EOF
Update the default shell startup file for the "oracle" UNIX account.
* For the Bourne, Bash, or Korn shell, add the following lines to the /etc/profile file by running the following command:
cat >> /etc/profile <
if [ \$SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
EOF
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-04-2009 02:45 PM
тАО05-04-2009 02:45 PM
Solution
ulimit and /etc/security/limits.conf control per-session limits. The things under /proc are mostly system-wide limits.
-c is the maximum size for core dumps. The most common settings I've seen are "0" to disable core dumps and "unlimited" because truncated core dumps are probably not useful.
-m is a limit on resident memory size, but I'm not sure if that specific ulimit is honored on Linux or if the option is just there for compatibility.
-n is a limit on open file descriptors. Open files, network connections, and some IPCs all use file descriptors.
Off the top of my head I don't remember if -m and -n set the limits for each process or for the entire session, but most proper UNIX daemons end up with their own sessions anyway.
-c is the maximum size for core dumps. The most common settings I've seen are "0" to disable core dumps and "unlimited" because truncated core dumps are probably not useful.
-m is a limit on resident memory size, but I'm not sure if that specific ulimit is honored on Linux or if the option is just there for compatibility.
-n is a limit on open file descriptors. Open files, network connections, and some IPCs all use file descriptors.
Off the top of my head I don't remember if -m and -n set the limits for each process or for the entire session, but most proper UNIX daemons end up with their own sessions anyway.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP