Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* fork: Cannot allocate memory
@ 1999-06-09 21:08 furio ercolessi
  1999-06-09 23:44 ` Larry Snyder
  1999-06-18  7:57 ` furio ercolessi
  0 siblings, 2 replies; 11+ messages in thread
From: furio ercolessi @ 1999-06-09 21:08 UTC (permalink / raw)
  To: axp-list

Hi all,

I am at a loss to understand why my system (LX, 2.2.7) from time to time
is now refusing to start new processes:

-------------------------------------------------
# man ps
Formatting page, please wait...
sh: fork: Cannot allocate memory
sh: fork: Cannot allocate memory
Error executing formatting or display command.
[...]
# free
             total       used       free     shared    buffers     cached
Mem:        516720     510696       6024      71416     214536      97896
-/+ buffers/cache:     198264     318456
Swap:       262136       2280     259856
-------------------------------------------------

Plenty of memory is available (even if of course the system should
have to get rid of a few buffers).  The number of processes now
is less than 100, while NR_TASKS is 512 and MAX_TASKS_PER_USER 256.

This syndrome started since when I started running squid on the
system; but the squid process is around 100MB.
Any ideas?

Thanks

furio ercolessi
Spin - Trieste (Italy)


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

* Re: fork: Cannot allocate memory
  1999-06-09 21:08 fork: Cannot allocate memory furio ercolessi
@ 1999-06-09 23:44 ` Larry Snyder
  1999-06-10 10:59   ` furio ercolessi
  1999-06-18  7:57 ` furio ercolessi
  1 sibling, 1 reply; 11+ messages in thread
From: Larry Snyder @ 1999-06-09 23:44 UTC (permalink / raw)
  To: axp-list

Just a thought....
I assume squid is running as root, and maybe banging against a memory/
user limitation.
Can squid run as non-root? (maybe nobody....)?  If so, it'd probably
be better security-wise, anyway.
Are other (non-root) users experiencing the same problem?  It doesn't
look like you're running out of proc-table or overall ram.
my .02, FWIW
-ls-

furio ercolessi <furio@spin.it> wrote:
> Hi all,
> 
> I am at a loss to understand why my system (LX, 2.2.7) from time to time
> is now refusing to start new processes:
> 
> -------------------------------------------------
> # man ps
> Formatting page, please wait...
> sh: fork: Cannot allocate memory
> sh: fork: Cannot allocate memory
> Error executing formatting or display command.
> [...]
> # free
>              total       used       free     shared    buffers     cached
> Mem:        516720     510696       6024      71416     214536      97896
> -/+ buffers/cache:     198264     318456
> Swap:       262136       2280     259856
> -------------------------------------------------
> 
> Plenty of memory is available (even if of course the system should
> have to get rid of a few buffers).  The number of processes now
> is less than 100, while NR_TASKS is 512 and MAX_TASKS_PER_USER 256.
> 
> This syndrome started since when I started running squid on the
> system; but the squid process is around 100MB.
> Any ideas?
> 
> Thanks
> 
> furio ercolessi
> Spin - Trieste (Italy)
> 
> -- 
> To unsubscribe: send e-mail to axp-list-request@redhat.com with
> 'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com


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

* Re: fork: Cannot allocate memory
  1999-06-09 23:44 ` Larry Snyder
@ 1999-06-10 10:59   ` furio ercolessi
  1999-06-10 13:35     ` Stefan Boresch
  0 siblings, 1 reply; 11+ messages in thread
From: furio ercolessi @ 1999-06-10 10:59 UTC (permalink / raw)
  To: axp-list

> 
> Just a thought....
> I assume squid is running as root, and maybe banging against a memory/
> user limitation.
> Can squid run as non-root? (maybe nobody....)?  If so, it'd probably
> be better security-wise, anyway.
> Are other (non-root) users experiencing the same problem?  It doesn't
> look like you're running out of proc-table or overall ram.

Squid is running on its own UID, and it is rather quiet from the
point of view of process creation.
The problem affects all users, including root.
I do not think I have any memory/user limitation.
I now tried to bump the max no. of tasks to 4096, just to see if
it makes a difference; the syndrome takes a few hours or days to develop.

furio ercolessi

PS for Maurice: no, we have definitely trashed that SCSI adapter brand...


> furio ercolessi <furio@spin.it> wrote:
> > Hi all,
> > 
> > I am at a loss to understand why my system (LX, 2.2.7) from time to time
> > is now refusing to start new processes:
> > 
> > -------------------------------------------------
> > # man ps
> > Formatting page, please wait...
> > sh: fork: Cannot allocate memory
> > sh: fork: Cannot allocate memory
> > Error executing formatting or display command.
> > [...]
> > # free
> >              total       used       free     shared    buffers     cached
> > Mem:        516720     510696       6024      71416     214536      97896
> > -/+ buffers/cache:     198264     318456
> > Swap:       262136       2280     259856
> > -------------------------------------------------
> > 
> > Plenty of memory is available (even if of course the system should
> > have to get rid of a few buffers).  The number of processes now
> > is less than 100, while NR_TASKS is 512 and MAX_TASKS_PER_USER 256.
> > 
> > This syndrome started since when I started running squid on the
> > system; but the squid process is around 100MB.
> > Any ideas?
> > 
> > Thanks
> > 
> > furio ercolessi
> > Spin - Trieste (Italy)
> > 
> > -- 
> > To unsubscribe: send e-mail to axp-list-request@redhat.com with
> > 'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com
> 
> -- 
> To unsubscribe: send e-mail to axp-list-request@redhat.com with
> 'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com
> 
> 


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

* Re: fork: Cannot allocate memory
  1999-06-10 10:59   ` furio ercolessi
@ 1999-06-10 13:35     ` Stefan Boresch
  1999-06-10 16:20       ` furio ercolessi
  1999-06-14 21:13       ` furio ercolessi
  0 siblings, 2 replies; 11+ messages in thread
From: Stefan Boresch @ 1999-06-10 13:35 UTC (permalink / raw)
  To: axp-list

Furio,

is this still with a 2.0.x kernel?  

I could  produce weird effects sounding similar to yours
(BTW, on both axp and i386) if the swap space was <= 2 x RAM) under
heavy swapping conditions, even though the overall amount of VM (RAM +
swap) ought to have been enough.

[Under 2.2.x (i386) this problem is gone.] On my Alphas (still with
2.0.36) I have removed the problem by adding swap files to increase
the swap space.

Stefan


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

* Re: fork: Cannot allocate memory
  1999-06-10 13:35     ` Stefan Boresch
@ 1999-06-10 16:20       ` furio ercolessi
  1999-06-14 21:13       ` furio ercolessi
  1 sibling, 0 replies; 11+ messages in thread
From: furio ercolessi @ 1999-06-10 16:20 UTC (permalink / raw)
  To: axp-list

> Furio,
> 
> is this still with a 2.0.x kernel?  

No, this is with a 2.2.7 kernel, recompiled with
NR_OPEN=16384, NR_FILE=16384, OPEN_MAX=4096, __FD_SETSIZE=16384,
and (since yesterday) NR_TASKS=4096, implanted on RH5.2.
I expect this box to have alot of connections open, so I
tried to be generous :-)

> I could  produce weird effects sounding similar to yours
> (BTW, on both axp and i386) if the swap space was <= 2 x RAM) under
> heavy swapping conditions, even though the overall amount of VM (RAM +
> swap) ought to have been enough.

I have 512MB RAM, 256MB swap but the idea is that swap should be never used.
I hate the idea of wasting 1GB of disk, but if this may help I will try it.

furio


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

* Re: fork: Cannot allocate memory
  1999-06-10 13:35     ` Stefan Boresch
  1999-06-10 16:20       ` furio ercolessi
@ 1999-06-14 21:13       ` furio ercolessi
  1 sibling, 0 replies; 11+ messages in thread
From: furio ercolessi @ 1999-06-14 21:13 UTC (permalink / raw)
  To: axp-list

Stefan Boresch wrote:
> I could  produce weird effects sounding similar to yours
> (BTW, on both axp and i386) if the swap space was <= 2 x RAM) under
> heavy swapping conditions, even though the overall amount of VM (RAM +
> swap) ought to have been enough.
> 
> [Under 2.2.x (i386) this problem is gone.] On my Alphas (still with
> 2.0.36) I have removed the problem by adding swap files to increase
> the swap space.

I now increased the swap space to 1.25GB [sic] and I still have 
the problem ("fork: Cannot allocate memory").
There is no swap activity, there is plenty of memory left, and
about 100 processes out of a maximum of 4096.

% free
             total       used       free     shared    buffers     cached
Mem:        516688     510312       6376      74512     179832     125480
-/+ buffers/cache:     205000     311688
Swap:      1310696       4504    1306192
% /sbin/swapon -s
Filename                        Type            Size    Used    Priority
/dev/sda3                       partition       262136  4472    -1
/var/swap/swap1                 file            1048568 0       -2

Next step will be going back from 2.2.7 to 2.0.36.

furio ercolessi
Spin - Trieste (Italy)


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

* Re: fork: Cannot allocate memory
  1999-06-09 21:08 fork: Cannot allocate memory furio ercolessi
  1999-06-09 23:44 ` Larry Snyder
@ 1999-06-18  7:57 ` furio ercolessi
  1999-06-18  9:30   ` mgraffam
  1999-06-18 12:38   ` Charles E Taylor IV
  1 sibling, 2 replies; 11+ messages in thread
From: furio ercolessi @ 1999-06-18  7:57 UTC (permalink / raw)
  To: axp-list

My forking problem went away by downgrading (sidegrading?) from 2.2.7
to 2.0.37, which by the way compiled out of the box and has now made
62h of uptime in a production environment without any problem.

After reading other comments I think that I will not touch any 2.2.x 
stuff until at least RH 6.1 ...

furio ercolessi
Spin - Trieste (Italy)


> I am at a loss to understand why my system (LX, 2.2.7) from time to time
> is now refusing to start new processes:
> 
> -------------------------------------------------
> # man ps
> Formatting page, please wait...
> sh: fork: Cannot allocate memory
> sh: fork: Cannot allocate memory
> Error executing formatting or display command.
> [...]
> # free
>              total       used       free     shared    buffers     cached
> Mem:        516720     510696       6024      71416     214536      97896
> -/+ buffers/cache:     198264     318456
> Swap:       262136       2280     259856
> -------------------------------------------------
> 
> Plenty of memory is available (even if of course the system should
> have to get rid of a few buffers).  The number of processes now
> is less than 100, while NR_TASKS is 512 and MAX_TASKS_PER_USER 256.


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

* Re: fork: Cannot allocate memory
  1999-06-18  7:57 ` furio ercolessi
@ 1999-06-18  9:30   ` mgraffam
  1999-06-18 10:26     ` furio ercolessi
  1999-06-21 18:54     ` Todd Fleisher
  1999-06-18 12:38   ` Charles E Taylor IV
  1 sibling, 2 replies; 11+ messages in thread
From: mgraffam @ 1999-06-18  9:30 UTC (permalink / raw)
  To: axp-list

On Fri, 18 Jun 1999, furio ercolessi wrote:

> My forking problem went away by downgrading (sidegrading?) from 2.2.7
> to 2.0.37, which by the way compiled out of the box and has now made
> 62h of uptime in a production environment without any problem.
> 
> After reading other comments I think that I will not touch any 2.2.x 
> stuff until at least RH 6.1 ...
> 
> furio ercolessi
> Spin - Trieste (Italy)

I don't run RH 6.0, so I don't know what the real issues are.. but I am
running kernel 2.2.4 with RH 5.1 on my Alpha (UDB) with no problems.

So, I'm not so sure that the 2.2.4 kernel is at fault so much as the
underlying distro is. 

The machine in question doesn't see much load though, it is just an IP
masq'ing gateway for my network. 

Michael J. Graffam (mgraffam@idsi.net)
"..subordination of one sex to the other is wrong in itself, and now
one of the chief hindrances to human improvement.." John Stuart Mill
"The Subjection of Women"


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

* Re: fork: Cannot allocate memory
  1999-06-18  9:30   ` mgraffam
@ 1999-06-18 10:26     ` furio ercolessi
  1999-06-21 18:54     ` Todd Fleisher
  1 sibling, 0 replies; 11+ messages in thread
From: furio ercolessi @ 1999-06-18 10:26 UTC (permalink / raw)
  To: axp-list

> > My forking problem went away by downgrading (sidegrading?) from 2.2.7
> > to 2.0.37, which by the way compiled out of the box and has now made
> > 62h of uptime in a production environment without any problem.
> > 
> 
> I don't run RH 6.0, so I don't know what the real issues are.. but I am
> running kernel 2.2.4 with RH 5.1 on my Alpha (UDB) with no problems.
> 
> So, I'm not so sure that the 2.2.4 kernel is at fault so much as the
> underlying distro is. 
> 
> The machine in question doesn't see much load though, it is just an IP
> masq'ing gateway for my network. 

My problem with 2.2.7 (on RH5.2) appeared only when I had postfix and 
squid running concurrently.  postfix is a high-performance MTA, inducing a 
certain amount of forking activity.   The well known squid caching software
does it with a single process which takes a lot of memory and
keeps many TCP connections open.  Only after I had these two apps
running simultaneously I observed forking problems.
Before, the machine appeared nicely stable...

furio ercolessi
Spin - Trieste (Italy)


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

* Re: fork: Cannot allocate memory
  1999-06-18  7:57 ` furio ercolessi
  1999-06-18  9:30   ` mgraffam
@ 1999-06-18 12:38   ` Charles E Taylor IV
  1 sibling, 0 replies; 11+ messages in thread
From: Charles E Taylor IV @ 1999-06-18 12:38 UTC (permalink / raw)
  To: axp-list


On 18-Jun-99 furio ercolessi wrote:
> My forking problem went away by downgrading (sidegrading?) from 2.2.7
> to 2.0.37, which by the way compiled out of the box and has now made
> 62h of uptime in a production environment without any problem.

Interesting.  I tried 2.0.37 on my AS200 (Avanti) which also compiled it with
no problems.  Except for the fact that it broke X.  Booted fine and seemed to
run fine - until I started X, at which time it scrambled the screen.

---
--------------------------------------------------------
E-Mail: Charles E Taylor IV <charlet@hubcap.clemson.edu>
                            <charlet@innova.net>
Date: 18-Jun-99
Time: 08:34:54
--------------------------------------------------------
Visit me on the web!
http://orangesherbert.ces.clemson.edu
--------------------------------------------------------


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

* Re: fork: Cannot allocate memory
  1999-06-18  9:30   ` mgraffam
  1999-06-18 10:26     ` furio ercolessi
@ 1999-06-21 18:54     ` Todd Fleisher
  1 sibling, 0 replies; 11+ messages in thread
From: Todd Fleisher @ 1999-06-21 18:54 UTC (permalink / raw)
  To: axp-list

I run RedHat 5.2 on my UDB and have been running 2.2.9 flawlessly for about 20 days straight now. I haven't had any problems that were kernel related since 2.2.3 or so. This box servers as my masquerading gateway, mail/ftp/www server, and is also used by me for general use (lots of compiling and general monkeying around). It takes its load in stride, but hasn't shown any serious kernel-related problems.

Todd

-- 

\                                          \\\\\\
\\           Todd Fleisher                  \\\\\
\\\           UNIX Systems Engineer          \\\\
\\\\           Phaedo Consulting, Inc.        \\\
\\\\\           todd@phaedo.com                \\
\\\\\\                                          \


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

end of thread, other threads:[~1999-06-21 19:48 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-06-09 21:08 fork: Cannot allocate memory furio ercolessi
1999-06-09 23:44 ` Larry Snyder
1999-06-10 10:59   ` furio ercolessi
1999-06-10 13:35     ` Stefan Boresch
1999-06-10 16:20       ` furio ercolessi
1999-06-14 21:13       ` furio ercolessi
1999-06-18  7:57 ` furio ercolessi
1999-06-18  9:30   ` mgraffam
1999-06-18 10:26     ` furio ercolessi
1999-06-21 18:54     ` Todd Fleisher
1999-06-18 12:38   ` Charles E Taylor IV

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