aboutsummaryrefslogtreecommitdiffstats
path: root/docs/research/075-http-host-against-axum.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/research/075-http-host-against-axum.md')
-rw-r--r--docs/research/075-http-host-against-axum.md23
1 files changed, 23 insertions, 0 deletions
diff --git a/docs/research/075-http-host-against-axum.md b/docs/research/075-http-host-against-axum.md
index 96814d3..308363e 100644
--- a/docs/research/075-http-host-against-axum.md
+++ b/docs/research/075-http-host-against-axum.md
@@ -52,3 +52,26 @@ PUT은 연결마다 자기 키 앞에 16 B를 넣고 받은 ETag로 다음 `If-M
4. 모듈 서버의 무복사 GET.
중단 기준: 어떤 단계든 메모리가 axum보다 커지거나, 저장 보장(확인 응답 = 저장됨, `kill -9` 검사)이 깨지면 그 방식은 버린다.
+
+## 1단계 결과: `pure-serve` (소유 스레드 하나)
+
+새 호스트 [`serve.c`](../../prototypes/connections/serve.c): 지속 연결·파이프라이닝, edge-triggered epoll, 연결
+최대 1,024(받을 때 할당), `writev` 응답, 같은 런타임 코어와 묶음 커밋. 같은 조건에서 다시 쟀다.
+
+`strace -c`로 보니 GET 하나마다 저장소 draft를 여닫느라 시스템 호출이 9번(파일·디렉터리 열기, `fstat` 두 번,
+전체 `mmap`/`munmap`, head 읽기)이었다. 저장소 핸들(`pure_store_open`)이 매핑을 공유하고 열 때 파일이 바뀌었는지만
+본다(2번).
+
+| 작업 | 이전 Pure | pure-serve, 핸들 전 | **pure-serve** | axum 메모리(3코어) | axum 충돌 안전 |
+|---|---:|---:|---:|---:|---:|
+| GET 64 B, keep-alive | 23,892 | 57,971 | **106,447** (p99 736) | 126,160 (p99 768) | 126,865 |
+| GET 64 B, 매번 새 연결 | 23,852 | 22,912 | 23,315 | 21,947 | 22,703 |
+| GET 1 MiB, keep-alive | 1,197 | 1,537 | **1,741** | 1,370 | 1,354 |
+| PUT 저장 보장, 연결 64 | 191 | 1,081 | **1,126** | – | 372 |
+| PUT 저장 보장, 연결 8 | 171 | 333 | **336** | – | 63 |
+
+최대 RSS: pure-serve 7.3 MiB, axum 17.4–19.6 MiB.
+
+- 코어 하나로 axum(코어 3개)의 84%(작은 keep-alive GET), p99는 같다. 큰 읽기는 27% 빠르다.
+- 저장 보장 쓰기는 충돌 안전 axum의 3.0–5.3배, 안전하지 않은 axum(429/s)보다도 빠르다.
+- 남은 차이는 코어 수다. 다음은 2단계(코어마다 소유 스레드)다.