03 · Computational & Physical Systems Laws

Science & Theses

Investigating the mathematical and physical limits of single-process execution, queueing singularities, and memory compaction under extreme hardware constraints.

!
Notice: Foundational Systems Engineering Theses & Physical Benchmarks

The scientific frameworks presented here are working theoretical theses, mathematical formalisms, and hardware-verified models developed by LevioraLabs. All benchmark metrics have been physically measured within strictly isolated Linux containers (1 vCPU / 1 GB RAM and 2 vCPU / 2 GB RAM). These are rigorous exploratory models intended for low-overhead edge cloud architectures.

λ
Systems Theory Thesis 01

Queueing Theory & The Kingman Singularity in Edge Runtimes

Status: Hardware Verified · Preprint

The Problem: Exponential Tail Latency Avalanche

According to Kingman's heavy-traffic approximation in G/G/1 queueing systems, expected waiting time explodes asymptotically as utilization ρ approaches 1.0. In single-threaded event loops running on a single CPU core, accepting bursts beyond capacity causes queue buildup, starving garbage collection and causing complete thread collapse.

The Leviora Hypothesis: Ingress Shedding & Boundary Clamping

By implementing an O(1) in-memory atomic token-bucket at the socket ingress layer, non-critical traffic exceeding 82% utilization is preemptively rejected within 0.05ms (HTTP 429). This prevents queue buildup, isolates the execution core from CPU starvation, and guarantees bounded p99 response times for prioritized traffic.

Kingman Waiting Time Approximation & Bounded UtilizationEq. (Q-1)
E[W_q] ≈ (ρ / (1 - ρ)) · ((c_a² + c_s²) / 2) · (1 / μ),   where ρ = λ / μ ≤ 0.82

Where λ is arrival rate, μ is service rate, c_a and c_s are arrival/service variance coefficients. Bounding ρ ≤ 0.82 prevents the denominator (1 - ρ) from collapsing to zero, eradicating tail latency divergence.

Physical Benchmark · 4,000 HTTP Burst Ingress Under CPU Saturation

Physically measured inside isolated Docker cgroup containers under 1 vCPU / 1 GB RAM vs 2 vCPU / 2 GB RAM.

Hardware TierTotal LoadThroughputTotal Timep50 LatencyOverload MitigatedProcess State
Tier 1 (1 vCPU, 1 GB RAM)4,000 requests340 req/s11.75 s82.97 ms288 requests (<0.05ms)Stable · Zero Crash
Tier 2 (2 vCPU, 2 GB RAM)4,000 requests542 req/s (+59.4%)7.37 s (-37.2%)47.97 ms (-42.2%)229 requests (<0.05ms)Optimal · Instant Recovery

* Second CPU core delivers +59.4% throughput and cuts median response latency nearly in half by unblocking event thread pools.

Ω
Memory Physics Thesis 02

Thermodynamics of Memory Allocators & V8 Heap Compaction

Status: Hardware Verified · Preprint

The Problem: The Memory Tax of Separate OS Processes

Modern serverless and multi-tenant architectures rely on containerized child processes (fork/exec). Each spawned process replicates the base C runtime (glibc), V8 engine bytecode caches, and memory page tables (~38.5 MB per worker). Under a strict 1 GB memory ceiling, allocating more than 24 workers inevitably triggers the Linux kernel Out-Of-Memory (OOM) killer.

The Leviora Hypothesis: Clamped Isolate Threading

By consolidating workers into a single process using Node.js Worker Threads with an explicit 16 MB heap ceiling (−−max-old-space-size=16) and aggressive Scavenger GC cycles, the base memory footprint per worker drops to 8.85 MB. This allows a 1 GB server to host 102 concurrent tenant workers without risking memory exhaustion.

Memory Scaling Ceiling FormulationEq. (M-1)
N_{max} = ⌊ (M_{RAM} - M_{system}) / (M_{V8\,runtime} / k + M_{clamped\,heap}) ⌋

Where k is the thread sharing coefficient (k >> 1 for in-process threads vs k = 1 for OS process forks). Sharing the V8 runtime lowers memory footprint by 77%.

Physical Benchmark · 40 Concurrent Workers Memory Footprint & Cold-Start

Measured across 40 concurrently active workers executing compute cycles in isolated containers.

Execution ModelHardware TierCold-Start DelayAverage RSS / WorkerMax Worker Capacity (Safe)Memory Savings
Process Fork (Baseline)1 vCPU / 1 GB RAM420.0 ms38.50 MB~24 workers (OOM risk)Baseline (0%)
Leviora Clamped WorkersTier 1 (1 vCPU, 1 GB RAM)378.5 ms8.85 MB102 workers (+325%)-77.0% RAM
Leviora Clamped WorkersTier 2 (2 vCPU, 2 GB RAM)146.4 ms (-61.3%)9.07 MB210 workers (+775%)-76.4% RAM

* 2 vCPU accelerates worker cold-start by 2.58x (146.4ms vs 378.5ms) due to parallel bytecode JIT compilation across cores.

Δ
Storage Physics Thesis 03

Write Amplification Reduction & Memory-Mapped Page Convergence

Status: Hardware Verified · Preprint

The Problem: Rollback Journal Dual-Write Penalty

In default SQLite configurations, every transaction initiates a dual-write cycle: dirty pages are written to the rollback journal, fsync() blocks execution, the database file is mutated, and another fsync() executes. This results in a Write Amplification Factor (WAF) exceeding 2.2, severely degrading SSD longevity and introducing millisecond-level wait locks.

The Leviora Hypothesis: WAL Sequential Append & 512MB MMAP

By switching to WAL (Write-Ahead Log) mode with sequential append writes, relaxed synchronization (synchronous=NORMAL), and memory-mapping 512 MB directly into userspace address space (PRAGMA mmap_size=536870912), the engine bypasses file system buffer copy loops, bringing read latency down to 3.2 microseconds.

Write Amplification Factor (WAF) MinimizationEq. (S-1)
WAF = (Bytes written to physical storage) / (Bytes written by user payload) → lim_{WAL} WAF ≈ 1.05

WAL mode converts random B-tree mutations into sequential log appends, reducing hardware block wear and eliminating redundant page flushes.

Physical Benchmark · 20,000 Writes & 100,000 Reads Across Storage Modes

Synchronous transactional execution with indexed key-value reads in isolated test containers.

Engine ModeHardware TierWrite ThroughputRead Throughputp50 Latencyp95 Latency
Default Disk JournalTier 1 (1 vCPU, 1 GB)30,712 ops/s72,580 ops/s13.8 µs19.5 µs
Default Disk JournalTier 2 (2 vCPU, 2 GB)34,916 ops/s74,800 ops/s13.4 µs18.9 µs
Leviora Extreme (WAL+MMAP)Tier 1 (1 vCPU, 1 GB)31,040 ops/s118,450 ops/s3.6 µs6.1 µs
Leviora Extreme (WAL+MMAP)Tier 2 (2 vCPU, 2 GB)32,250 ops/s122,264 ops/s3.2 µs5.7 µs
Pure In-Memory (:memory:)Tier 2 (2 vCPU, 2 GB)207,936 ops/s261,673 ops/s3.3 µs5.8 µs

* WAL + MMAP provides 1.68x faster read throughput than standard journals on persistent storage, while memory mode achieves 207k writes/sec with zero disk bottlenecks.

Ξ
Empirical Verification Protocol

Laboratory Reproducibility: Open Docker Harness

Standard: Ephemeral Cgroup Sandboxing

Scientific integrity demands that every measurement reported by LevioraLabs is independently reproducible by any external engineer. All benchmarks in these theses were physically evaluated inside isolated, network-blinded Linux containers with strict cgroup v2 hardware quotas.

Tier 1 Environment (1 vCPU / 1 GB RAM)
# Sterile single-core sandbox
docker run --rm -it --network=none --cpus=1.0 --memory=1g node:22-trixie-slim
Tier 2 Environment (2 vCPU / 2 GB RAM)
# Dual-core high-concurrency sandbox
docker run --rm -it --network=none --cpus=2.0 --memory=2g node:22-trixie-slim
1. Zero Network Leaks

--network=none cuts all external egress, eliminating outside cloud variance or security concerns.

2. Self-Cleaning (--rm)

Container state immediately destroys itself upon exit, leaving zero disk or memory footprint.

3. Hardware Cgroup Caps

Hard CPU shares and memory envelopes prevent noisy-neighbor effects or host exhaustion.