Uploaded image for project: 'JGroups'
  1. JGroups
  2. JGRP-2896

PerDestinationBundler: use only a single sender thread

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Done
    • Icon: Major Major
    • 5.5.0
    • None
    • None
    • False
    • Hide

      None

      Show
      None
    • False

      PerDestinationBundler has 1 sender thread for each destination queue. Investigate whether replacing this with a single sender thread improves performance. The single sender thread iterates over all queues and sends messages where available.

      This reduces the total number of threads and also reduces contention on the queues.

      Comparison to TransferQueueBundler and existing PerDestinationBundler:

      • P: number of producers, e.g. 100
      • N: number of destinations, e.g. 10
        TQB PDB PDB2
      contention on a single queue P + 1: 101 P/N+1: 11 P/N + 1/N: 10 + 1/10
      total # of threads P+1: 101 P+N: 110 P+1: 101

      PDB2 reduces threads compared to PDB, as it only uses a single sender. Also, it only contends with producers roughly 10 percent of the time for the same queue.

      The single sender thread in PDB2 tries to remove all messages from the queues, round-robing among them. When no message are available, it blocks and is awoken by a producer when adding new messages.

              rhn-engineering-bban Bela Ban
              rhn-engineering-bban Bela Ban
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: