Skip to content

Commit

Permalink
Increase the number of Remote worker setup thread.
Browse files Browse the repository at this point in the history
  • Loading branch information
yuxuan-ms committed Oct 14, 2024
1 parent f75f8b0 commit 3fa2f4e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions doc/newsfragments/3060_changed.pool_size.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Increase the number of Remote worker setup thread.
3 changes: 2 additions & 1 deletion testplan/runners/pools/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import os
import signal
import socket
from multiprocessing import cpu_count
from multiprocessing.pool import ThreadPool
from typing import Callable, Dict, List, Optional, Tuple, Type, Union

Expand Down Expand Up @@ -378,7 +379,7 @@ def _start_thread_pool(self) -> None:
size = len(self._instances)
try:
if size > 2:
self.pool = ThreadPool(5 if size > 5 else size)
self.pool = ThreadPool(min(size, cpu_count()))
except Exception as exc:
if isinstance(exc, AttributeError):
self.logger.warning(
Expand Down

0 comments on commit 3fa2f4e

Please sign in to comment.