Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* Re: FDS, file-max?
@ 1998-07-30 13:16 Greg Lindahl
  0 siblings, 0 replies; 11+ messages in thread
From: Greg Lindahl @ 1998-07-30 13:16 UTC (permalink / raw)
  To: axp-list

> My system needs to have file-max set very high.  What is usually a good
> number to set that to?  Does the file-max have any relations to other
> things needed by the kernel?  I'm just asking this because when I have my
> file-max left at default (1024) the machine crashes after a few days, but
> when I set it to 4096 or higher it will be up for about 5 to 10 days.  It
> always crashes with the same error on console "no free inodes, contact
> Linus".  

As I think someone's mentioned before, you really need to up the
inode max as well:

cat 4096 > /proc/sys/kernel/inode-max

There may be a kernel restriction that if you have N files open, you
need a minimum of N inodes. If we're seeing a bug where the kernel
doesn't actually properly close open files, then you're getting an
ever-increasing # of open files, and the inode limit is what you're
hitting. Once you've upped the inode limit, you'll go back to running
into the fd limit after being up for a while longer.

-- g


^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: FDS, file-max?
@ 1998-07-31 14:32 Greg Lindahl
  1998-07-31 14:55 ` Barrett G. Lyon
  0 siblings, 1 reply; 11+ messages in thread
From: Greg Lindahl @ 1998-07-31 14:32 UTC (permalink / raw)
  To: axp-list

> I agree, but I am not a kernel programmer.  If there is a problem, it
> really needs to be fixed.  But from where I am standing, I feel like I
> can do nothing about the problem, except enjoy my system crashing.  I
> wonder what it would take to get someone to look into it?

The folks who know how to investigate this apparently don't have the
problem at all. I've been making suggestions as to how anyone seeing
the problem could isolate it; you could follow them and report back.

Recipe:

1) Increase file-max and inode-max
2) Monitor your system over time to see if:
  2a) some processes have many fd's open, by checking /proc/*
  2b) the actual number of fd's used (/proc/sys/kernel/file-nr)
      steadily increases over time

If a program simply isn't closing its fd's, you will see many
processes in /proc/* with many fd's.

If not, and file-nr keeps on increasing, it's a kernel bug where
the kernel is not reusing fd's.

-- g


^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: FDS, file-max?
@ 1998-07-31 12:31 Greg Lindahl
  1998-07-31 14:14 ` Barrett G. Lyon
  0 siblings, 1 reply; 11+ messages in thread
From: Greg Lindahl @ 1998-07-31 12:31 UTC (permalink / raw)
  To: axp-list

> This is not a good thing.  Simply increasing the number of files is NOT a
> good idea.  This sounds like it could be some sort of real kernel problem.
> More likely, some other progam is opening files and never closing
> them...

The purpose of increasing file-max and inode-max is to diagnose the
problem. For example, your theory is already disproved. One process
can only have 256 files open maximum. Thus, it takes at least 16
processes with all their files open to fill up 4096 fds, and the
repeating lsof showed that there weren't that many processes out there
with many fds open.

I think this is clearly a kernel problem where fds of closed files are
not reused.

Increasing file-max is an important diagnostic tool. If no one ever
methodically diagnoses the problem, it will continue to be present for
a long time.

-- g


^ permalink raw reply	[flat|nested] 11+ messages in thread
* FDS, file-max?
@ 1998-07-29 23:16 Barrett G. Lyon
  1998-07-30 16:48 ` Keith Baker
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Barrett G. Lyon @ 1998-07-29 23:16 UTC (permalink / raw)
  To: axp-list

[-- Attachment #1: Type: text/plain, Size: 693 bytes --]



My system needs to have file-max set very high.  What is usually a good
number to set that to?  Does the file-max have any relations to other
things needed by the kernel?  I'm just asking this because when I have my
file-max left at default (1024) the machine crashes after a few days, but
when I set it to 4096 or higher it will be up for about 5 to 10 days.  It
always crashes with the same error on console "no free inodes, contact
Linus".  

Any information on this would be great.

-Barrett


--
Barrett G. Lyon                                 
Data & Network Security Consultant                Fax: 310-737-0196
Network Presence, LLC                           Email: blyon@netpr.com
--

[-- Attachment #2: Type: application/pgp-signature, Size: 191 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~1998-07-31 15:38 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-07-30 13:16 FDS, file-max? Greg Lindahl
  -- strict thread matches above, loose matches on Subject: below --
1998-07-31 14:32 Greg Lindahl
1998-07-31 14:55 ` Barrett G. Lyon
1998-07-31 15:13   ` Paul Tomblin
1998-07-31 15:34     ` Barrett G. Lyon
1998-07-31 12:31 Greg Lindahl
1998-07-31 14:14 ` Barrett G. Lyon
1998-07-29 23:16 Barrett G. Lyon
1998-07-30 16:48 ` Keith Baker
1998-07-30 22:09 ` scorpio
     [not found] ` <Pine.BSI.3.95.980730124121.7465A-100000@shell1.cybercom.ne t>
1998-07-31  4:32   ` Barrett G. Lyon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox