Re: ### Allocation failure
Scott Rogers <scott-t7/[email protected]> Tue, 15 Apr 2003 13:06:13 +0000
| Newsgroups | gmane.comp.lang.moto.devel |
|---|---|
| Message-ID | <[email protected]> |
David,
I experienced the same behavior on the FreeBSD box in interperted and com=
piled=20
mode. I did not try interperted on the Linux box.
I did nothing to turn off sessions. So, if sessions are on 'out of the b=
ox'=20
then they were on for these tests.
Scott Rogers
On Tuesday 15 April 2003 03:50 pm, David Hakim wrote:
> Is this under the interpreter or with a module compiled with mmc ?
> Also, are sessions turned off for this application ?
>
> -Dave
>
> On Tuesday, April 15, 2003, at 07:03 AM, Scott Rogers wrote:
> > Hey All,
> >
> > I recently did some performance testing of Moto on both FreeBSD 4.6.2
> > and
> > Redhat Linux 7.2.
> >
> > FreeBSD
> > Apache: 1.3.26
> > Moto: 0.19.0
> > 256mg ram
> >
> >
> > RedHat
> > Apache 1.3.27
> > Moto: 0.19.0
> > 1gig ram
> >
> > Using ApacheBench (ab with source distributions) in the following
> > manner:
> > ab -t 0 http://localhost/tmoto1/hello.moto
> >
> > This sends 50,000 connections to the server, one at a time. Somewher=
e
> > between
> > 5000 and 10,000 connections, Moto starts sending "### Allocation
> > failure"
> > messages to the Apache error log file.
> >
> > I tracked this down to line 568 of src/codex/sharedmem.c. It seems
> > there is
> > not enough contiguous memory, according to function "locateLPFNode" a=
t
> > line
> > #516.
> >
> > It seems when Moto is unable to return a large enough block of memory
> > from
> > it's internal stack, it issues the above warning/error message to
> > stderr.
> >
> > The problem is, it logs the message so many times it fills up my /var
> > file
> > system in a matter of seconds!
> >
> > Also, it is important to note, that on the FreeBSD system Moto
> > consumes all
> > available RAM, but not on the Linux box with 1gig of Ram.
> >
> >
> >
> > Here is the code excerpt:
> >
> > =3D=3D=3D BEGIN hello.moto =3D=3D=3D
> > $use("codex.http")
> > #include("my_classes.moto")
> >
> >
> > <html>
> > <head>
> > <style type=3D"text/css">
> > </style>
> > </head>
> > <body>
> >
> > <hr>
> > ${
> > HelloWorld hw =3D new HelloWorld();
> > String message =3D hw.sayHelloTo("bob");
> > }$
> > $(message + "<br/>")
> > $(hw.sayHelloTo("bobie"))
> > <hr/>
> >
> > ${
> > Box box =3D new Box("Loud People Out Front");
> > }$
> >
> > $(box.renderStandard())
> >
> >
> > <hr>
> > </body>
> > </html>
> > =3D=3D=3D END hello.moto =3D=3D=3D
> >
> >
> > =3D=3D=3D BEGIN my_classes.moto =3D=3D=3D
> > ${
> > class HelloWorld {
> > String sayHelloTo(String name){
> > return "Hello " + name + " ";
> > }
> > }
> >
> >
> > class Box {
> > boolean _initalized =3D false;
> > String _title =3D "";
> >
> > Box(String title) {
> > this._title =3D title;
> > }
> >
> > String renderStandard() {
> > return "Title: " + _title;
> > }
> > }
> >
> > }$
> > =3D=3D=3D END my_classes.moto =3D=3D=3D
> >
> >
> > Thanks,
> >
> > Scott Rogers