dev-serveez
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [dev-serveez] mandelbrot fractal server


From: stefan
Subject: Re: [dev-serveez] mandelbrot fractal server
Date: Sun, 11 Nov 2001 21:47:57 +0100 (CET)

On Sun, 11 Nov 2001, Raimund 'Raimi' Jacob wrote:

> On Sat, 10 Nov 2001, stefan wrote:
> 
> hi all!
> 
> >  * Why do the server/client not use all of your cpu's ?
> >  * Is the Guile server concept totally broken? Or why is it soo slow?
> 
> in a futile attempt, i compiled serveez with profiling information
> (-pg). since my guile is compiled without that information i see only
> profiled serveez code. i see several possibilities:
> 
> - no serveez routine is an apparent reason
>   -> configure needs some extra-flags it passes both to serveez-configure
>      and guile-configure so that it is easy to compile an
>      all-static-linked serveez binary for debuggin/profiling

You could try:

$ CFLAGS=-pg LDFLAGS=-pg ./configure --with-guile-source=/path/to/guile

> - guile might have a (implicit) "sleep" when switching between serveez
>   and guile... perhaps it's something strange with guile built-in thread
>   support (but i think i have that disabled and it's still slow)

Do not know either. Martin?

> - nagle might be killing us: we transfer many short strings. perhaps the
>  kernel tries to create larger packages resulting in a delay before they
>  actually get sent.
>  we could use serveez' cool-o-matic and switch to UDP transport and see
>  what happens...

We could supply some `svz_sock_nagle (int state)' and export it to Guile.

       TCP_NODELAY
              Turn the Nagle algorithm off. This means that pack
              ets are always sent as  soon  as  possible  and  no
              unnecessary  delays  are introduced, at the cost of
              more packets in the  network.  Expects  an  integer
              boolean flag.

Maybe it helps...

> i have no better idea yet and dont really know how to investigate...

Don't bother, me neither.

There is yet another strange behaviour with the Mandelbrot server.  When
calculating larger fractals Serveez consumes more and more memory the
longer it runs.
Martin: Could you please explain in short how garbage collection generally
works?  I always thought it would be something like that:  At certain
points (when allocating new memory for cells or other data) Guile flushes
the machine state, starts scanning for references to its internal heap
within the stack recursively and finally frees all memory not marked.
Does Guile really free memory if possible?

Thanks in advance,
        address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]