[infinispan-dev] introducing an artificial network delay

Mircea Markus mircea.markus at jboss.com
Tue Jul 6 09:56:40 EDT 2010


On 6 Jul 2010, at 16:06, Manik Surtani wrote:

> I have used this technique in some other tests as well.  Have a look at RehashAfterPartitionMergeTest, for example, on line 39:
> 
> 	http://viewvc.jboss.org/cgi-bin/viewvc.cgi/infinispan/trunk/core/src/test/java/org/infinispan/distribution/rehash/RehashAfterPartitionMergeTest.java?view=markup
> 
> Perhaps it makes sense to wrap this stuff up in a helper method on TestingUtil so it can be reused easily, perhaps something like:
OOT - About TestingUtil - all these methods are generally used in classes that extend AbstractCacheTest (MultipleCacheManagersTest/SingleCacheManagerTest extend it as well). Wouldn't it be more API friendly to have these methods on the AbstractCacheTest rather than on TestingUtil?  
> 
> 	public DISCARD addDISCARD(Cache c) { ... }
> 
> and 
> 
> 	public DELAY addDELAY(Cache c) { ... } ?
> 
> We'd probably want the reverse as well:
> 
> 	public void removeDISCARD(Cache c) { ... }
> 	public void removeDELAY(Cache c) { ... }
> 
> 
> 
> 
> 
> On 6 Jul 2010, at 13:54, Bela Ban wrote:
> 
>> 
>> 
>> 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
>> _______________________________________________
>> infinispan-dev mailing list
>> infinispan-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
> 
> --
> Manik Surtani
> manik at jboss.org
> Lead, Infinispan
> Lead, JBoss Cache
> http://www.infinispan.org
> http://www.jbosscache.org
> 
> 
> 
> 
> 
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev




More information about the infinispan-dev mailing list