Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New implementation of WorkQueue that allows concurrent enqueuing of tasks #2859

Merged
merged 4 commits into from
Mar 16, 2021

Commits on Mar 12, 2021

  1. New implementation of WorkQueue that allows concurrent enqueuing of t…

    …asks. Previous implementation was based on LinkedBlockingQueue which uses a lock to prevent concurrent additions to the queue. Under high concurrency, this effectively introduces a "chicane" that results in a lot of threads waiting and a poor CPU utilization. The new implementation uses a ConcurrentLinkedQueue and two semaphores to enable concurrent enqueuing of tasks. The poor CPU utilization was discovered while running DBClient tests that used a ThreadPool to execute blocking calls.
    
    Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>
    spericas committed Mar 12, 2021
    Configuration menu
    Copy the full SHA
    1882407 View commit details
    Browse the repository at this point in the history
  2. Use try-finally when calling enqueue(task).

    Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>
    spericas committed Mar 12, 2021
    1 Configuration menu
    Copy the full SHA
    bc450f5 View commit details
    Browse the repository at this point in the history
  3. Fixed unnecessary formatting.

    Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>
    spericas committed Mar 12, 2021
    Configuration menu
    Copy the full SHA
    e48b6e4 View commit details
    Browse the repository at this point in the history

Commits on Mar 15, 2021

  1. Moved try-block logic into enqueue() method. New implementation of dr…

    …ainTo().
    
    Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>
    spericas committed Mar 15, 2021
    Configuration menu
    Copy the full SHA
    2885e99 View commit details
    Browse the repository at this point in the history