> NC> 'worker' should be better, because it's one process and several threads.
> 
> NC> It puts a bit more stress on the GC since there are global locks to
> NC> obtain when freeing memory, but at the same time, there is more memory
> NC> available for all the threads, so maybe less GC cycles...
> 
> But how it will work with threads? I mean - would it be several VMs,
> or one VM per process with multiple threads? Will they share statics
> or not?

One VM per thread. Statics are not shared since each thread have it's
own module cache.

> NC> - define then environment variable MOD_NEKO_JIT to activate JIT in
> NC> mod_neko (it's disabled by default) - or always set use_jit to 1.
> 
> I can define the variable - but how do I set use_jit to 1? In Neko
> sources?

use_jit is set to 1 if MOD_NEKO_JIT is defined. But you need to be sure
that it's defined in the environment in which Apache is started, so not
easy.

> NC> - you can also disable the neko_gc_major() done after each request in
> NC> mod_neko.c
> 
> Do you recommend doing that?

This is a good CPU-vs-memory tradeoff.

> NC> Right now, mod_neko is focused on getting the best performances without
> NC> using too much memory, because at MotionTwin we have a lot of Apache
> NC> processes running, and enough CPU.
> 
> Well that's what I need as well, I have a memory-constrainted virtual
> server, so memory is my primary concern. I've also limited the number
> of processes for prefork MPM to avoid swapping - will probably do
> more experiments with worker MPM.

Yes, tell me your results.
We are using Apache 1.3 (so always prefork) on our servers, and can
handle quite a bit load. It depends of course of your website...

Nicolas

-- 
Neko : One VM to run them all
(http://nekovm.org)

Reply via email to