"git@developer.sourcefind.cn:OpenDAS/ollama.git" did not exist on "2f0a8c8778c9258dbe44c2d04b85fac82e3bf7b9"
Commit 1a57e416 authored by Lianmin Zheng's avatar Lianmin Zheng
Browse files

do not launch workers in parallel

parent adc97426
...@@ -86,8 +86,12 @@ class Controller: ...@@ -86,8 +86,12 @@ class Controller:
f"Failed to start local worker {i}\n{get_exception_traceback()}" f"Failed to start local worker {i}\n{get_exception_traceback()}"
) )
with ThreadPoolExecutor(server_args.dp_size) as executor: for i in range(server_args.dp_size):
executor.map(start_dp_worker, range(server_args.dp_size)) start_dp_worker(i)
# Parallel launch is slower, probably due to the disk bandwidth limitations.
# with ThreadPoolExecutor(server_args.dp_size) as executor:
# executor.map(start_dp_worker, range(server_args.dp_size))
def have_any_live_worker(self): def have_any_live_worker(self):
return any(worker_thread.liveness for worker_thread in self.workers.values()) return any(worker_thread.liveness for worker_thread in self.workers.values())
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment