Re: ### Allocation failure
David Hakim <dhakim-Gkm/TONP9n1Wk0Htik3J/[email protected]> Tue, 15 Apr 2003 11:50:18 -0400
| Newsgroups | gmane.comp.lang.moto.devel |
|---|---|
| Message-ID | <[email protected]> |
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. Somewhere
> 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" at
> 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:
>
> === BEGIN hello.moto ===
> $use("codex.http")
> #include("my_classes.moto")
>
>
> <html>
> <head>
> <style type="text/css">
> </style>
> </head>
> <body>
>
> <hr>
> ${
> HelloWorld hw = new HelloWorld();
> String message = hw.sayHelloTo("bob");
> }$
> $(message + "<br/>")
> $(hw.sayHelloTo("bobie"))
> <hr/>
>
> ${
> Box box = new Box("Loud People Out Front");
> }$
>
> $(box.renderStandard())
>
>
> <hr>
> </body>
> </html>
> === END hello.moto ===
>
>
> === BEGIN my_classes.moto ===
> ${
> class HelloWorld {
> String sayHelloTo(String name){
> return "Hello " + name + " ";
> }
> }
>
>
> class Box {
> boolean _initalized = false;
> String _title = "";
>
> Box(String title) {
> this._title = title;
> }
>
> String renderStandard() {
> return "Title: " + _title;
> }
> }
>
> }$
> === END my_classes.moto ===
>
>
> Thanks,
>
> Scott Rogers
>
>