Disruptor技术调研之配置参数一览
1、单生产者和多生产者 One of the best ways to improve performance in concurrect systems is to ahere to the Single Writer Princple, this applies to the Disruptor. If you are in the situation where there will only ever be a single thread producing events into the Disruptor, then you can take advantage of this to gain additional performance. 上述的描述大致的意思是在多并发的系统中,如果选择基于单生产者的Disruptor,能够获得比多生产者更好的性能。 2、可选择的等待策略 1)Disruptor默认的等待策略是BlockingWaitStrategy。内部是使用lock和condition来进行线程间的协作的。相对于其他的策略是最慢的但对cpu的使用是最保守的,也是所有选项中一致性行为最高的。 2)和BlockingWaitStrategy一样,SleepingWaitStrategy尝试保守的使用cpu,通过使用busy wait loop