From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Reed, Judith" Newsgroups: gmane.os.tru64.managers Subject: SUMMARY: maximum number of open files in Tru64 v5.1a Date: Wed, 20 Sep 2006 08:05:57 -0400 Message-ID: <77D5A256260DAB4DA1526EC8873715D50128A3DB@NAVEXC.corp.int.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1158753963 7151 80.91.229.2 (20 Sep 2006 12:06:03 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 20 Sep 2006 12:06:03 +0000 (UTC) Original-X-From: tru64-unix-managers-owner-gotm-tru64-unix-managers=m.gmane.org@sws1.ctd.ornl.gov Wed Sep 20 14:06:01 2006 Return-path: Envelope-to: gotm-tru64-unix-managers@gmane.org Original-Received: from sws1.ornl.gov ([160.91.1.101]) by ciao.gmane.org with smtp (Exim 4.43) id 1GQ0pH-0001uw-Gf for gotm-tru64-unix-managers@gmane.org; Wed, 20 Sep 2006 14:05:17 +0200 Original-Received: (qmail 30233 invoked by uid 49509); 20 Sep 2006 12:04:58 -0000 Original-Sender: tru64-unix-managers-owner@ornl.gov Original-Followup-To: poster Precedence: bulk Original-Received: (qmail 30223 invoked by uid 49501); 20 Sep 2006 12:04:57 -0000 Original-Received: from 160.91.4.110 by sws1 (envelope-from , uid 49491) with qmail-scanner-1.25 (clamdscan: 0.83/743. spamassassin: 3.0.2. Clear:RC:0(160.91.4.110):SA:0(-2.6/5.0):. Processed in 1.433824 secs); 20 Sep 2006 12:04:57 -0000 X-Spam-Status: No, hits=-2.6 required=5.0 Original-Received: from emroute3.ornl.gov (160.91.4.110) by sws1.ornl.gov with SMTP; 20 Sep 2006 12:04:56 -0000 Original-Received: from emroute3.ornl.gov ([127.0.0.1]) by emroute3.ornl.gov (PMDF V6.2-1x9 #31246) with ESMTP id <0J5W00442487U7@emroute3.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Wed, 20 Sep 2006 08:04:56 -0400 (EDT) Original-Received: from CONVERSION-DAEMON.emroute3.ornl.gov by emroute3.ornl.gov (PMDF V6.2-1x9 #31246) id <0J5W0050148755@emroute3.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Wed, 20 Sep 2006 08:04:55 -0400 (EDT) Original-Received: from VIRUSCAN-DAEMON.emroute3.ornl.gov by emroute3.ornl.gov (PMDF V6.2-1x9 #31246) id <0J5W0050247P4J@emroute3.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Wed, 20 Sep 2006 08:04:55 -0400 (EDT) Original-Received: from navioml001.navisite.net (navioml001.navisite.com [216.251.225.197]) by emroute3.ornl.gov (PMDF V6.2-1x9 #31246) with ESMTP id <0J5W003F047ORO@emroute3.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Wed, 20 Sep 2006 08:04:37 -0400 (EDT) Original-Received: from navexc.corp.int.com (navexc01.min.navisite-int.com [10.208.9.167]) by navioml001.navisite.net (Postfix) with ESMTP id 37A02B0D91 for ; Wed, 20 Sep 2006 08:04:36 -0400 (EDT) Original-To: tru64-unix-managers@ornl.gov X-Envelope-from: jreed@navisite.com X-MIMEOLE: Produced By Microsoft Exchange V6.5 Thread-Topic: SUMMARY: maximum number of open files in Tru64 v5.1a Thread-Index: AcTGd27KIa7e6HAqQpGoHGjGu4GbnwABC0ygeTzHu7AFcDj2gAa2dwBQAChdGAA= Content-class: urn:content-classes:message X-Spam-Virus: No X-Spam-Checker-Version: SpamAssassin 3.1.5 (2006-08-29) on email.ornl.gov X-Spam-Level: X-Qmail-Scanner-MOVED-X-Spam-Status: No, score=-0.8 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.5 X-MS-Has-Attach: X-MS-TNEF-Correlator: Xref: news.gmane.org gmane.os.tru64.managers:9032 Archived-At: I asked about the maximum number of files a process can open, since performance tuning docs indicate that 4096 is the max you can set with open_max_hard. I got a number of responses, thanks to all who replied.=20 It seems that this is indeed the highest you can set in /etc/sysconfigtab. You can, however, open up to 65536 files by a single process under program control - it just can't be set as a system-wide limit by the admin. Whitney Latta pointed to the "setsysinfo(2)" man page, specifically the section covering SSI_FD_NEWMAX options.=20 James Sainsbury tried writing a wrapper to transfer the higher limit to the wrapper program, and found that the forked subprocess did inherit the higher limit. Jean-marc Vincent pointed out the "sysconfig -Q" option, which shows the max_val for a parameter, useful option to know.=20 # sysconfig -Q proc open_max_hard proc: open_max_hard - type=3DINT op=3DCQ min_val=3D0 max_val=3D4096 Armin Ollig pointed to the man page for "sys_attrs_proc", check out the reference for "open_max_hard" in there - it says the maximum value for "open_max_hard" is 65,536! That is either incredibly misleading, or false, or I'm still missing something. We tried raising the value for this param (and "open_max_soft") above 4096 and rebooting, but you still couldn't raise the process limit in any normal way (ie ulimit) above 4096.=20 Scott passed along a piece of code which demonstrates raising the limit. ------------------------------------------------------------------ #include #include #include =20 main() { struct rlimit rlimit; =20 /* increase the fd limit */ rlimit.rlim_cur =3D rlimit.rlim_max =3D NEW_OPEN_MAX_SYSTEM; if (setsysinfo(SSI_FD_NEWMAX, NULL, 0, NULL, 1) || setrlimit(RLIMIT_NOFILE, &rlimit)) { perror("failed to increase fd limit"); exit(1); } printf ("getdtablesize =3D %d\n", getdtablesize()); } ------------------------------------------------------------------ Thanks very much to everyone who replied! Judith Reed