Here's some data on the webserver, OSX 10.6.8, clang 3.3 svn (old)
and clang's C++ libraries.

RPRVT    RSHRD    RSIZE    VPRVT  VSIZE   STATE

4084K    244K     6304K    30M   2394M   sleeping  
3764K    244K     6304K    30M   2394M   sleeping 
14M      244K     27M      45M   2410M   sleeping
11M      244K     25M      43M   2407M   sleeping 
39M+     244K     41M+     61M+  2425M+  running  
14M      244K     36M      50M   2415M   sleeping 
26M-     244K     38M-     53M-  2418M-  running 
32M+     244K     44M+     61M+  2425M+  running 
40M      244K     48M      66M   2430M   sleeping
14M      244K     38M      52M   2417M   sleeping

HAMMER

23M+     244K    41M+      55M+  2420M+  running 
50M+     244K    53M+      70M+  2434M+  running
22M+     244K    41M+      55M+  2420M+  running
17M      244K    40M       54M   2418M   sleeping

MANY HAMMER

32M+     244K    45M+      60M+  2425M+  running 
50M+     244K    53M+      71M+  2435M+  running

48M      244K    52M       69M   2433M   sleeping 
18M      244K    40M       53M   2418M   sleeping 

ULTRA HAMMER
34M+     244K    46M+      61M+  2426M+  running
50M      244K    53M       71M   2435M   sleeping
21M      244K    40M       53M   2418M   sleeping

The program hammer:

for var i in 0 upto 1000 do
  var result = System::system ("curl 
http://localhost:1235/$/usr/local/lib/felix/felix-1.1.9dev/share/src/lib/std/strings/string.fdoc
  >/dev/null");
  println$ "result=" + result.str;
done

is used once under HAMMER, several times concurrently under 
MANY HAMMER, and even more times under ULTRA HAMMER
(using ./hammer & ./hammer & etc on the command line).

As you can see, memory usage creeps up, but the GC is bringing
it down again. The final line is a bit higher than initially, but less than 
peak.
Considering on Linux the webserver memory use creeps up monotonically
just from manual page loads, I'd say this version on OSX is not leaking,
though it's hard to tell.

On the felix-lang.org slice, I dare not run hammer from my local
machine for long or I'll kill my bandwidth quota. Using Ubuntu 12.04 LTS 
and gcc. These are remote page loads.


  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 4617 skaller   20   0  216m  18m 3060 S  0.0  3.9   0:02.34 webserver
 4617 skaller   20   0  216m  18m 3060 S 10.0  3.9   0:04.15 webserver
 4617 skaller   20   0  231m  33m 3060 S 10.0  6.9   0:09.21 webserver
 4617 skaller   20   0  259m  60m 3064 R 16.3 12.4   0:14.76 webserver
 4617 skaller   20   0  261m  63m 3064 S 13.0 12.9   0:31.81 webserver

Accidental kill .. new process:

 6146 skaller   20   0  253m  55m 3044 S  0.0 11.4   0:08.49 webserver

Now running hammer on the slice ..

 6146 skaller   20   0  260m  62m 3044 R 92.3 12.8   0:24.38 webserver
 6146 skaller   20   0  261m  63m 3044 S 90.2 13.0   1:51.39 webserver
 6146 skaller   20   0  261m  63m 3044 S  0.0 13.0   4:49.62 webserver

minutes later and many page loads .. its still stable at 13% memory.

And with the many hammer ..

 6146 skaller   20   0  261m  63m 3052 R 87.6 13.0   6:10.61 webserver
 6146 skaller   20   0  261m  63m 3052 R 87.6 13.0   8:32.52 webserver

No change.  No leak. 

The webserver runs the GC every 60 seconds. 

I'm surprised and very pleased you can actually use the Async I/O system 
(timer) 
to run the collector at regular intervals inside an fthread!!!


--
john skaller
skal...@users.sourceforge.net
http://felix-lang.org




------------------------------------------------------------------------------
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
Felix-language mailing list
Felix-language@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to