From 73de0f99277148735536774571e77cc2fdc0b5c2 Mon Sep 17 00:00:00 2001 From: Jean-loup Gailly Date: Mon, 24 May 2010 18:15:51 +0200 Subject: [PATCH] Distributed engine: Increase number of binary buffers per slave & reduce their size to allow faster cycles --- distributed/distributed.h | 6 +++--- distributed/protocol.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/distributed/distributed.h b/distributed/distributed.h index 2359f02..e0bb500 100644 --- a/distributed/distributed.h +++ b/distributed/distributed.h @@ -82,11 +82,11 @@ struct incr_stats { #define DEFAULT_STATS_HBITS 21 /* If we select a cycle of at most 40ms, a slave machine can update at - * most 10K different nodes per cycle. In practice the updates - * are biased so we update fewer nodes. As shorter cyle is preferable + * most 10K different nodes per cycle. In practice the updates are + * biased so we update much fewer nodes. As shorter cyle is preferable * because the stats are more fresh. The cycle time does not affect * the number of slaves and the hash table size. */ -#define DEFAULT_SHARED_NODES (10*1024) +#define DEFAULT_SHARED_NODES 1024 /* Maximum game length. Power of 10 jut to ease debugging. */ diff --git a/distributed/protocol.h b/distributed/protocol.h index f3e58ec..a92fa54 100644 --- a/distributed/protocol.h +++ b/distributed/protocol.h @@ -7,11 +7,11 @@ #include "board.h" -/* Each slave thread maintains a ring of 32 buffers holding +/* Each slave thread maintains a ring of 256 buffers holding * incremental stats received from the slave. The oldest * buffer is recycled to hold stats sent to the slave and * received the next reply. */ -#define BUFFERS_PER_SLAVE_BITS 5 +#define BUFFERS_PER_SLAVE_BITS 8 #define BUFFERS_PER_SLAVE (1 << BUFFERS_PER_SLAVE_BITS) struct slave_state; -- 2.11.4.GIT