OK, here’s from the archives. Seems to me this comes up often enough
someone should add this this to the qdn knowledgebase:
From quics!jshogg Fri Oct 8 18:11:55 1999
Xref: quics quics.experts.fsys:6349
Newsgroups: quics.experts.fsys
Path: quics!jshogg
From: jshogg@qnx.com (Jay Hogg)
Subject: Re: EMFILE on a lightly loaded system
Organization: Gateway Technologies
Message-ID: <FJ7CJv.oF4@qnx.com>
References: <FJ42II.72z@qnx.com> <FJ5D8p.35J@qnx.com>
<7tfji5$f2l$1@gateway.qnx.com> <FJ6pun.6tK@qnx.com> <FJ75Bz.Bu4@qnx.com>
<FJ77DD.8En@qnx.com> <FJ78Ju.Itp@qnx.com>
Distribution: quics
X-Newsreader: TIN [version 1.2 PL2]
Date: Wed, 6 Oct 1999 22:16:43 GMT
I must be missing something here:
It guessed 63k as a starting point…
It grew to 320k then ran out of heap…
So I should bump the initial guess to ~84k
And it can now grow to ???
A funny thing here is some systems run just fine and others
have this problem on a regular basis.
Jay
John Garvey (jgarvey@qnx.com) wrote:
Jay Hogg (> jshogg@qnx.com> ) wrote:
Thank you John!
Sorry for not catching it sooner, the EMFILE/ENFILE fooled me (and
still has), but I should have looked more thoroughly at your logs.
I have been pretty swamped recently though >
How about a hint to what it should be since ‘-H’ isn’t documented
and I don’t know what is in it to calculate it?
(ps, fsysinfo doesn’t show it >
That is why I put the internal guess into the trace message; from
yours it is 63k ------------------v
(e l i f )
Oct 04 20:22:38 2 00003024 0000F7B1 0004E781 656C6966
and grows to 320k --------------------------^
once known space for files/inodes/names/etc has been added. Problem
is the low initial guess steals off the known values for bitmap
tables, and you run out of files/inodes/etc instead.
So, for 28Gig of writable disk, I think you’ll need an extra 20k, so
try “-H86016” (it doesn’t perform nice parsing).
If it still happens (now you know what the traceinfo message is), you
can up it later (or if memory is readily available, up it some more
right now >
[BTW, this is not a particularly nice area of Fsys/Fsys.* at all >
There are some games I could play with the GDT/LDT, but this has its
downsides as well. I have revised the guesses a couple of times, but
it looks like it may be time to up it again.]
From quics!jgarvey Fri Oct 8 18:11:55 1999
Xref: quics quics.experts.fsys:6350
Newsgroups: quics.experts.fsys
Path: quics!jgarvey
From: jgarvey@qnx.com (John Garvey)
Subject: Re: EMFILE on a lightly loaded system
Organization: QNX Software Systems
Message-ID: <FJ8u84.qw@qnx.com>
References: <FJ42II.72z@qnx.com> <FJ5D8p.35J@qnx.com>
<7tfji5$f2l$1@gateway.qnx.com> <FJ6pun.6tK@qnx.com> <FJ75Bz.Bu4@qnx.com>
<FJ77DD.8En@qnx.com> <FJ78Ju.Itp@qnx.com> <FJ7CJv.oF4@qnx.com>
Distribution: quics
X-Newsreader: TIN [version 1.2 PL2]
Date: Thu, 7 Oct 1999 17:36:05 GMT
Jay Hogg (jshogg@qnx.com) wrote:
I must be missing something here:
It guessed 63k as a starting point…
It grew to 320k then ran out of heap…
So I should bump the initial guess to ~84k
And it can now grow to ???
It cannot grow, that is the problem. It must be pre-grown to a
size large enough to hold the expected number of malloc()s.
So: ‘pregrow_heap’ = ‘known_requirements’ + ‘unknown_requirements’.
‘known_requirements’ are simple to calculate: the sum of ‘-f’, ‘-i’,
‘-C’, etc tables. In your case this came to (320-63)k = 257k.
‘unknown_requirements’ is the problem; each disk/device/partition
needs some memory (will depend on the number of disks), and the
“.bitmap” caches too (depends on size of those disks). This is
where the guess factor comes in - in your case it was 63k. It
is this value that you can override with ‘-H’; the amount of
‘known_requirements’ is always added onto this.
However, since it is all just heap, an incorrect drive guess will
just steal away from the known requirements (which aren’t actually
allocated until needed, hence all the fields in “fsysinfo”) and
give you your problems later on. I guess I could track the delta
between the guess and the actual as you mount/unmount, and log a
message when this number goes negative … may be useful …
Anyway, with my suggestion, heap = 257k (known) + 84k (-H guess) = 341k.
Allocated up front, no growing, fullstop.
From quics!jgarvey Fri Oct 8 18:11:55 1999
Xref: quics quics.experts.fsys:6353
Newsgroups: quics.experts.fsys
Path: quics!jgarvey
From: jgarvey@qnx.com (John Garvey)
Subject: Re: EMFILE on a lightly loaded system
Organization: QNX Software Systems
Message-ID: <FJAEGK.FLL@qnx.com>
References: <FJ42II.72z@qnx.com> <FJ5D8p.35J@qnx.com>
<7tfji5$f2l$1@gateway.qnx.com> <FJ6pun.6tK@qnx.com> <FJ75Bz.Bu4@qnx.com>
<FJ77DD.8En@qnx.com> <FJ78Ju.Itp@qnx.com> <FJ7CJv.oF4@qnx.com>
<FJ8u84.qw@qnx.com> <FJ8yCA.560@qnx.com> <FJ94vF.8yF@qnx.com>
Distribution: quics
X-Newsreader: TIN [version 1.2 PL2]
Date: Fri, 8 Oct 1999 13:50:45 GMT
Rob Hem (rhem@qnx.com) wrote:
I think we’ve got a similar problem…
Did you get those messages in the tracelog?
Two hard drives:
hd0 - 4 G w/ 2 partitions
hd1 - 70 G w/ 1 partition
Any recomendations for the -H option?
Big disk: try “-H215040”.
andy@microstep-mis.com wrote:
David Gibbs <> dagibbs@qnx.com> > wrote:
“Bill Caroselli (Q-TPS)” <> QTPS@earthlink.net> > wrote:
I recall way back when that there was an undocumented -H option to Fsys or
one of its drivers.
Fsys does take an undocumented -H option that takes parameters. (At least,
the getopt string in the binary sure looks that way. >
Can you specify parameter of -H options without > > ?
-David
QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.