cubrid icon indicating copy to clipboard operation
cubrid copied to clipboard

[CBRD-26392] Add network I/O budget to connection worker to stabilize overall throughput

Open hyahong opened this issue 1 month ago • 1 comments

http://jira.cubrid.org/browse/CBRD-26392

Purpose

한번에 송수신할 수 있는 양을 제어하여 다른 연결들의 송수신이 밀리지 않게 합니다. recv_budget_per_connection, send_budget_per_connection가 추가되며 각각 default는 16 KB, 32 KB입니다.

Implementation

edge trigger를 사용하고 있기 때문에 송수신이 budget을 넘은 경우 유저 수준에서 소켓을 별도로 관리해줘야 합니다. edge trigger에서 EAGAIN이 나오지 않은 소켓의 이벤트는 EAGAIN이 나올 때까지 커널에 의해 관리되지 않습니다.

recv/send -> (EAGAIN인 경우) -> epoll의 다음 처리를 대기 -> (다음 epoll 루프까지 대기) -> (budget 초과인 경우) -> 유저 수준에서 관리 -> (EAGAIN인 경우 유저 관리에서 제외: epoll에서 관리)

Remarks

앞선 PR들이 머지되지 않았기 때문에 변경점을 제대로 보이기 위해 리뷰 만을 위해 연 PR입니다. 실제 병합은 다른 PR로 수행합니다. 검증은 recv_budget_per_connection, send_budget_per_connection를 줄여 확인하였습니다.

hyahong avatar Dec 12 '25 12:12 hyahong

/run all

hyahong avatar Dec 17 '25 03:12 hyahong