aboutsummaryrefslogtreecommitdiffstats
path: root/docs/design/008-module-format.md
diff options
context:
space:
mode:
authoreunhhu <[email protected]>2026-09-27 07:37:44 +0100
committereunhhu <[email protected]>2026-09-27 07:37:44 +0100
commit78e9ba927d0c6f15e0388c8a5e056d1e82e21e88 (patch)
treeea45a572c651def9927d4f1b4c48cd2e8a59b868 /docs/design/008-module-format.md
parent9b5f7629fdf87bcbaade4b9baa349cddc631c63f (diff)
downloadpure-78e9ba927d0c6f15e0388c8a5e056d1e82e21e88.tar.gz
pure-78e9ba927d0c6f15e0388c8a5e056d1e82e21e88.zip
Choose the connection threads with --threads auto
One connection thread for each CPU the process may run on (its affinity, or the online CPUs), less the one the owner of an app with states takes: three CPUs give two connection threads and the owner. The default stays one thread.
Diffstat (limited to 'docs/design/008-module-format.md')
-rw-r--r--docs/design/008-module-format.md1
1 files changed, 1 insertions, 0 deletions
diff --git a/docs/design/008-module-format.md b/docs/design/008-module-format.md
index 3acaee6..dd16c90 100644
--- a/docs/design/008-module-format.md
+++ b/docs/design/008-module-format.md
@@ -303,6 +303,7 @@ text·리스트가 남을 때만 위치를 유지한다.
- **저장소 핸들.** 문서와 상태를 저장소 핸들(`pure_store_data`)로 열어 파일 매핑 하나를 공유하고, 묶음마다 한 번만
저장소가 바뀌었는지 본다.
- **연결 스레드와 소유자.** `--threads N`은 스레드마다 같은 포트의 리스너(`SO_REUSEPORT`), epoll, 런타임 코어를 둔다.
+ `--threads auto`는 프로세스가 쓸 수 있는 CPU마다 하나를 두고, 상태를 가진 앱이면 소유자 몫으로 하나를 뺀다.
키별 문서만 가진 모듈은 스레드마다 앱과 저장소 핸들을 두고 저장소 말고는 아무것도 나누지 않는다. 상태를 가진
모듈은 상태의 소유자가 하나여야 하므로, 연결 스레드가 하나여도 따로 소유자 스레드가 앱을 돌린다. 연결 스레드는
요청을 받고 해석하고 답을 쓰는 일(시스템 호출이 대부분이다)을 나눠 맡고, 입력과 문서 요청을 소유자에게 넘긴다.