Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* Re: Unable to load interpreter // VM thrashing or hardware ???
  1998-11-30 16:13 Unable to load interpreter ??? Dave Beck
@ 1998-12-01 17:26 ` Stefan Boresch
  1998-12-01 17:56   ` Bob McElrath
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Boresch @ 1998-12-01 17:26 UTC (permalink / raw)
  To: axp-list

I hope that I am not going on everyone's nerves, but the sudden
instabilities of my two Alpha LXs frustrate me. I thought that I
have yet another hardware problem, but now I start to doubt this.
And from some posts to the initial thread, it seems that I am
not the only one having these problems.

First, thanks for the replies received so far; at least, I understand
now that the error message indicates insufficient
memory.  However, I don't understand how the VM system gets in
this state, so I'd like to discern between possible hardware and
software reasons.  Some observations:

(1) The problem (reproducible for me with the code given at the end
of this mail) shows up with both the RH 5.1 provided milo and 2.0.35
source, as well as with the Oct 10, 1998 milo, pristine 2.0.35 sources
plus the alpha-2.0.35-0.2 patches by Jay.

(2) The problem appears with the default /proc/sys/kernel/{file-max,
inode-max}, as well as with file-max=2048 and inode-max=8192.  Further,
why would that affect anything with respect to 

(3) The old panacea of setenv MEMORY_SIZE 252 doesn't help either

(4) Watching a bit with free, shows an interesting pattern:  For
several iterations in the test (4-5), the free amount of virtual
memory is where I expect it to be, well > 100MB (for my machine,
details follow with the source code). Suddenly, in the fifth or sixth
iteration, the virtual memory falls rapidly to 0; obviously, this
is when the problem occurs.

(5) The same testcase (adjusted for memory sizes) runs for hours on
both an UX(!) (kernel compiled from pristine 2.0.35 plus alpha-patches
plus the 2.0.35-0.1 alpha patches by Jay, plus a fairly recent ldmilo
+ pal-codes by Jay, plus a larger value of SHMMAX in shmparam.h, some
black magic at least at some point necessary for the UX) and an Intel
machine after a default RH 5.2 installation.

(6) As I said earlier, I suspected initially hardware problems, since one
of the afflicted machines had a number of problems in the past.  However, the
second machine has been running perfectly for several weeks, only that we
now have an application that apparently leads to heavy paging.

It would be great if someone were willing to try whether he/she can
reproduce the problem on a similar configuration.  For me, the problem
shows up within an hour; provided one kills the test-executable by
Ctrl-C fairly quickly, the systems recover or can at least be shut
down cleanly.

My systems are both LX 533MHz, 256MB RAM, 2 x 136512k swap space (I
thought on an Alpha with a page size of 8k this was fine?), Adaptec
2940U/UW, respectively.  Both run RH 5.1, and normally a kernel 
compiled from the RH provided 2.0.35 sources.  I remember hearing
rumours that there are definitely problems on large memory machines
>= 512M (both LX/UX); could anyone more knowledgeable comment on
those issues?

Well, finally, here is the test case (with slight modifications 
identical to code from D.Gilbert posted here several months ago):
The SIZE variable is chosen for my RAM size, i.e. I enforce 
swapping: this same test runs happily with SIZE being set to 240*256*..
which on an empty machine seems to fit in RAM.

---------------------------------------------------------------------

#include <stdio.h>
#include <stdlib.h>

#define SIZE (260*256*1024*sizeof(int))
int main() {
  volatile int * volatile pl=(int *)malloc(SIZE);

  int a;

  int s;
  
  int sum1,sum2;

  printf("Using %d bytes.\n",SIZE);
  for(s=1056;;s++) {
    printf("Filling with seed of s=0x%x \n",s);
    srandom(s);
sum1=0;
    for(a=0;a<(SIZE/sizeof(int));a++) {
      int tmp1=random();
      sum1+=tmp1;

      pl[a]=tmp1;
    };

    srandom(s);

    printf("Testing with seed of s=0x%x \n",s);
    for(a=0,sum2=0;a<(SIZE/sizeof(int));a++) {
      int tmp1=random();
      int tmp2=pl[a];

      sum2+=tmp1;
      if (tmp1!=tmp2) {
        fprintf(stderr,"MISMATCH ERROR! at a=0x%x (random=0x%x array=0x%x
reread=0x%x seed=
0x%x)\n",a,tmp1,tmp2,pl[a],s);
      };
    };
    printf("Completed pass with seed of s=0x%x sum1=0x%x
sum2=0x%x\n",s,sum1,sum2);
    if (sum1!=sum2) {
      printf("Internal inconsistency! Sums differ! sum1=0x%x
sum2=0x%x\n",sum1,sum2);
      exit(2);
    };
  };
};



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

* Re: Unable to load interpreter // VM thrashing or hardware ???
  1998-12-01 17:26 ` Unable to load interpreter // VM thrashing or hardware ??? Stefan Boresch
@ 1998-12-01 17:56   ` Bob McElrath
  1998-12-02  9:49     ` Stefan Boresch
  0 siblings, 1 reply; 6+ messages in thread
From: Bob McElrath @ 1998-12-01 17:56 UTC (permalink / raw)
  To: axp-list

On Tue, 1 Dec 1998, Stefan Boresch wrote:

> I hope that I am not going on everyone's nerves, but the sudden
> instabilities of my two Alpha LXs frustrate me. I thought that I
> have yet another hardware problem, but now I start to doubt this.
> And from some posts to the initial thread, it seems that I am
> not the only one having these problems.
> 
> First, thanks for the replies received so far; at least, I understand
> now that the error message indicates insufficient
> memory.  However, I don't understand how the VM system gets in
> this state, so I'd like to discern between possible hardware and
> software reasons.  Some observations:

How many iterations of this program does it usually require to fail?  I'm
reluctant to run it for too long since it fills up all of RAM and brings my
machine to a crawl...  However, it passed the first time through.  (still
running...I'll let you know if it fails)

> (1) The problem (reproducible for me with the code given at the end
> of this mail) shows up with both the RH 5.1 provided milo and 2.0.35
> source, as well as with the Oct 10, 1998 milo, pristine 2.0.35 sources
> plus the alpha-2.0.35-0.2 patches by Jay.

I highly doubt this has anything to do with your MILO.

> (2) The problem appears with the default /proc/sys/kernel/{file-max,
> inode-max}, as well as with file-max=2048 and inode-max=8192.  Further,
> why would that affect anything with respect to 
> 
> (3) The old panacea of setenv MEMORY_SIZE 252 doesn't help either

What does this have to do with problems of a 256MB malloc?

BTW these are in /proc/sys/fs on my system (2.1.129 kernel).  And they are:
(1)<mcelrath@draal:/var/log> cat /proc/sys/fs/file-max 
4096
(0)<mcelrath@draal:/var/log> cat /proc/sys/fs/inode-max 
8192

> (4) Watching a bit with free, shows an interesting pattern:  For
> several iterations in the test (4-5), the free amount of virtual
> memory is where I expect it to be, well > 100MB (for my machine,
> details follow with the source code). Suddenly, in the fifth or sixth
> iteration, the virtual memory falls rapidly to 0; obviously, this
> is when the problem occurs.

Watching with top, I can see that during your "Testing..." phase the swap
increases dramatically.  On my machine it goes up to ~300MB.  During
"Filling..." it drops to ~128MB.  I have about 50MB of other apps running at
the same time.  I don't know why it would use 300MB of swap, but if you only
have 2x136M, this is clearly where your problem lies.  (I have 512MB swap --
most people recommend to have twice as much swap as you have RAM).

> (5) The same testcase (adjusted for memory sizes) runs for hours on
> both an UX(!) (kernel compiled from pristine 2.0.35 plus alpha-patches
> plus the 2.0.35-0.1 alpha patches by Jay, plus a fairly recent ldmilo
> + pal-codes by Jay, plus a larger value of SHMMAX in shmparam.h, some
> black magic at least at some point necessary for the UX) and an Intel
> machine after a default RH 5.2 installation.
> 
> (6) As I said earlier, I suspected initially hardware problems, since one
> of the afflicted machines had a number of problems in the past.  However, the
> second machine has been running perfectly for several weeks, only that we
> now have an application that apparently leads to heavy paging.
> 
> It would be great if someone were willing to try whether he/she can
> reproduce the problem on a similar configuration.  For me, the problem
> shows up within an hour; provided one kills the test-executable by
> Ctrl-C fairly quickly, the systems recover or can at least be shut
> down cleanly.
> 
> My systems are both LX 533MHz, 256MB RAM, 2 x 136512k swap space (I
> thought on an Alpha with a page size of 8k this was fine?), Adaptec
> 2940U/UW, respectively.  Both run RH 5.1, and normally a kernel 
> compiled from the RH provided 2.0.35 sources.  I remember hearing
> rumours that there are definitely problems on large memory machines
> >= 512M (both LX/UX); could anyone more knowledgeable comment on
> those issues?

I have an LX 533MHz, 256MB RAM, 512MB swap space, BusLogic BT-958
(UltraWide, with IBM Ultrastar disk), RH 5.1 install, but kernel 2.1.129.

> Well, finally, here is the test case (with slight modifications 
> identical to code from D.Gilbert posted here several months ago):
> The SIZE variable is chosen for my RAM size, i.e. I enforce 
> swapping: this same test runs happily with SIZE being set to 240*256*..
> which on an empty machine seems to fit in RAM.

<code omitted>

-- Bob

Bob McElrath (mcelrath@draal.physics.wisc.edu) Univ. of Wisconsin at Madison



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

* Re: Unable to load interpreter // VM thrashing or hardware ???
@ 1998-12-01 18:12 Greg Lindahl
  1998-12-01 18:38 ` Bob McElrath
  0 siblings, 1 reply; 6+ messages in thread
From: Greg Lindahl @ 1998-12-01 18:12 UTC (permalink / raw)
  To: axp-list

> > (3) The old panacea of setenv MEMORY_SIZE 252 doesn't help either
> 
> What does this have to do with problems of a 256MB malloc?

It was a workaround for a MILO bug on machines with 128 or 256 megs of
ram. The symptom was a freeze. Clearly not relevant here.

> Watching with top, I can see that during your "Testing..." phase the swap
> increases dramatically.  On my machine it goes up to ~300MB.  During
> "Filling..." it drops to ~128MB.  I have about 50MB of other apps running at
> the same time.  I don't know why it would use 300MB of swap, but if you only
> have 2x136M, this is clearly where your problem lies.  (I have 512MB swap --
> most people recommend to have twice as much swap as you have RAM).

Don't be confused by this. Your machine may also be reading files and
whatnot, which means that your swap usage is higher than his. His
total available VM is 256+256; yours is 256+512. The correct
diagnostic is make sure that swap is not full, and then to look at the
free pages.

> I have an LX 533MHz, 256MB RAM, 512MB swap space, BusLogic BT-958
> (UltraWide, with IBM Ultrastar disk), RH 5.1 install, but kernel 2.1.129.

Note just 1 swap partition. I wonder if the UX had just one. The
machines that fail have 2. Also note adaptec. In the 2.0.35 kernel,
which the failing system has, the adaptec driver is fubar, definitely
fubar for multiple disks.

-- g


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

* Re: Unable to load interpreter // VM thrashing or hardware ???
  1998-12-01 18:12 Unable to load interpreter // VM thrashing or hardware ??? Greg Lindahl
@ 1998-12-01 18:38 ` Bob McElrath
  0 siblings, 0 replies; 6+ messages in thread
From: Bob McElrath @ 1998-12-01 18:38 UTC (permalink / raw)
  To: axp-list

On Tue, 1 Dec 1998, Greg Lindahl wrote:

> It was a workaround for a MILO bug on machines with 128 or 256 megs of
> ram. The symptom was a freeze. Clearly not relevant here.
> 
> > Watching with top, I can see that during your "Testing..." phase the swap
> > increases dramatically.  On my machine it goes up to ~300MB.  During
> > "Filling..." it drops to ~128MB.  I have about 50MB of other apps running at
> > the same time.  I don't know why it would use 300MB of swap, but if you only
> > have 2x136M, this is clearly where your problem lies.  (I have 512MB swap --
> > most people recommend to have twice as much swap as you have RAM).
> 
> Don't be confused by this. Your machine may also be reading files and
> whatnot, which means that your swap usage is higher than his. His
> total available VM is 256+256; yours is 256+512. The correct
> diagnostic is make sure that swap is not full, and then to look at the
> free pages.

It's undoubtedly reading files...  I don't know where to look to find free
pages but /proc/sys/vm/freepages gives:

(0)<mcelrath@draal:/home/mcelrath> cat /proc/sys/vm/freepages
256     512     768

at all times (while the program is running) -- the numbers never change.
(Is that supposed to be RAM	SWAP	VM there?)

In top, the "free" swap field is always exactly 512M - "used".

> > I have an LX 533MHz, 256MB RAM, 512MB swap space, BusLogic BT-958
> > (UltraWide, with IBM Ultrastar disk), RH 5.1 install, but kernel 2.1.129.
> 
> Note just 1 swap partition. I wonder if the UX had just one. The
> machines that fail have 2. Also note adaptec. In the 2.0.35 kernel,
> which the failing system has, the adaptec driver is fubar, definitely
> fubar for multiple disks.

There was a mail to this list today saying that there were some serious
enhancements to the adaptec drivers that appeared in 2.0.36.  Might be worth
a try.

-- Bob

Bob McElrath (mcelrath@draal.physics.wisc.edu) Univ. of Wisconsin at Madison


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

* Re: Unable to load interpreter // VM thrashing or hardware ???
@ 1998-12-01 18:48 Greg Lindahl
  0 siblings, 0 replies; 6+ messages in thread
From: Greg Lindahl @ 1998-12-01 18:48 UTC (permalink / raw)
  To: axp-list

> It's undoubtedly reading files...  I don't know where to look to find free
> pages but /proc/sys/vm/freepages gives:

There's more than one way to look:

[lindahl@spica lindahl]$ vmstat 2
 procs                  memory    swap        io    system         cpu
 r b w  swpd  free  buff cache  si  so   bi   bo   in   cs  us  sy  id
 0 0 0  1004  8764 19248 197448   0   0    1    0    0   14   0   0 23
 0 0 0  1004  8664 19248 197448   0   0    0    0  142   86   0   2 98
 0 0 0  1004  8664 19248 197448   0   0    0   16  148   73   0   1 99

"free" in this context is the free pages of ram.

> In top, the "free" swap field is always exactly 512M - "used".

You want the free Mem field, not free swap.

The guy with the problem is apparently seeing the free Mem fall to 0
while there is still free swap left.

-- g


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

* Re: Unable to load interpreter // VM thrashing or hardware ???
  1998-12-01 17:56   ` Bob McElrath
@ 1998-12-02  9:49     ` Stefan Boresch
  0 siblings, 0 replies; 6+ messages in thread
From: Stefan Boresch @ 1998-12-02  9:49 UTC (permalink / raw)
  To: axp-list

Thanks for all the replies:

> How many iterations of this program does it usually require to fail?  I'm
> reluctant to run it for too long since it fills up all of RAM and brings my
> machine to a crawl...  However, it passed the first time through.  (still
> running...I'll let you know if it fails)

The problem shows up for me after 4-10 iterations, most often 4 or 5
though (on the otherwise empty machine this translates between 30 - 60
minutes.

I'll try the 2.0.36 kernel next, and I'll try to increase the
parameters in /proc/sys/vm/freepages (somewhen back in the past that
would help prevent some hangs).

The UX on which the test runs fine for me also has two swap partions,
so I doubt that this causes the problem.  But maybe it's really
the Adaptec driver...

Stefan Boresch



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

end of thread, other threads:[~1998-12-02  9:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-12-01 18:12 Unable to load interpreter // VM thrashing or hardware ??? Greg Lindahl
1998-12-01 18:38 ` Bob McElrath
  -- strict thread matches above, loose matches on Subject: below --
1998-12-01 18:48 Greg Lindahl
1998-11-30 16:13 Unable to load interpreter ??? Dave Beck
1998-12-01 17:26 ` Unable to load interpreter // VM thrashing or hardware ??? Stefan Boresch
1998-12-01 17:56   ` Bob McElrath
1998-12-02  9:49     ` Stefan Boresch

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