Improve get optimal count of max_worker for pool

Bug #1739034 reported by Chenjun Shen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
futurist
Fix Released
Undecided
Chenjun Shen

Bug Description

In the upstream of futures library, the DEFAULT value max_worker for ThreadPoolExecutor and ProcessPoolExecutor has been changed to:

ThreadPoolExecutor

max_worker = cpu_count() * 5

Reference:
https://github.com/agronholm/pythonfutures/blob/master/concurrent/futures/thread.py#L109

ProcessPoolExecutor

max_worker = cpu_count()

Reference:
https://github.com/agronholm/pythonfutures/blob/master/concurrent/futures/process.py#L278

So we should do it as well.

Chenjun Shen (cshen)
description: updated
Chenjun Shen (cshen)
Changed in futurist:
assignee: nobody → Chenjun Shen (cshen)
Revision history for this message
Chenjun Shen (cshen) wrote :
Changed in futurist:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to futurist (master)

Reviewed: https://review.openstack.org/529082
Committed: https://git.openstack.org/cgit/openstack/futurist/commit/?id=8fff2242ff53735255247a1b126727e374fe9159
Submitter: Zuul
Branch: master

commit 8fff2242ff53735255247a1b126727e374fe9159
Author: Chenjun Shen <email address hidden>
Date: Tue Dec 19 15:19:56 2017 +0100

    Improve get optimal count of max_worker for pool

    In the upstream of futures library, the DEFAULT value max_worker
    for ThreadPoolExecutor and ProcessPoolExecutor has been changed to:

    ThreadPoolExecutor

    max_worker = cpu_count() * 5

    Reference:
    https://github.com/agronholm/pythonfutures/blob/master/concurrent/futures/thread.py#L109

    ProcessPoolExecutor

    max_worker = cpu_count()

    Reference:
    https://github.com/agronholm/pythonfutures/blob/master/concurrent/futures/process.py#L278

    So we should do it as well.

    Change-Id: Id68e38a639c41426f125180ad335fb1fb97cba59
    Closes-bug: #1739034

Changed in futurist:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/futurist 1.6.0

This issue was fixed in the openstack/futurist 1.6.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.