You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Francesco Nigro (Jira)" <ji...@apache.org> on 2019/11/26 08:03:00 UTC

[jira] [Updated] (ARTEMIS-2562) Reduces context-switches on iocb pool

     [ https://issues.apache.org/jira/browse/ARTEMIS-2562?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Francesco Nigro updated ARTEMIS-2562:
-------------------------------------
    Description: 
io_control.iocbLock can be turned into a pthread_spinlock_t to save context-switches while recycling/reusing iocb from the io_context.iocb pool: recycling/reusing is very likely to be contended under load causing parking/unparking of threads for no reasons, given that the critical section is CPU-bounded and very quick.

A better solution (but far more impactful) would be use a specific lock-free data-structure as a  iocb pool eg http://www.1024cores.net/home/lock-free-algorithms/queues/bounded-mpmc-queue or a simpler single-producer multi-consumer variant of it

  was:
io_control.iocbLock can be turned into a pthread_spinlock_t to save context-switches while recycling/reusing iocb from the io_context.iocb pool: recycling/reusing is very likely to be contended under load causing parking/unparking of threads for no reasons, given that the critical section is CPU dominated and very quick.

A better solution (but far more impactful) would be use a specific lock-free data-structure as a  iocb pool eg http://www.1024cores.net/home/lock-free-algorithms/queues/bounded-mpmc-queue or a simpler single-producer multi-consumer variant of it


> Reduces context-switches on iocb pool
> -------------------------------------
>
>                 Key: ARTEMIS-2562
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-2562
>             Project: ActiveMQ Artemis
>          Issue Type: New Feature
>          Components: ActiveMQ-Artemis-Native
>    Affects Versions: native-1.0.1
>            Reporter: Francesco Nigro
>            Assignee: Clebert Suconic
>            Priority: Major
>
> io_control.iocbLock can be turned into a pthread_spinlock_t to save context-switches while recycling/reusing iocb from the io_context.iocb pool: recycling/reusing is very likely to be contended under load causing parking/unparking of threads for no reasons, given that the critical section is CPU-bounded and very quick.
> A better solution (but far more impactful) would be use a specific lock-free data-structure as a  iocb pool eg http://www.1024cores.net/home/lock-free-algorithms/queues/bounded-mpmc-queue or a simpler single-producer multi-consumer variant of it



--
This message was sent by Atlassian Jira
(v8.3.4#803005)