- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- increate the valume of open_max_hard and open_max_...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
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
Community
Resources
Forums
Blogs
- 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
08-04-2006 07:41 PM
08-04-2006 07:41 PM
Any body knows how to increase valume of open_max_hard parameter, step by step.
Shardha
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2006 08:32 AM
08-05-2006 08:32 AM
Solutionif its a normal kernel parametr, ie one that is already present in /proc, overwrite it with an echo. echo 3334343 > shmmax for example.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2006 06:26 PM
08-05-2006 06:26 PM
Re: increate the valume of open_max_hard and open_max_soft
If you are speaking about "max open files" parameters, you should tune them using
/etc/security/limits.conf
It's "nofile" parameters.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2006 11:06 PM
08-06-2006 11:06 PM
Re: increate the valume of open_max_hard and open_max_soft
Shardha
http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V40F_HTML/AQ0R3GTE/CHLMTSXX.HTM
5.5.2 Increasing the Maximum Number of Open File Descriptors
You can increase the maximum number of open file descriptors for all processes or for a specific application.
The proc subsystem attributes open-max-soft and open-max-hard control the maximum system-wide number of open file descriptors (open files) for each process. These attributes prevent runaway allocations, such as allocations within a loop that cannot be exited because of an error condition, from consuming all of the available file descriptors. If a process reaches the open-max-soft limit, a warning message is issued. If a process reaches the open-max-hard limit, the process is stopped.
The default value of the open-max-soft and open-max-hard attributes is 4096, which is the maximum system-wide value that you can set in the /etc/sysconfigtab file.
If you have an application that requires many open files, you can increase the open file descriptor limit only for that application, instead of increasing the system-wide limit. To enable extended (64 KB) file descriptors for a specific application, follow these steps:
1. Set the setsysinfo system call's SSI_FD_NEWMAX operation parameter to 1, which sets the utask bit, enables up to 65,536 (64 KB) open file descriptors, and raises the process's hard file limit to 64 KB. This setting is inherited by any child process. See setsysinfo(2) for more information.
2. Set the process's file descriptor soft limit to a value that is more than 4096 (the default value) by using the setrlimit function as shown in the following code fragment:
3.
4. #include
5. struct rlimit *rlp;
6.
7. rlp->rlim_cur = 6000;
8. rlp->rlim_max = 6000;
9. setrlimit(RLIMIT_NOFILE, rlp);
This setting is inherited by any child process. See setrlimit(2) for more information.
10. This step is required only for applications that use the select function's fd_set parameter, which points to an I/O descriptor set, and a FD_CLR, FD_ISSET, FD_SET, or FD_ZERO macro and can modify an I/O descriptor set. If you meet these qualifications, you can use one of two procedures, one that enables a static definition of the maximum number of file descriptors or one that enables a dynamic definition:
o Static definition:
Override the default value of 4096 for FD_SETSIZE in the
#define FD_SETSIZE 65536
#include
This setting is not inherited by child processes; therefore, FD_SETSIZE must be set explicitly in the code for each child process that requires 64 KB file descriptors.
o Dynamic definition:
Instead of using statically-defined fd_set structures, you can use fd_set pointers in conjunction with a malloc function, which provides forward compatibility with any future changes to the maximum file descriptor limit. For example:
fd_set *fdp;
fdp = (fd_set *) malloc(
(fds_howmany(max_fds,FD_NFDBITS))*sizeof(fd_mask));
The value for max_fds is the number of file descriptors to be manipulated. It is recommended that you use the file descriptor soft limit for this value. All other keywords are defined in the
#include
#include
my_program()
{
fd_set *fdp;
struct rlimit rlim;
int max_fds;
getrlimit(RLIMIT_NOFILE, &rlim;);
max_fds = rlim.rlim_cur;
fdp = (fd_set *) malloc(
(fds_howmany(max_fds,FD_NFDBITS))*sizeof(fd_mask));
FD_SET(2, fdp);
for (;;) {
switch(select(max_fds, (fd_set *)0, fdp, (fd_set
*)0,
struct timeval *)0)) {
...
}
In addition, the vfs subsystem attribute max-vnodes must be set high enough for the needs of any application that requires a high number of descriptors. The max-vnodes attribute specifies the number of vnodes (open files), and is set to 5 percent of system memory by default. The recommended setting is 1 vnode for each file descriptor. See Section 5.5.1 for more information.
See Section 4.4 for information about modifying kernel subsystem attributes.
To disable support for up to 64 KB file descriptors for an application, set the setsysinfo system call's SSI_FD_NEWMAX operation parameter to 0, which disables the utask bit and returns the hard file limit to the default maximum of 4096 open file descriptors. However, if the process is using more than 4096 file descriptors, the setsysinfo system call will return an EINVAL error. In addition, if a calling process's hard or soft limit exceeds 4096, the limit is set to 4 KB after the call is successful. This setting is inherited by any child process.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2006 12:31 AM
08-07-2006 12:31 AM
Re: increate the valume of open_max_hard and open_max_soft
you should ask this q. in another forum.