[Spread-users] Token Message

Yuval Lifshitz yuvalif at yahoo.com
Mon Jul 11 04:56:20 EDT 2005

I have a spread network with two segments, one with
two daemons and one with one.
All is working fine except that for each message I
send through spread there are about 25 extra messages
sent between the daemons. These are small token
messages (most are token hurry) messages, but this 25
factor (with my high rate of messages) flood my

Spread is compiled with:
Token_timeout.sec  =  20
Hurry_timeout.sec  =   6
in the wide configuration the daemons use.
Is that a known problem or configuration problem?

I tried to investigate the code and saw that the token
messages is sent in many places (sometimes twice in
the same place), so I tried to impose the
"Hurry_timeout" in an ugly way in the code, in
network.c I added:

#include <sys/time.h>
ext	sp_time		Hurry_timeout;

int	Net_send_token( sys_scatter *scat )
	struct timeval now = {0 ,0};
	static struct timeval last = {0 ,0};
	token_header	*token_ptr;
	int		ret;

	gettimeofday(&now, NULL);
	if (now.tv_sec - last.tv_sec < Hurry_timeout.sec)
                 printf("too much tokens, time diff
from last is: %ld\n", now.tv_sec - last.tv_sec);
		return 0;
	last.tv_sec = now.tv_sec;

Is that bad as I think it is?


Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

More information about the Spread-users mailing list