Effectiveness of Thread-Safe Queues on Devices With an Asymmetric Set of Cores
Abstract
In the article we studied the dependence of the throughput of thread-safe queues on the number of push and pop threads at various loads for each element. We have chosen and implemented singlе lock queue, two lock queue and lock free queue for the research. To study the throughput, we have implemeted benchmarks that reflect the scenarios of using queues with the same number of push and pop threads with different loads. Load parameterization is calculation multiplier, which allows you to take into account the difference in power between the cores of one device. The measurements were carried out on two devices: P50pro and Mate60pro. They were chosen because the P50pro has fewer cores than the Mate60pro, but they are more powerful. Finally, we have obtained an empirical dependence of the efficiency of queues. For the device with a large number of cores, the lock free queue either wins or is equivalent to the two lock queue at any load other than zero. On the device with a small number of cores, two lock queue wins with low loads, lock free queue wins with high loads. This dependence makes it possible to estimate the most efficient number of cores to work with the queue at known loads for each element, that allows you to get maximum performance per core.

This work is licensed under a Creative Commons Attribution 4.0 International License.
Publication policy of the journal is based on traditional ethical principles of the Russian scientific periodicals and is built in terms of ethical norms of editors and publishers work stated in Code of Conduct and Best Practice Guidelines for Journal Editors and Code of Conduct for Journal Publishers, developed by the Committee on Publication Ethics (COPE). In the course of publishing editorial board of the journal is led by international rules for copyright protection, statutory regulations of the Russian Federation as well as international standards of publishing.
Authors publishing articles in this journal agree to the following: They retain copyright and grant the journal right of first publication of the work, which is automatically licensed under the Creative Commons Attribution License (CC BY license). Users can use, reuse and build upon the material published in this journal provided that such uses are fully attributed.