Uploaded image for project: 'ActiveMQ Artemis'
  1. ActiveMQ Artemis
  2. ARTEMIS-2177

Allow to use a work-stealing thread pool executor

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Abandoned
    • 2.6.3
    • None
    • Broker
    • None

    Description

      Currently ActiveMQThreadPoolExecutor uses internally a shared LinkedBlocking queue that always perform a lock to push messages into the queue and signal to wake up any (if any) awaiting consumer thread.
      This mechanics has 2 disadvantages:

      • given that the Runnable queue is contended among all the offering/consuming threads it scales negatively
      • the cost on offer side of awaking a dormient thread is quite high

      To improve this behaviour would be nice to use a work stealing pool that spread the cost of using the same queue by
      distributing the offers among different runnable queues and that can reduce the cost of awaking a dormient thread only if no thread is able
      to execute a submitted task.
      Such work stealing pool already exists and is the ForkJoin pool available from Java >=8.

      Attachments

        Activity

          People

            nigro.fra@gmail.com Francesco Nigro
            nigro.fra@gmail.com Francesco Nigro
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: