Re: ### Allocation failure
David Hakim <dhakim-Gkm/TONP9n1Wk0Htik3J/[email protected]> Tue, 15 Apr 2003 13:21:04 -0400
| Newsgroups | gmane.comp.lang.moto.devel |
|---|---|
| Message-ID | <[email protected]> |
Interesting ... I'm really surprised that this failure is occurring
with the compiled module.
Anyhow ... its pretty clear then that there is a memory leak at least
somewhere. Since your test page isn't really using codex.http, could
you run
moto -d <test file>
from the command line and verify that there are no leaks there ?
Second, could you add the following directives to your httpd.conf:
MotoOption Session.Disable TRUE
changing the above to
<CompiledModule>Option Session.Disable TRUE
for your compiled module and re-run the ab tests ?
-Dave
On Tuesday, April 15, 2003, at 09:06 AM, Scott Rogers wrote:
> David,
>
> I experienced the same behavior on the FreeBSD box in interperted and
> compiled
> 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 box'
> 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.
>>> 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
>
>