You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 627248a
Browse filesBrowse the repository at this point in the historyBrowse files
README: motivation preface, five mermaid charts, pkg made co-equal
Section 0 argues the case - the -m bet and the per-worker -M
multiplier - with a sizing-dilemma chart. The grow path, the
GROW-BLOCKED machine (replacing the ASCII art), the measured arm-K
cycle and the pkg burst multiplier each get a rendered diagram, and
the quickstart now points at pkg_auto_scaling_profile.
*Top, flat: a fixed `-m 512` sized for the storm, paid around the
64
+
clock. Middle, stepped: what v3 keeps committed — granule steps up
65
+
under load, shrink lagging the peak by the quiet window. Bottom: live
66
+
demand. (Illustrative shapes; a measured cycle is charted in
67
+
Section 8.)*
68
+
69
+
v3 replaces both bets with a **range**: `-m 64:512 -M 16:32`. Start at
70
+
the size you can defend, reserve the ceiling (address space — free),
71
+
commit physical pages only as demand arrives, hand back what goes
72
+
quiet. Growth stops at three independent limits — your policy, the
73
+
backing tier, the host's real free RAM (pkg charged × the worker
74
+
count). Every decision is a counter you can scrape, the one state that
75
+
deserves a page is a latched event, and a dry-run mode narrates what it
76
+
*would* have done before you let it do anything.
77
+
28
78
Every mechanism below was chosen **by measurement first** — including
29
79
two designs that looked right on paper and were proven memory-corrupting
30
80
before a line of allocator code was written. The log lines, MI output
@@ -33,6 +83,7 @@ mockups.
33
83
34
84
**Contents**
35
85
86
+
0.[Why an elastic arena](#0-why-an-elastic-arena)
36
87
1.[Quickstart](#1-quickstart)
37
88
2.[Concepts and architecture](#2-concepts-and-architecture)
38
89
3.[Why the cap is on the command line](#3-why-the-cap-is-on-the-command-line)
@@ -85,6 +136,9 @@ auto_scaling_profile = MEM_SHM
85
136
shm_auto_scaling_profile = MEM_SHM
86
137
```
87
138
139
+
`pkg_auto_scaling_profile` takes the same grammar and does the same
140
+
for every worker's private arena — Section 11.
141
+
88
142
Watch it work:
89
143
90
144
```bash
@@ -289,26 +343,54 @@ differentially — with one floor, a 16 MB pkg delta was refused while
289
343
WARNING:core:hg_grow_ram_refused: pkg: refusing to grow by 16 MB: 144 MB effective (x9 processes) would leave the host under the 14589 MB floor (MemAvailable 14562 MB). Freeing host memory or lowering the floor lifts this.
290
344
```
291
345
346
+
The whole grow path, trigger to publish:
347
+
348
+
```mermaid
349
+
flowchart TD
350
+
A["allocation would fail
351
+
(chunk carve / large tier / region)"] -- "grow-and-retry" --> G
*Top, flat: a fixed `-m 512` sized for the storm, paid around the
58
+
clock. Middle, stepped: what v3 keeps committed — granule steps up
59
+
under load, shrink lagging the peak by the quiet window. Bottom: live
60
+
demand. (Illustrative shapes; a measured cycle is charted in
61
+
Section 8.)*
62
+
63
+
v3 replaces both bets with a **range**: `-m 64:512 -M 16:32`. Start at
64
+
the size you can defend, reserve the ceiling (address space — free),
65
+
commit physical pages only as demand arrives, hand back what goes
66
+
quiet. Growth stops at three independent limits — your policy, the
67
+
backing tier, the host's real free RAM (pkg charged × the worker
68
+
count). Every decision is a counter you can scrape, the one state that
69
+
deserves a page is a latched event, and a dry-run mode narrates what it
70
+
*would* have done before you let it do anything.
71
+
22
72
Every mechanism below was chosen **by measurement first** — including
23
73
two designs that looked right on paper and were proven memory-corrupting
24
74
before a line of allocator code was written. The log lines, MI output
@@ -27,6 +77,7 @@ mockups.
27
77
28
78
**Contents**
29
79
80
+
0.[Why an elastic arena](#0-why-an-elastic-arena)
30
81
1.[Quickstart](#1-quickstart)
31
82
2.[Concepts and architecture](#2-concepts-and-architecture)
32
83
3.[Why the cap is on the command line](#3-why-the-cap-is-on-the-command-line)
@@ -79,6 +130,9 @@ auto_scaling_profile = MEM_SHM
79
130
shm_auto_scaling_profile = MEM_SHM
80
131
```
81
132
133
+
`pkg_auto_scaling_profile` takes the same grammar and does the same
134
+
for every worker's private arena — Section 11.
135
+
82
136
Watch it work:
83
137
84
138
```bash
@@ -283,26 +337,54 @@ differentially — with one floor, a 16 MB pkg delta was refused while
283
337
WARNING:core:hg_grow_ram_refused: pkg: refusing to grow by 16 MB: 144 MB effective (x9 processes) would leave the host under the 14589 MB floor (MemAvailable 14562 MB). Freeing host memory or lowering the floor lifts this.
284
338
```
285
339
340
+
The whole grow path, trigger to publish:
341
+
342
+
```mermaid
343
+
flowchart TD
344
+
A["allocation would fail
345
+
(chunk carve / large tier / region)"] -- "grow-and-retry" --> G
0 commit comments