diff options
| author | eunhhu <[email protected]> | 2026-09-30 03:19:45 +0100 |
|---|---|---|
| committer | eunhhu <[email protected]> | 2026-09-30 03:19:45 +0100 |
| commit | 41cb1cca55c67dd2aac2afa2f96bdc09a5d50b78 (patch) | |
| tree | e2929b52580a1d52544178c18e2f5cfaea50f993 /docs/research/103-review-004-defects.md | |
| parent | 385754c2d00ba3f4c74a22f55d4756e101f215b1 (diff) | |
| download | pure-41cb1cca55c67dd2aac2afa2f96bdc09a5d50b78.tar.gz pure-41cb1cca55c67dd2aac2afa2f96bdc09a5d50b78.zip | |
Say where a node's memory goes, and the budget it now keeps (104, 013)
104 measures a node's memory under a receiver that is down and under a
snapshot held for long (021's run.py: resident memory against what was
posted, 30 s a case). A held snapshot grew the node without end (6.4 to
678 MiB, fixed in d1e8f38); a slow receiver grows it by what was sent,
221 B a send, which is state until delivered, so the budget bounds state
and refuses past it.
013 is that budget's design: what it counts (state bytes, deterministic),
what an event over it does, why an answer takes its send's room, how
links and HTTP wait, what it does not count and those bounds, and the
checks. With --memory 4000000 the same load fills it in about 4 s and
the node stays at 9.6-9.8 MiB (45.9 MiB and growing without).
012 records the hole the budget found in the link (the full flag), and
103 that its clock fix fell short (385754c). CHECKPOINT gains the row.
Diffstat (limited to 'docs/research/103-review-004-defects.md')
| -rw-r--r-- | docs/research/103-review-004-defects.md | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/research/103-review-004-defects.md b/docs/research/103-review-004-defects.md index 3273ab3..e897c41 100644 --- a/docs/research/103-review-004-defects.md +++ b/docs/research/103-review-004-defects.md @@ -42,6 +42,19 @@ 이어받은 뒤 필드를 재배치한 모듈로 바꾸는 경우만 여전히 타입까지만 본다. - **시계 검사의 방법.** 이 기기에서 시스템 시계를 바꿀 권한은 없고, 바꿔서도 안 된다. 그래서 `CLOCK_REALTIME`만 한 시간 뒤로 돌리는 LD_PRELOAD 라이브러리를 썼다. Vega의 검사도 Pure가 만든 이 라이브러리를 쓴다(`make check`가 넘긴다). +- **뒤에 찾은 것(2026-09-30): 시계의 고침이 모자랐다.** + - `run_timers`는 마감을 monotonic clock으로 셌지만, 그 마감까지 소유자가 기다리는 `pthread_cond_timedwait`는 여전히 wall + clock의 시각까지 기다렸다. HTTP 전달의 다시 보내기 간격과, 저장소의 group commit이 함께 커밋할 스레드를 기다리는 2 ms도 + 같았다. + - 이 라이브러리는 프로세스가 읽는 시각만 옮긴다. 그래서 되돌린 시각으로 센 마감은 커널에게 이미 지난 시각이고, 기다림이 + 곧바로 끝나 되풀이된다. 검사는 틱이 이어지는 것만 보았고, 그동안 소유자가 한 코어의 64 %를 쓰는 것은 보지 못했다. + 실제로 시계를 뒤로 돌리면 반대로 기다림이 한 시간 늘어난다. 타이머가 멈추고, 전달이 한 시간 쉬며, 혼자 커밋하는 요청이 + 한 시간 걸린다. + - 고쳤다. 세 기다림 모두 monotonic clock으로 센다(`core/wait.h`). 라이브러리가 시각을 앞으로도 옮길 수 있게 했고(`CLOCK_SHIFT_S`), + check.py `server_clocks`가 한 시간 뒤로, 또 앞으로 옮긴다. + - 고치기 전: 뒤로 옮기면 CPU 159 %, 전달 시도 1.2초에 50,886번. 앞으로 옮기면 틱 1, 전달 시도 1번, 세 요청이 함께 커밋한 + 뒤 혼자 온 커밋이 끝나지 않았다(스무 번째 안에). + - 고친 뒤: 두 방향 모두 틱 59, CPU 0 %, 전달 시도 4번, 혼자 온 커밋 2.6 ms. ## 리뷰의 다른 지적 |
