[Spread-users] flooder.c

Jerome whitej8 at cs.rpi.edu
Fri Sep 24 14:58:49 EDT 2004

On Thu, 23 Sep 2004, Shlomi Yaakobovich wrote:


> The flooder sends lots of messages to the spread daemon, that's what it
> is designed to do, but it does not try to receive them immediately. The
> i > 200 means that it will attempt to receive one message only after
> sending 200 messages. It receives only 1 pending message, not more, the
> rest of the 199 messages are still waiting for him...

However, 'i' never decrements, so once it is greater than 200, this
condition will be true every time around. Was this the intention? Or did
they want to receive a message every 200th send? (In which case they
should have used modulus.)

> By commenting that condition, you forced the flooder to wait until it
> receives its own sent message. In effect, you have disabled flooder's
> flooding activity... That's why the performance you got is much slower.

Again, the way it seems to me is that once 'i' is greater than 200, it
waits on every message anyway.

> By the way, you said that not 100% of the messages flooder sent arrived.
> Were the missing messages by any chance the last messages ?  We have
> also noticed some unfriendly behavior of flooder, e.g. it is not waiting
> for its own messages to arrive before disconnecting, and for that matter
> it doe snot disconnect nicely (it ends with a "return 0", SP_leave or
> SP_disconnect are not called at all), and I think that once the daemon
> sees that behavior in a client, it discards the last messages. I think I
> have a patch for it somewhere, I will have to look...

I wondered the same thing, so I altered flooder to encode each message
with a unique indentifier and observed what was received on the client
end. In the original flooder version, it was in fact the last messages
that were never received; in the altered version (in which 'i > 200' is
commented out), all messages were accounted for.


More information about the Spread-users mailing list