简体   繁体   English

多线程尾端正在降低 Chronicle Queue 的读取性能

[英]Multithread tailers is decreasing the reading performance on Chronicle Queue

Hi guys I have developed a multithread application that use Chronicle Queue to persist the data exchanged.大家好,我开发了一个多线程应用程序,它使用 Chronicle Queue 来持久化交换的数据。 For each thread I create a new chronicle queue instance, all of than pointing to the same file.对于每个线程,我创建一个新的编年史队列实例,所有这些实例都指向同一个文件。 When the number of the threads increase (or the number of tailers) the reading performance is impacted.当线程数量增加(或尾部数量)时,读取性能会受到影响。 I am using a regular chronicle single binary queue with default read/write lock.我正在使用具有默认读/写锁的常规编年史单个二进制队列。 Could some one face a similar issue like that before?有人会遇到类似的问题吗? All of my threads are reading the queue in a busy spin mode.我所有的线程都在忙碌的旋转模式下读取队列。

You don't have to create a Chronicle queue per thread.您不必为每个线程创建一个 Chronicle 队列。 You can create a single instance of Chronicle queue, then for each thread, create a tailer by calling createTailer.您可以创建 Chronicle 队列的单个实例,然后为每个线程通过调用 createTailer 创建一个tailer。 So it is only the tailer that you have to have per thread.所以它只是每个线程必须拥有的tailer。 Not the queue.不是队列。 Please try that and let me know if it helps.请尝试一下,如果有帮助,请告诉我。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM