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
Copy file name to clipboardExpand all lines: asyncflow_queue_limit/asyncflow_mmc_split.ipynb
+6-15Lines changed: 6 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -5,12 +5,12 @@
5
5
"id": "870337dc",
6
6
"metadata": {},
7
7
"source": [
8
-
"# AsyncFlow — MMc Theory vs Simulation (Guided Notebook)\n",
8
+
"# AsyncFlow — MMc split Theory vs Simulation (Guided Notebook)\n",
9
9
"\n",
10
10
"This notebook shows how to:\n",
11
11
"\n",
12
12
"1. Make imports work inside a notebook (src-layout or package install)\n",
13
-
"2. Build a **multi-server** scenario compatible with **M/M/c** assumptions\n",
13
+
"2. Build a **multi-server** scenario compatible with **M/M/c** assumptions in the case of n parallel M/M/1\n",
14
14
"3. Run the simulation and collect results\n",
15
15
"4. Compare theory vs observed KPIs (pretty-printed table)\n",
16
16
"5. Plot the standard dashboards (latency, throughput, server time series)\n",
@@ -84,15 +84,11 @@
84
84
" Service times follow an **Exponential** distribution with mean \\$E\\[S]\\$ (service rate \\$\\mu = 1/E\\[S]\\$). No RAM/IO steps are included in the pipeline.\n",
85
85
"\n",
86
86
"* **Load balancer with round-robin dispatch**\n",
87
-
" A **single load balancer** is required when \\$c > 1\\$. It splits arrivals **round-robin** across servers, so each server has its own local queue.\n",
87
+
" A **single load balancer** is required when \\$c > 1\\$. It splits arrivals **randomly** across servers, so each server has its own local queue.\n",
88
88
" This corresponds to a **split M/M/c** model, not the textbook pooled queue.\n",
89
89
"\n",
90
-
"* **Deterministic, very small network latency**\n",
91
-
" All edges have **fixed latency** \\$\\ll 1,\\mathrm{ms}\\$. Queueing behavior is therefore dominated by CPU service, closely matching textbook assumptions.\n",
92
-
"\n",
93
90
"* **“Poisson arrivals” via the generator**\n",
94
-
" Arrivals are produced by the same **two-stage, windowed Poisson sampler**: in each user-sampling window \\$\\Delta\\$, we draw the active users \\$U\\$ (Poisson or Normal, per config).\n",
95
-
" Within the window, arrivals are a **homogeneous Poisson process** with rate \\$\\Lambda = U \\cdot \\lambda\\_r/60\\$.\n",
91
+
" \n",
96
92
"\n",
97
93
" \n",
98
94
"\n",
@@ -234,7 +230,7 @@
234
230
"id": "da98b8b9",
235
231
"metadata": {},
236
232
"source": [
237
-
"## 3) MMc (Round-Robin) — theory vs observed comparison\n",
233
+
"## 3) MMc (Random) — theory vs observed comparison\n",
238
234
"\n",
239
235
"If the payload violates MMc assumptions, a readable error is shown instead.\n",
240
236
"This section matches exactly what the analyzer computes **now**: a **split random model** (not the pooled FCFS/Erlang-C model). When we add **FCFS** in the LB, we’ll also expose the textbook Erlang-C formulas side-by-side.\n",
@@ -366,12 +362,7 @@
366
362
"\n",
367
363
"### Why small deltas appear\n",
368
364
"\n",
369
-
"* **Windowed arrivals:** The generator uses a **windowed** active-user sampler; across windows the rate is piecewise-constant (Cox process), not one global Poisson.\n",
370
-
"* **Finite horizon / warm-up:** Short runs and lack of warm-up bias early windows.\n",
371
-
"* **Network latency:** Small but non-zero link delays add a constant component to $W$.\n",
372
-
"\n",
373
-
"\n",
374
-
"Increasing the run length, keeping edges tiny and deterministic, and ensuring identical servers will usually shrink Theory–Observed gaps. "
365
+
"* **Finite horizon / warm-up:** Short runs and lack of warm-up bias early windows.\n"
0 commit comments