[Spread-users] Buffers

Theo Schlossnagle jesus@omniti.com
Tue, 29 May 2001 10:46:57 -0400


On Tuesday, May 29, 2001, at 10:04  AM, Xabier V=E1zquez Gallardo wrote:
> Custom code.

Okay.  You amy not want to buffer so much.  The reason for buffering in=20=

most applications is to reduce disk I/O.  You will  have no disk I/O=20
with Spread, so a more steady stream of messages will probably be more=20=

healthy for all apps involved.

>>> sometimes get disconnected from spread. How can I increse the spread
>>> buffer?
>>> Changing
>>>
>>> #define         MAX_SESSION_MESSAGES    1000
>>> in spread_params.h?
>
> Can I change it into 10000? How will this change affect to spread?

You actually want to ask this message on the Spread list.  One of the=20
Spread authors will answer it better than I could.  (I Cced the list so=20=

they can just chime in :-)

I _think_ you can increase it as high as you like, but it allows on=20
group member to be up to MAX_SESSION_MESSAGES behind another member. =20
This is not good in most cases, though it may not matter in your logging=20=

scenario.  There could be other undesirable effects of raising this too=20=

high that I am not aware of.  Jonathan?  Yair?

I find it interesting that your application is reading to slow.  If you=20=

are just reading from Spread, you must be handling the messages=20
synchronously (like writing them to disk).  I would suggest using an=20
advanced I/O strategy like kaio, aio, non-blocking I/O or multithreaded=20=

programming to reduce the dependency of the reading events on the=20
writing events.  "spreadlogd" doesn't do this because it assumes it is=20=

being used with mod_log_spread which doesn't burst :-)

--
Theo Schlossnagle
1024D/82844984/95FD 30F1 489E 4613 F22E  491A 7E88 364C 8284 4984
2047R/33131B65/71 F7 95 64 49 76 5D BA  3D 90 B9 9F BE 27 24 E7