Skip to content

Commit 1d325af

Browse files
excelle08meta-codesync[bot]
authored andcommitted
Remove srvIOThreadPool and its throw-away datagen + compression (facebookresearch#728)
Summary: Pull Request resolved: facebookresearch#728 The srvIOThread pool was a synthetic CPU placeholder for outbound RPC work back when LeafNodeRank had no real outbound RPCs: each request would fan out N tasks onto srvIOThread, each of which generated a fake response, serialized it, ran ZSTD over half the chain, and discarded the result. With Phase 5 in place, the SREventBase pool now carries real outbound RPC fanout to mock_services (issueOutboundFanout), so the placeholder is redundant and was actively skewing the prod-vs-bench category breakdown by overweighting Compression (8-13% bench vs 3-5% prod). This commit: * Drops the srvIOThread pool construction, warmup, and the --srv_io_threads CLI flag. * Removes the per-request throw-away generateResponse + serializePayload + compressThrift fanout from AsyncPageRankRequestHandler, DLRMRequestHandler (async chain), and PageRankRequestHandler (sync). The single response we actually send back to the driver is still generated and serialized — just once instead of srv_io_threads times. * Removes the unused dispatcher-thread `compressed = compressPayload(...)` / `decompressPayload(compressed)` pair from the sync PageRankRequestHandler that was paired with the same throw-away pattern. * Removes srvIOThreadPool from ThreadData and from both ThreadStartup overloads. * Removes -s / --srv_io_threads handling from packages/feedsim/run.sh and the static --srv_io_threads=36 from start_leaf_node_rank.sh. The SREventBase pool's comment is updated from "idle in Phase 4" to its actual role (carries outbound fanout), and the startup banner now lists 4 pools instead of 5. Reviewed By: YifanYuan3 Differential Revision: D105119222
1 parent f0c6215 commit 1d325af

4 files changed

Lines changed: 42 additions & 164 deletions

File tree

packages/feedsim/run.sh

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,11 @@ EVENTBASE_THREADS_DEFAULT=4 # 4 should suffice. Tune up if threads are saturate
5050
SRV_THREADS_DEFAULT=8 # 8 should also suffice for most purposes
5151
if [[ "$IS_SMT_ON" = 1 ]]; then
5252
RANKING_THREADS_DEFAULT="$(( $(nproc) * 7/20))" # 7/20 is 0.35 cpu factor
53-
SRV_IO_THREADS_DEFAULT="$(echo "${BC_MIN_FN}; min($(nproc) * 7/20, 55)" | bc)" # 0.35 cpu factor, max 55
5453
DRIVER_THREADS="$(echo "scale=2; $(nproc) / 5.0 + 0.5 " | bc )" # Driver threads, rounds nearest.
5554
DRIVER_THREADS="${DRIVER_THREADS%.*}" # Truncate decimal fraction.
5655
DRIVER_THREADS="$(echo "${BC_MAX_FN}; max(${DRIVER_THREADS:-0}, 4)" | bc )" # At least 4 threads.
5756
else
5857
RANKING_THREADS_DEFAULT="$(( $(nproc) * 15/20))" # 15/20 is 0.75 cpu factor
59-
SRV_IO_THREADS_DEFAULT="$(echo "${BC_MIN_FN}; min($(nproc) * 11/20, 55)" | bc)" # 0.55 cpu factor, max 55
6058
DRIVER_THREADS="$(echo "scale=2; $(nproc) / 4.0 + 0.5 " | bc )" # Driver threads, rounds nearest.
6159
DRIVER_THREADS="${DRIVER_THREADS%.*}" # Truncate decimal fraction.
6260
DRIVER_THREADS="$(echo "${BC_MAX_FN}; max(${DRIVER_THREADS:-0}, 4)" | bc )" # At least 4 threads.
@@ -69,7 +67,6 @@ Usage: ${0##*/} [OPTION]...
6967
-h Display this help and exit
7068
-t Number of threads to use for thrift serving. Large dataset kept per thread. Default: $THRIFT_THREADS_DEFAULT
7169
-c Number of threads to use for fanout ranking work. Heavy CPU work. Default: $RANKING_THREADS_DEFAULT
72-
-s Number of threads to use for task-based serialization cpu work. Default: $SRV_IO_THREADS_DEFAULT
7370
-l Number of threads to use for load generation in the drivers. Default: $DRIVER_THREADS
7471
-a When searching for the optimal QPS, automatically adjust the number of client driver threads by
7572
min(requested_qps / 4, $(nproc) / 5) in each iteration (experimental feature).
@@ -146,9 +143,6 @@ main() {
146143
local ranking_cpu_threads
147144
ranking_cpu_threads="$RANKING_THREADS_DEFAULT"
148145

149-
local srv_io_threads
150-
srv_io_threads="$SRV_IO_THREADS_DEFAULT"
151-
152146
local driver_threads
153147
driver_threads="$DRIVER_THREADS"
154148

@@ -303,10 +297,6 @@ main() {
303297
ranking_cpu_threads="$2"
304298
shift
305299
;;
306-
-s)
307-
srv_io_threads="$2"
308-
shift
309-
;;
310300
-l)
311301
driver_threads="$2"
312302
shift
@@ -724,7 +714,6 @@ main() {
724714
--timekeeper_threads=2 \
725715
--io_threads="$EVENTBASE_THREADS_DEFAULT" \
726716
--srv_threads="$SRV_THREADS_DEFAULT" \
727-
--srv_io_threads="$srv_io_threads" \
728717
--num_objects=2000 \
729718
--graph_max_iters=1 \
730719
--noaffinity \

packages/feedsim/third_party/src/scripts/start_leaf_node_rank.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
--timekeeper_threads=2 \
1313
--io_threads=4 \
1414
--srv_threads=8 \
15-
--srv_io_threads=36 \
1615
--num_objects=2000 \
1716
--graph_max_iters=1 \
1817
--noaffinity \

0 commit comments

Comments
 (0)