[infinispan-dev] introducing an artificial network delay

Bela Ban bban at redhat.com
Tue Jul 6 08:54:53 EDT 2010



Sanne Grinovero wrote:
> Hello,
> I'm running some performance tests; my goal is to alter the code for
> the Lucene Directory to use optimal batching and Flags, but to make
> sure I'm improving performance for DIST and REPL configurations the
> only option I'm having is to run it on a real cluster, which is not
> doable right now.
>
> So as I'm running tests on my laptop, network IO is not real and I
> suppose it's not representative of real life bottlenecks.
>
> Is there some option I could set in the jgroups configuration to
> introduce an arbitrary delay,

Yes, DELAY ! :-)

Options in_delay and out_delay add some ms to every incoming or outgoing 
message. Take a look at the code, DELAY is only ~ 80 lines, so you could 
also write your own, which introduces varying delays.

> or even some degree of random packet losses?

Yes, DISCARD ! Use 'up' and 'down' to introduce random discards, e.g. 
DISCARD up=".4" means that 40% of incoming messages are discarded.


-- 
Bela Ban
Lead JGroups / Clustering Team
JBoss


More information about the infinispan-dev mailing list