Commit ae466995 authored by sevenuz's avatar sevenuz
Browse files

client: disable the Margo handle cache of the client engines

Margo returns a handle to its cache by appending it to a singly linked
free list, which walks the list to its tail while holding the
engine-wide ABT mutex. With many threads on one engine they queue behind
that mutex and throughput collapses (PC, one engine, 32 threads: 15k
stat RPC/s with the default size 32, 61k with size 0; FUSE with 32
processes: 2.4k vs 18.4k stat/s; exp-handlecache). With size 0 every RPC
creates and destroys its Mercury handle, at most 4 % slower with one
thread.

Co-Authored-By: default avatarClaude Opus 5.5 <noreply@anthropic.com>
parent 2ae0ccf1
Loading
Loading
Loading
Loading
+2 −1
Changes for src/client/preload.cpp: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -247,7 +247,8 @@ init_environment() {
        auto margo_config = R"(
            {
                "use_progress_thread" : true,
                "rpc_thread_count" : 0
                "rpc_thread_count" : 0,
                "handle_cache_size" : 0
            }
        )";
        CTX->rpc_engine(nullptr);