Skip to content

[TransferEngine] Keep the TCP connection pool off by default - #19

Merged
Juhyun-Kim-Memphis merged 1 commit into
our_mainfrom
inf-522/tcp-pool-default-off
Sep 21, 2026
Merged

Juhyun-Kim-Memphis merged 1 commit into
our_mainfrom
inf-522/tcp-pool-default-off

Conversation

@Juhyun-Kim-Memphis

@Juhyun-Kim-Memphis Juhyun-Kim-Memphis commented Sep 21, 2026 •

Copy link
Copy Markdown
Collaborator

무엇을 바꾸는가

mooncake-transfer-engine/include/transport/tcp_transport/tcp_transport.h의 enable_connection_pool_ 기본값을 true → false. 한 줄이며, upstream kvcache-ai#3569(36fdd899, 2026-08-24 병합, v0.3.13 포함) 이전의 기본값으로 되돌립니다.

환경 변수 MC_TCP_ENABLE_CONNECTION_POOL은 그대로 우선합니다. 값이 0/false/no면 끄고, 다른 값이면 켭니다. 그러니 pool이 필요한 워크로드는 명시적으로 켜면 됩니다.

왜

upstream 상태와 들고 있는 비용

  • upstream에 제출하지 않는 carry-only입니다. upstream은 의도적으로 기본값을 켰고, 우리 근거(P/D + mooncake TCP의 빈 응답)는 #2930이 풀리기 전까지의 fork 사정입니다.
  • 비용: 이 한 줄이 upstream과 달라서, 이후 sync에서 upstream이 이 줄 근처를 바꾸면 충돌할 수 있습니다. #2930이 닫히고 빈 응답이 재현되지 않으면 이 PR을 되돌립니다.
  • 참고: grouped scatter task는 pool이 꺼져 있어도 lane을 씁니다(if (enable_connection_pool_ || reuse_connection)). 이는 우리 base 이전부터의 동작이고 이 PR은 바꾸지 않습니다.

검증

wheel 버전 PR의 커밋과 이 커밋을 쌓은 브랜치(inf-522/tcp-pool-default-off, 794ce2d8)로 확장 unit gate를 한 번 돌렸습니다: PASS, 로컬 Docker(linux/amd64, w-0529 점유로 BuildKit Job 대신), attest 794ce2d800e85da6c06efe30322f61820d076637, 09:07:46Z → 09:30:23Z(22분 37초), suite 9개 100% tests passed, 0 tests failed out of 9.
이 gate는 store suite만 돌리지만, file_storage_test 등은 in-process master와 tcp transport를 쓰므로 새 기본값으로 실행됐습니다. transfer engine의 TCP 테스트 중 pool을 쓰는 것들은 MC_TCP_ENABLE_CONNECTION_POOL=1을 스스로 설정합니다.

Upstream: none (carry-only)

Refs: INF-522

Upstream kvcache-ai#3569 turned the TCP connection pool on by default, to fix several
instances sharing one IP and ephemeral-port exhaustion with the pool off
(kvcache-ai#3540). With P/D disaggregation over mooncake TCP, the pool is the unsafe
setting for us: measured in both directions on the same cell, enabling it
made 5-41% of requests return HTTP 200 with zero completion tokens -- prefill
done, the decode stream never carrying a token. Upstream's kvcache-ai#2930 (stale pooled
connections to a restarted peer are never evicted; large multi-slice transfers
stall silently) is still open, and none of the TCP fixes since claims to cure
that failure class.

Restore the pre-kvcache-ai#3569 default. MC_TCP_ENABLE_CONNECTION_POOL still decides
when set: 0/false/no turns the pool off, any other value turns it on, so a
workload that needs the pool opts in explicitly.

Upstream: none (carry-only)
@Juhyun-Kim-Memphis Juhyun-Kim-Memphis added upstream:carry-only 우리 고유 수정 — upstream 제출 대상 아님 Transfer Engine labels Sep 21, 2026
@Juhyun-Kim-Memphis Juhyun-Kim-Memphis self-assigned this Sep 21, 2026
@Juhyun-Kim-Memphis Juhyun-Kim-Memphis added upstream:carry-only 우리 고유 수정 — upstream 제출 대상 아님 Transfer Engine labels Sep 21, 2026
@Juhyun-Kim-Memphis
Juhyun-Kim-Memphis marked this pull request as ready for review September 21, 2026 10:10
@Juhyun-Kim-Memphis
Juhyun-Kim-Memphis merged commit dcfb6b3 into our_main Sep 21, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-ci Transfer Engine upstream:carry-only 우리 고유 수정 — upstream 제출 대상 아님

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant