OmniTI
AI-assisted summary of Surge 2015 - Lightning Talks — original source. Check the original for full context.
Source published:
Key ideas
- A Joyent Manta outage triggered by PostgreSQL's 32-bit transaction ID wraparound autovacuum caused 10 hours of downtime, resolved only after engineers used GDB to dynamically overwrite cost-delay variables in running memory. (9:36)
- Bryan Cantrill demonstrated how Linux's historical adoption of Tru64's non-standard MADV_DONTNEED semantics in 1999 broke POSIX advisory conventions and caused mysterious crashes in applications like Plex Media Server on LX-branded zones. (58:23)
- Benchmark testing across unoptimized, optimized, and Node.js codebases revealed GCC resolved up to three times more stack local variables in DWARF postmortem debugging than Clang. (6:09)
- Hardware profiling of machine learning models compiled directly to native machine code shows cache eviction and instruction starvation across narrow memory bus pins can degrade runtime performance by up to 5x compared to interpreted execution. (35:59)
Detailed notes
## Background Published on YouTube by OmniTI on November 29, 2015, this video captures the Surge 2015 Lightning Talks session sponsored by AppNexus and hosted by Geir Magnusson. The presentation features a fast-paced series of community lightning talks spanning technical deep dives, comedic reflections, and an interpretive dance performance.
## TL;DR The lightning talks cover an eclectic mix of systems engineering topics, opening with protocol architectures like LISP and NDN, compiler debuggability comparisons between GCC and Clang, and Joyent's 10-hour Manta PostgreSQL wraparound autovacuum outage. Presenters explore biological computing using Physarum slime molds, technical writing mechanics, AMQP-backed application servers, and CPU instruction cache bottlenecks in compiled models. The session also weaves in personal reflections on parenting versus on-call rotations and Yogi Berra's aphorisms as DevOps tenets, culminating in an interpretive dance of a recent AWS DynamoDB metadata outage and Bryan Cantrill's technical autopsy tracing jemalloc crashes under SmartOS LX-branded zones back to a 1999 Linux madvise POSIX divergence.
## Atmosphere & style The session carries an energetic, playful, and irreverent conference vibe where hardcore systems internals seamlessly blend with geek theater and stand-up comedy. Speakers oscillate between gritty postmortem war stories—complete with assembly instruction analysis and GDB memory patching—and deadpan humor about parenting newborns versus dealing with uncaring production machines. The atmosphere is loose, communal, and self-aware, punctuated by audience laughter and an uninhibited interpretive dance of a major cloud outage.
## Bulletin - [09:36](https://www.youtube.com/watch?v=bg6-LVCHmGM&t=576s) A Joyent Manta outage triggered by PostgreSQL's 32-bit transaction ID wraparound autovacuum caused 10 hours of downtime, resolved only after engineers used GDB to dynamically overwrite cost-delay variables in running memory. - [58:23](https://www.youtube.com/watch?v=bg6-LVCHmGM&t=3503s) Bryan Cantrill demonstrated how Linux's historical adoption of Tru64's non-standard MADV_DONTNEED semantics in 1999 broke POSIX advisory conventions and caused mysterious crashes in applications like Plex Media Server on LX-branded zones. - [06:09](https://www.youtube.com/watch?v=bg6-LVCHmGM&t=369s) Benchmark testing across unoptimized, optimized, and Node.js codebases revealed GCC resolved up to three times more stack local variables in DWARF postmortem debugging than Clang. - [35:59](https://www.youtube.com/watch?v=bg6-LVCHmGM&t=2159s) Hardware profiling of machine learning models compiled directly to native machine code shows cache eviction and instruction starvation across narrow memory bus pins can degrade runtime performance by up to 5x compared to interpreted execution.
## Key takeaways - [01:00](https://www.youtube.com/watch?v=bg6-LVCHmGM&t=60s) The classic Internet protocol hourglass conflates host identity with routing location, creating architectural limitations that modern proposals like ILNP, LISP, and Named Data Networking aim to decouple. - [06:09](https://www.youtube.com/watch?v=bg6-LVCHmGM&t=369s) Compiler evaluations routinely focus on compilation speed and execution benchmarks while overlooking postmortem debuggability, where GCC significantly outperforms Clang in preserving stack variables. - [09:36](https://www.youtube.com/watch?v=bg6-LVCHmGM&t=576s) PostgreSQL's circular 32-bit transaction ID space can trigger emergency, non-cancellable autovacuum processes that lock critical tables and cascade into multi-hour outages on distributed storage systems. - [13:09](https://www.youtube.com/watch?v=bg6-LVCHmGM&t=789s) Filesystem prefetchers have directory-level blind spots during sequential file scans, requiring manual prefetching and debugger interventions to accelerate throttled database cleanup operations. - [15:55](https://www.youtube.com/watch?v=bg6-LVCHmGM&t=955s) Physarum polycephalum slime molds demonstrate biological computation by generating heuristic approximations for spatial routing problems and forming logic gates, though physical scaling remains constrained by slow propagation speeds. - [23:03](https://www.youtube.com/watch?v=bg6-LVCHmGM&t=1383s) Engineering writing suffers when authors rely on passive voice and weakening adverbs, which obscure accountability and technical ownership in organizational documentation. - [30:44](https://www.youtube.com/watch?v=bg6-LVCHmGM&t=1844s) RabbitMQ struggles with network partition tolerance and horizontal scaling, prompting alternative service architectures that rely on Kafka for ingestion and custom egress packet routing. - [32:08](https://www.youtube.com/watch?v=bg6-LVCHmGM&t=1928s) Writing custom zero-gap memory allocators eliminates external fragmentation but disables essential memory safety tools like Valgrind, rendering out-of-bounds corruption invisible until catastrophic production failures occur. - [35:59](https://www.youtube.com/watch?v=bg6-LVCHmGM&t=2159s) Compiling complex machine learning models directly into native machine code can backfire due to CPU memory bus bottlenecks, where instruction bloat evicts caches and starves execution units. - [42:28](https://www.youtube.com/watch?v=bg6-LVCHmGM&t=2548s) The operational instincts developed during high-stakes infrastructure on-call shifts translate directly into handling the unpredictable demands of newborn parenting. - [45:51](https://www.youtube.com/watch?v=bg6-LVCHmGM&t=2751s) Yogi Berra's classic aphorisms anticipated core modern DevOps principles, including blameless postmortems, failing safely, system telemetry, and cloud resource contention. - [54:21](https://www.youtube.com/watch?v=bg6-LVCHmGM&t=3261s) The 2015 AWS DynamoDB metadata outage illustrated how brief network blips can cause thundering herd retry storms that overwhelm critical membership services. - [58:23](https://www.youtube.com/watch?v=bg6-LVCHmGM&t=3503s) Implementing binary-compatible Linux emulation layers in alternative OS kernels requires replicating historical kernel bugs, non-standard behaviors, and architectural flaws verbatim. - [01:07:14](https://www.youtube.com/watch?v=bg6-LVCHmGM&t=4034s) Unlike POSIX posix_madvise, which provides ignorable performance hints, Linux's madvise with MADV_DONTNEED acts as an imperative command that forcefully discards pages and zeroes memory on subsequent reads. - [01:10:56](https://www.youtube.com/watch?v=bg6-LVCHmGM&t=4256s) Memory allocators such as jemalloc rely directly on Linux's immediate zeroing behavior with MADV_DONTNEED, transforming what was intended as an eviction hint into an implicit memory management guarantee. - [01:16:17](https://www.youtube.com/watch?v=bg6-LVCHmGM&t=4577s) Linux's non-standard MADV_DONTNEED behavior originated in a 1999 patch importing flawed Tru64 semantics to satisfy SAP porting requirements, leaving a decade-long legacy of performance and compatibility compromises.
## Detailed walkthrough ### [00:12](https://www.youtube.com/watch?v=bg6-LVCHmGM&t=12s) Welcome to the Surge 2015 Lightning Talks
Host Geir Magnusson takes the stage to kick off the lightning talks session at Surge 2015, welcoming attendees to an event format that has built a long reputation for being lively, unpredictable, and fun. Rather than imposing the strict and hurried two-minute intervals common at other tech conferences, Geir notes that the organizers expanded the slot duration to five minutes—jokingly thanking Brian Cantrill for correcting him on the exact rules. He explains that these five-minute sessions have no rigid thematic boundaries; speakers can present topics that are hilarious, serious, deeply technical, or entirely surprising. Before calling up the first speaker, Geir extends his gratitude to conference organizer Robert Treat and the rest of the organizing committee, as well as sponsor AppNexus for supporting the session.
[01:00](https://www.youtube.com/watch?v=bg6-LVCHmGM&t=60s) Dan McDonald: Two Future Internet Directions
Dan McDonald, an engineer at OmniTI whose day job centers around OmniOS, presents an overview of two emerging architectural directions being pursued within academia and the Internet Research Task Force (IRTF). McDonald sets the stage by reviewing the classic "protocol hourglass" architecture that has governed networking since 1981: applications and transport protocols sit at the top, standard IP forms the narrow middle waist, and the base fans back out over various physical links and media. Despite IPv6 introducing larger addresses, core architectural assumptions have remained virtually unchanged for over three decades. McDonald highlights two orthogonal research initiatives that will eventually impact operations engineers: a medium-term evolution that separates packet location from identity, and a long-term architectural revolution known as Named Data Networking (NDN).
```mermaid flowchart TD accTitle: Internet Protocol Hourglass Evolution accDescr: Comparison between the traditional IP protocol hourglass and Named Data Networking.
subgraph Traditional["Classic IP Hourglass"] A1["Applications / Presentation"] --> T1["Transport (TCP / UDP)"] T1 --> IP["IP Layer (Narrow Waist)"] IP --> L1["Link & Physical Layers"] end
subgraph NDN["Named Data Networking"] A2["Applications"] --> S2["Security Layer"] S2 --> C2["Content Chunks & Strategy"] C2 --> T2["Traditional Protocols / Physical"] end ```
In traditional networking, an IP address conflates two distinct concepts: acting simultaneously as an identity and as a routing locator that tells backbones how to reach a host. McDonald illustrates this using his own public server (`kb.com`), where a single IP address designates five zones on his home server while also defining the physical routing path through Verizon in New York City up to northern Massachusetts. Decoupling location from identity allows nodes to retain unique identifiers regardless of where they reside on the topology. If AWS US-West experiences an outage, a system could seamlessly reinstantiate that exact same identifier in AWS US-East under a new locator, potentially preserving state and long-lived TCP connections across live migrations. Two competing approaches are currently explored: the Identifier-Locator Network Protocol (ILNP, RFC 6740, authored by Ran Atkinson), which splits IPv6 addresses into identity and locator segments, and the Locator/ID Separation Protocol (LISP, spearheaded by Dino Farinacci at Cisco), which encapsulates IP packets within outer locator IP packets.
Looking toward the further horizon, Named Data Networking—originated by Van Jacobson at PARC and expanded across academia via named-data.net—proposes reshaping the hourglass entirely by replacing IP at the narrow waist with cryptographically signed content chunks and retrieval strategies. In this model, middleboxes act as store-and-forward caching nodes rather than plain packet forwarders, resembling Usenet or email architectures where data authenticity is verifiable directly via digital signatures. McDonald whimsically speculates about a future filled with ZFS-equipped middleboxes running OmniOS, Manta, or SmartOS, concluding right as his timer expires: “I'm kind of excited about that possibility um and I've got 10 seconds left um thank you any questions or get off the stage.”
- **Classic Hourglass Age**: Internet protocol architecture has remained fundamentally the same since 1981, modulo IPv6's expanded address space. - **ILNP (RFC 6740)**: An experimental RFC authored by Ran Atkinson splitting IPv6 addresses into distinct identity and location fields. - **LISP**: Developed by Dino Farinacci and Cisco collaborators, employing packet encapsulation (an IP address inside an IP address) to decouple identity from routing topology. - **Named Data Networking**: Universalizes signed content chunks at the center of the stack, turning intermediary routers into secure store-and-forward caches.
[06:09](https://www.youtube.com/watch?v=bg6-LVCHmGM&t=369s) Abel Mathew: Evaluating Compiler Debuggability (GCC vs. Clang)
Geir introduces Abel Mathew from Backtrace to discuss the often-overlooked metric of software debuggability. Mathew points out that when development teams evaluate switching compilers—specifically debating whether to migrate from GCC to Clang—they typically focus on compilation speed, runtime execution benchmarks, or clearer compiler error messages. Almost nobody evaluates whether changing the compiler harms their ability to inspect and debug running programs or postmortem artifacts. Mathew emphasizes that this oversight carries heavy operational costs: “Where this matters is let's say you're doing postmortem crash analysis you know you're looking at a core dump um if those variables are optimized out the less information that you have the harder it is to figure out what's going on.”
```mermaid flowchart LR accTitle: Backtrace Debugger Resolution Flow accDescr: Pipeline used by Backtrace to measure resolved variables across stack frames.
A["Process Core Dump / Crash"] --> B["libunwind Stack Walker"] B --> C["Stack Frames & Local Scopes"] C --> D["DWARF Debug Symbols"] D --> E{"Variable Resolved or Optimized Out?"} E -->|"Resolved"| F["Available for Root-Cause Analysis"] E -->|"Optimized Out"| G["Lost Diagnostic Context"] ```
Mathew shares findings from a benchmark experiment run that very afternoon on an Ubuntu 15.04 system comparing GCC 4.9.2 against Clang 3.6.0. Using an internal Backtrace diagnostic tool powered by `libunwind` and DWARF symbol parsing, he traversed call stacks to count how many automatic local variables could actually be resolved versus how many were discarded as optimized out. First tested on a proprietary Backtrace internal application without optimizations, GCC resolved nearly 3,000 local variables compared to only around 1,200 with Clang. When standard `-O2` optimizations were enabled on that same internal app, GCC resolved approximately 1,700 variables, while Clang retained only about 500. Repeating the test against the `master` branch of Node.js, GCC resolved roughly 1,600 variables compared to a mere 475 under Clang. During the brief Q&A, Mathew clarifies that the tool strictly evaluated automatic local variables on the stack, noting that whether the root issue stems from Clang's symbol emissions or debugger integration flaws in GDB remains an open question slated for a detailed follow-up technical writeup.
| Application / Target | Optimization Level | GCC 4.9.2 Resolved Variables | Clang 3.6.0 Resolved Variables | |:--- |:--- |:--- |:--- | | **Backtrace Internal App** | `-O0` (No optimizations) | ~3,000 | ~1,200 | | **Backtrace Internal App** | `-O2` (Standard optimization) | ~1,700 | ~500 | | **Node.js (master branch)** | Default build settings | ~1,600 | ~475 |
[09:36](https://www.youtube.com/watch?v=bg6-LVCHmGM&t=576s) David Pacheco: Manta's Bad Day and Wraparound Autovacuum
Geir introduces David Pacheco, an engineer at Joyent, quipping that the audience is about to witness some prime "disaster porn" in a talk titled "Manta's Bad Day." Pacheco opens by confirming that the presentation dissects a major service disruption on Joyent's Manta object storage platform. Faced with condensing a complex postmortem into five minutes, Pacheco explains he drew inspiration from Brian Cantrill’s blunt Twitter post on the day of the incident, which summarized the entire catastrophe in a two-word postmortem: "wraparound autovacuum."
Pacheco points out the dark humor in the timing: Joyent was not even the first tech company that week to be brought down by that exact operational trap. He warns the audience about the deceptive nature of PostgreSQL internal maintenance mechanisms: “If you've never heard about this it's probably because it's never hosed you in production before if you use postgress at some point it may and then you will wish you remember this talk but you won't because the only way you can remember about wraparound autovacuum is to have actually experienced an outage as a result of it as far as I can tell.” With that cautionary note, Pacheco sets the stage to walk through how transaction ID exhaustion and database vacuuming brought down Manta's storage service.
[10:30](https://www.youtube.com/watch?v=bg6-LVCHmGM&t=630s) The Manta Outage and the Autovacuum Bottleneck
The Joyent Manta architecture operates as a strongly consistent object store, handling HTTP `PUT`, `GET`, and `DELETE` requests for arbitrary byte blobs arranged in a Unix-like directory hierarchy. Underneath, it relies on a sharded metadata tier powered by PostgreSQL, where each shard consists of multiple PostgreSQL databases to ensure high availability. Because both ordinary client data path operations and compute jobs must query this tier, any hiccup in PostgreSQL directly halts service operations.
At 10:30 UTC on July 27th, an outage began as clients experienced soaring latency followed by waves of HTTP 500 errors. In typical fashion, internal backpressure caused the API frontdoors to time out after two minutes and fail back to the client. The engineers quickly isolated the issue to a single PostgreSQL database shard. While baseline health checks succeeded—trivial commands like `SELECT NOW()` returned immediately—any query touching the primary Manta table was completely locked up. Inspecting the instance revealed that every single client query was stuck waiting on locks; the only active query running unimpeded was an autovacuum process that had kicked off at exactly 10:30 UTC.
```mermaid flowchart TD accTitle: PostgreSQL Autovacuum Lockout Flow accDescr: Diagram showing how an autovacuum run blocks application queries and triggers API timeouts. subgraph ClientLayer["Client & API Tier"] C["Client Requests"] --> API["Manta API Servers"] API -->|"2-minute timeout"| E500["500 Server Errors"] end
subgraph DBLayer["PostgreSQL Metadata Shard"] API -->|"Queries"| TBL[("Manta Table")] AV["Autovacuum (10:30 UTC)"] -->|"Holds aggressive locks"| TBL TBL -->|"Blocked on locks"| BLK["All Data Path Queries"] end ```
PostgreSQL's multi-version concurrency control (MVCC) leaves behind dead tuples that are no longer active but may still be visible to concurrent transactions. The autovacuum daemon is responsible for cleaning these up asynchronously. While Joyent had encountered previous issues with autovacuum, those incidents had typically cleared themselves before a root cause could be captured, or operators had simply killed the vacuum job to restore traffic. Seeking a definitive explanation, the team dumped diagnostic data from `pg_locks` to preserve state, then restarted PostgreSQL. Service recovered smoothly, but roughly ten minutes later, PostgreSQL initiated another autovacuum—this time specifically to prevent transaction ID (XID) wraparound.
- Manta architecture was previously presented by Mark Cavage and the speaker at Surge 2013. - PostgreSQL uses a 32-bit transaction space (4 billion IDs total) treated as a circular ring with 2 billion past transactions and 2 billion future transactions. - Reaching true wraparound can cause past data to appear in the future, prompting PostgreSQL to shut down completely to prevent silent corruption.
[13:09](https://www.youtube.com/watch?v=bg6-LVCHmGM&t=789s) Kernel Tracing, Debugger Hacks, and Tunable Tweaks
Realizing the wraparound autovacuum was mandatory to prevent database shutdown, the engineers committed to letting it complete, but urgently needed to accelerate its execution. Tracing the PostgreSQL process revealed that it was spending almost all of its time sleeping. Using kernel scheduler tracing to diagnose why an application was idling, they discovered that the process was blocked on disk I/O. The database was performing sequential file reads—which the filesystem prefetches efficiently—but it was also reading through thousands of individual files within the same directory in sequence. The filesystem could not anticipate directory-level sequential patterns, so the team manually initiated proactive prefetching across those directory files, unlocking significant throughput gains.
```mermaid flowchart LR accTitle: Autovacuum Performance Remediation accDescr: Steps taken to diagnose and resolve autovacuum slowness during the outage. subgraph Bottlenecks["Identified Bottlenecks"] B1["File System Directory I/O"] B2["cost-based vacuum delay"] B3["Conservative 200M XID threshold"] end
subgraph Fixes["Applied Mitigations"] F1["Manual File Prefetching"] F2["GDB Memory Edit of Globals"] F3["Raise freeze limit to 500M XID"] end
B1 --> F1 B2 --> F2 B3 --> F3 ```
Even after fixing file I/O, the process continued to sleep due to PostgreSQL's internal `cost-based vacuum delay`—a safety mechanism designed to yield CPU and disk resources to client queries. The speaker highlighted the irony:
> “This is a mechanism that's there to prevent the autovacuum process from taking over all the resources on the system and so it literally just like sleeps every few every period of time for a little bit which is exactly the wrong thing to do here because this was literally the only process in the database which was not currently blocked on this process…”
Because there was no dynamic configuration option to disable this delay on a running instance, the engineers took advantage of direct memory access. As the speaker explained, “you know it's our computer we have it's all just memory right so we just use the debugger to whack these Global variables and get a 5x Improvement in read throughput.”
After several hours of prefetching and debugging, the autovacuum finally finished, restoring normal operations. Ten minutes later, however, the wraparound autovacuum restarted against the exact same table. Realizing the loop would not converge under default parameters, they reviewed the documentation and found that while wraparound catastrophe occurs at 2 billion transactions, the emergency wraparound vacuum triggers conservatively at 200 million. To stop the immediate service failure, they raised the trigger threshold to 500 million transactions. The service stabilized immediately.
- The complete incident spanned a 10-hour outage, followed by a week of deep post-incident analysis. - The wraparound autovacuum itself does not inherently take down a cluster; the failure stems from specific application access patterns interacting with PostgreSQL table locks in subtle, undocumented ways. - Joyent published the exhaustive technical breakdown in a dedicated postmortem document.
[15:55](https://www.youtube.com/watch?v=bg6-LVCHmGM&t=955s) Biological Computing: Slime Molds and the Tokyo Subway
The session transitions as host Geir Magnusson introduces the next talk:
> “The next talk is by Dimitris Kavourinis and it's called—this was a suggested topic name and I thought it was a good one—Ruby on Slime.”
Dimitris Kavourinis jokes that Geir gave away the punchline to one of his presentation's few jokes, then introduces his actual talk title: *"The future of biological Computing or overhyped sludge"*. Setting expectations, Kavourinis notes that he has no formal biological credentials other than raw curiosity.
```mermaid flowchart TD accTitle: Slime Mold Characteristics accDescr: Taxonomic and operational properties of acellular slime mold. SM["Slime Mold (Physarum polycephalum)"] SM --- C1["Eukaryotic single-celled organism"] SM --- C2["No brain or central nervous system"] SM --- C3["Not animal, plant, or fungus"] SM --- C4["Self-organizing network structure"] ```
Slime mold—often seen as yellow or orange foam on lawns or decaying logs—is biologically misnamed. It is neither a fungus, a plant, nor an animal, but a eukaryotic mass of amoeba-like single-celled organisms that grow without a central brain into self-organizing networks capable of solving complex spatial problems. This behavior inspired sensationalist technical blog posts like *"Why my slime mold is better than your Hadoop cluster"*.
Kavourinis details the canonical 2010 study by Atsushi Tero and colleagues. Researchers arranged oat flakes on a surface in the exact geographic layout of Tokyo's railway stations and placed a slime mold specimen (*Physarum polycephalum*) in the center. The mold initially expanded outward in an undifferentiated mesh to engulf all food sources. Over time, it systematically pruned redundant, inefficient pathways, leaving behind an optimized transportation network that closely mirrored—and in some metrics exceeded the routing efficiency and fault tolerance of—the real-world Tokyo subway system.
```mermaid flowchart LR accTitle: Slime Mold Network Optimization accDescr: The phases through which slime mold optimizes path routing between food nodes. A["Inoculation (Center)"] --> B["Dense Network Expansion"] B --> C["Redundant Edge Pruning"] C --> D["Optimal Network Convergence"] ```
Beyond transportation modeling, researchers have experimented with direct logic processing: - Scientists have channeled slime mold into specialized substrate channels to construct functional NOR logic gates. - Because the NOR gate is functionally complete, any digital logic circuit can theoretically be fabricated out of living slime mold. - An initiative known as the "PhyChip" project explores biological computing across two paradigms: analog computing (mimicking the spatial network convergence seen in the Tokyo railway experiment) and digital computing (using biophysical NOR gates). - Kavourinis notes the major practical limitation preventing biological computers from replacing silicon: slime mold grows at a speed of approximately one centimeter per hour, severely limiting its computational throughput.
[19:25](https://www.youtube.com/watch?v=bg6-LVCHmGM&t=1165s) Limits of Slime Mold Computing and Future Possibilities
Why go through the trouble of building NOR gates out of slime mold when conventional manufacturing produces gates of vastly superior quality and quantity today? Every modern consumer device holds orders of magnitude more gates than could ever be practically constructed using slime mold. This experimentation sits within a long tradition of looking to physical processes for computational shortcuts, with quantum computing serving as the epitome of the concept. However, natural systems rarely solve hard computational problems instantaneously. A notable example comes from Scott Aaronson, who demonstrated that submerging spools between glass plates in soapy water does not reliably find the minimum Steiner tree—it cannot solve NP-complete problems in constant time, despite persistent rumors. The same limitation holds true for slime mold: it cannot miraculously solve NP-complete problems, though it has experimentally demonstrated approximate solutions to the Traveling Salesperson Problem, an impressive feat for an organism lacking a brain.
```mermaid flowchart TD accTitle: Natural Physical Computation vs Reality accDescr: Diagram illustrating how natural systems like soap films and slime molds produce approximations rather than instant NP-complete solutions.
subgraph Hypothesized["Theoretical Claims"] A["Soap film / glass spools"] -->|"Supposed instant solve"| B["Minimum Steiner Tree"] C["Slime mold networks"] -->|"Supposed instant solve"| D["NP-complete problems"] end
subgraph Reality["Empirical Reality"] A -.->|"Fails to guarantee"| E["Suboptimal configurations"] C -->|"Empirically achieves"| F["Heuristic / approximate TSP"] end ```
The speculative future of biological computing raises interesting architectural questions: could we develop autonomous, self-assembling, self-healing circuits living in nature that adapt to environmental changes with minimal raw material costs and zero electricity usage? While laboratory observations of slime mold forming structures under diverse conditions remain legitimate science, near-term alternatives might lean toward humor and marketing. Slime introduces entirely new complexity classes defined by physical scale:
> “Primarily my question is how much of the Earth do we need to cover in slime to solve a given problem?”
- **Planetary Complexity Scaling**: If the biological computing universe is physically bounded, one must ask how many entire continents need to be engulfed in slime to solve the clique problem on a million nodes. - **Marketing Analog Bio-Computing**: In the absence of competitive processing speeds, the technology can be branded as artisanal, all-natural, slow-computing analog systems locally sourced from native forests. - **Ruby on Slime**: A proposed project pitched with the tongue-in-cheek tagline, *"Because you're already using Ruby."* - **Artistic Applications**: Music Professor Eduardo Miranda has demonstrated genuine cross-disciplinary applications, performing collaborative piano duets directly with slime mold.
---
[23:03](https://www.youtube.com/watch?v=bg6-LVCHmGM&t=1383s) Engineering Grammar: Eradicating the Passive Voice and Adverbs
An engineering director who doubles as a professional writer takes the stage to tackle a pervasive workplace pain point: the abysmal quality of technical prose. Conceived in the hallway only an hour before the session, the talk argues that grammar is just as scalable as any piece of software infrastructure. Reading everyday engineering proposals and design docs in Google Docs induces existential dread, compounded when engineers use Google Docs' revision features to reject every constructive edit. The root problem is psychological:
> “The number one problem that really is facing engineering writing is that you are terrified of your subject and you are terrified of your verb.”
Engineers consistently rely on passive voice to push the subject as far from the active verb as possible, obscuring accountability and making sentences tedious to parse. Writing instead in active voice—where the subject directly performs the action—keeps prose concise, punchy, and engaging. Live-refactored examples demonstrate how to eliminate awkward phrasing:
- *Passive:* "At dinner, six shrimp were eaten by Harry." (The shrimp remain deceptively safe until the very end of the sentence.) - *Active:* "Harry ate six shrimp at dinner." With active verbs, writers can consult a thesaurus to elevate energy: *"Harry gnawed six shrimp at dinner"* or *"Harry just gurgled on six shrimp at dinner."* - *Passive:* "The data center is roamed by beautiful network engineers." - *Active:* "Beautiful network engineers roam the data center." - *Passive:* "Monitoring is going to be watched by us tonight." - *Active:* "We're going to watch the monitor tonight because our systems will probably crash."
Eliminating passive construction requires spotting warning signals: the preposition "by" (e.g., *watched by*), and inflections of the verb "to be" (*were*, *should have been*, *could be*, *must be*). In the final minute, the speaker turns their focus to adverbs, urging engineers to excise words like *practically*, *only*, *very*, and *just*. To clean up technical writing, engineers should run their drafts through tools like `hemingwayapp.com` (Hemingway Editor) to highlight passive constructions, run-on sentences, and superfluous adverbs before publishing.
---
[28:24](https://www.youtube.com/watch?v=bg6-LVCHmGM&t=1704s) Jackalope: Replacing HTTP with RabbitMQ Behind Rack
Host Geir Magnusson introduces Josh Schmiedel for a talk cryptographically billed on the schedule, which Josh clarifies is titled *"Jackalope: Bad Ideas, Maybe Just Ideas."* Opening with standard tech-conference gripes about inadequate power strips in the hallways and Apple’s frustrating charger ergonomics, Josh explains how an architectural problem in service-oriented architecture (SOA) inspired a bizarre software stack. Wanting service-to-service messaging across the internet without driving internal operations engineers completely mad, he chose instead to drive them mad in a creative way by authoring a custom application server.
```mermaid flowchart LR accTitle: Jackalope Architecture accDescr: Flow diagram showing ingress HTTP web traffic converted into RabbitMQ messages via AMQParty and served to Ruby apps via Jackalope.
A["Internet Traffic"] --> B["Front-end Web App"] B --> C["AMQParty Library"] C -->|"AMQP Message"| D[("RabbitMQ Broker")] D -->|"AMQP Consumer"| E["Jackalope App Server"] E -->|"Faked HTTP / Rack"| F["Ruby Application"] ```
The system takes incoming web traffic into a Ruby application that relies on an internal client dubbed **AMQParty**. Modeled after the popular `HTTParty` Ruby gem, AMQParty presents an identical HTTP client interface to developers while actually serializing and routing payloads over RabbitMQ. At the receiving end of the queue, rather than running standard production Rack servers like Unicorn, the back-end services run on **Jackalope**. Jackalope pulls messages off the RabbitMQ broker, mocks an HTTP environment around the request, and invokes the underlying Ruby application code seamlessly. While conceptually akin to Braintree's "Broxy" architecture—which relies on Redis—Jackalope relies entirely on AMQP queues and is running in production handling traffic for one of their smaller services.
[30:44](https://www.youtube.com/watch?v=bg6-LVCHmGM&t=1844s) Josh’s Architecture Pivot: Leaving RabbitMQ Behind
Josh concludes his lightning talk by reflecting on an architectural design he previously championed. Having pitched an approach at RailsConf a couple of years earlier to general enthusiasm, he admits that they never fully adopted it in practice. The fatal flaw was RabbitMQ's behavior under real-world conditions: as Josh points out directly from the documentation, RabbitMQ does not scale well and fails to tolerate network partitions cleanly. Josh laments, “Rabbit is not really scalable and does not tolerate network partitions well that's right there on the very it's the first sentence on this dock I mean that's just you had one job man.”
```mermaid flowchart LR accTitle: Josh's Proposed Asynchronous API Routing Architecture accDescr: Flow diagram showing ingress traffic passing through Kafka and returning to the client via packet mangling.
subgraph Ingress ["Ingress Tier"] A["Incoming Traffic"] --> B["API Server"] B -->|"HTTP"| C["Service Layer"] end
subgraph Messaging ["Buffer & Transport Tier"] C -->|"Writes"| D["Kafka Log"] D -->|"Reads"| E["Kafka Consumer Engine"] end
subgraph Egress ["Egress & Response"] E -->|"Fakes HTTP"| F["Backend"] F -.->|"Packet Mangling Bypass"| A end ```
He sketches an alternative, slightly unconventional idea that is currently percolating in his mind. In this model, incoming client requests reach an API server, which makes a standard HTTP call to an intermediate service. That service writes events directly to Apache Kafka, where a reader consumes them, fakes HTTP upstream on the backend, and uses custom packet mangling to route responses straight back to the original client without traversing the entire request path in reverse. Acknowledging that he would prefer not to write Haskell to implement it, he invites anyone with expertise or interest in building the system to collaborate with him before signing off.
---
[32:08](https://www.youtube.com/watch?v=bg6-LVCHmGM&t=1928s) The Five Stages of Memory Allocator Grief
John takes the stage to describe the three grueling months he spent building a custom user-space memory allocator for a moderately high-scale production system. The allocator was designed to eliminate fragmentation by packing every allocation tightly together with zero gaps. However, packed allocations meant that tools like Valgrind became practically useless; any out-of-bounds write simply bled invisibly into neighboring allocations without triggering bounds checkers. John captures the misery of production debugging under these constraints by referencing existentialism: “My favorite definition of existentialism is a sense of disorientation or meaninglessness in in an apparently absurd world and that's basically how you feel when you're debugging a memory allocator in production especially when you can't use Valgrind on it.” He compares debugging such a system without proper tooling to stumbling upon dog waste in a Times Square crosswalk at midday, unable to do anything except stand there in bewilderment wondering who is responsible.
To structure the descent into debugging madness, John walks through the classic five stages of grief:
```mermaid flowchart TD accTitle: The Five Stages of Allocator Grief accDescr: Sequential flow showing the stages of debugging and developing a custom memory allocator.
S1["1. Denial<br/>'Writing an allocator is easy!'"] --> S2["2. Anger<br/>Pure frustration when bugs surface"] S2 --> S3["3. Bargaining<br/>Pleading for redzones & AddressSanitizer"] S3 --> S4["4. Depression<br/>Rewriting ASan & handing out random pointers"] S4 --> S5["5. Acceptance<br/>Admitting arrogance & returning to jemalloc"] ```
- **Denial**: Believing the project will be simple. Writing an allocator is straightforward; debugging an unforgiving custom design is where arrogance catches up with you. - **Anger**: The inevitable frustration when things fail unpredictably under load. - **Bargaining**: Wishing desperately for redzones and modern sanitizers like AddressSanitizer (ASan), only to be blocked because the production environment lacks a sufficiently modern compiler toolchain. - **Depression**: Attempting to rewrite user-space hooks and redzones from scratch, essentially reimplementing half of ASan. At the height of desperation, John experimented with allocating a 1 TB virtual address space and handing out random pointers. It functioned surprisingly well as a toy until around 10 MB of memory was assigned, at which point memory corruption set in immediately. - **Acceptance**: Realizing the entire premise was fueled by arrogance. After studying the AddressSanitizer paper front to back and reimplementing parts of it, John concludes that custom allocators are almost always an anti-pattern: “Really you just have to remember that you shouldn't do this in the first place jemalloc is really great they've done a lot of work on it.”
---
[35:59](https://www.youtube.com/watch?v=bg6-LVCHmGM&t=2159s) “Native Don't Scale”: The Hardware Reality of Instruction Bloat
An engineer from AppNexus steps up to deliver a talk titled *Native Don't Scale*, targeting the common optimization myth that translating high-level logic directly into specialized machine code or excessive C++ templates automatically yields superior performance. In particular, he criticizes the current industry trend in big data where data science teams propose compiling complex machine learning models directly into native machine instructions. “What I hear these days is we're going to take our machine learning model and convert it to machine code and it'll be really fast and now I just I don't know if I should scream or weep especially when it's your CEO telling you that,” he remarks, noting that the only reasonable reaction is either weeping or heavy drinking.
Displaying a silicon die photo of an Intel Xeon E5 processor used in their production clusters, the speaker emphasizes the physical bottlenecks imposed by hardware packaging. While the die represents incredible engineering, it communicates with the outside world through only roughly 2,000 socket pins. Many of those pins connect directly to DIMMs, which have only about 240 pins each to move terabytes of data. On their production servers, memory bus throughput amounts to approximately 5 bytes per CPU cycle per DIMM.
To demonstrate why bloated native code cripples execution, he analyzes a standard vector operation like DAXPY ($a \cdot x + y$):
| Metric / Dimension | Observation | Architectural Consequence | |:--- |:--- |:--- | | **Instruction vs. Data Footprint** | Assembly code size exceeds the data size being processed | CPU stalls fetching instructions before data can even be loaded | | **1 KB Basic Blocks (NOPs)** | Yields $\approx 1.5$ Instructions Per Clock (IPC) at best | Baseline instruction fetching already hits memory wall | | **x86 Instruction Density** | Variable width, average 3 to 7 bytes per instruction | Real-world IPC drops as low as $\approx 0.12$ on cold instruction misses | | **Standard Business Logic** | Typically achieves $0.8$ to $1.5$ IPC | Code cache eviction makes compiled models up to $5\times$ slower | | **Cache Hierarchy Drop-off** | Massive bandwidth at L1/L2/L3, drops to $\approx 1/14$ at RAM | Instruction misses force round-trips to main memory |
The speaker explains that sprawling native machine code ruins performance for two key reasons: 1. **Random Instruction Pointer Jumps**: Jumping across a massive address space destroys instruction prefetching and CPU branch speculation, effectively turning modern hardware into a 1990s-era machine because the CPU cannot predict what data to prefetch without the instructions. 2. **Main Memory Bandwidth Cliffs**: L1, L2, and L3 caches provide immense bandwidth, but falling back to main memory drops bandwidth to around one-fourteenth of cache speeds. If instructions must be constantly streamed from main RAM, the machine starves. His warning is straightforward: compiling dynamic logic into massive native binaries will degrade throughput rather than scale it.
---
[40:04](https://www.youtube.com/watch?v=bg6-LVCHmGM&t=2404s) Andrew Wong: An Operationally Stealthy Paternity Leave
Host Geir Magnusson introduces Andrew Wong for an untitled lightning talk. Wong opens with self-deprecating humor, noting that his professional career has largely been a succession of mistakes. Giving the audience a choice between hearing a software operations war story about being on-call with a pager or a human interest narrative, the crowd chooses the human interest story.
Wong confesses that he is rarely an organized planner, but roughly a year earlier he and his wife decided to have a child. Rather than notify his employer, he chose an unusual course of action: he discovered the pregnancy and kept it entirely secret from his company for the entire nine months. During this period, he was working in New York while his pregnant wife lived across the Atlantic in Copenhagen. He jokes that an eight-hour flight across the ocean is not that bad, adding dryly that she did most of the actual work anyway.
To avoid marital friction and offer support, Wong flew out to Copenhagen about a month before the due date, casually telling his team that he would be away for a little bit and would return shortly. On Halloween, his daughter was born. In true engineering fashion, he spent the entire night immediately preceding the birth frantically hotfixing production code that had broken. Shortly after the birth, he logged into his scheduled team video meeting, preparing to reveal his secret to his unsuspecting colleagues.
[42:28](https://www.youtube.com/watch?v=bg6-LVCHmGM&t=2548s) Parenting vs. PagerDuty: Surviving the Uncaring Silicon God
Reflecting on becoming a father to a daughter, the speaker notes how colleagues reacted when the news broke: while some fellow team leads practically fell out of their chairs, others realized he was either far more responsible—or far more irresponsible—than he had ever let on. A persistent question immediately follows any engineer who has a newborn: exactly how much worse does being on pager duty get? In reality, parenting completely rearranges priorities between what genuinely matters and the relentless alerts of Nagios—though he clarifies to audience laughter that he did not name his daughter Nagios.
On-call turns out to be surprisingly effective preparation for infant care. In typical organizations, alerts trickle in slowly—first one page, then a second, followed by a momentary lull where an engineer falsely hopes another teammate reached for their phone first. Nighttime parenting functions on the exact same ruthless battlefield: the first parent to wake up is instantly on duty, which presents a special hazard for programmers who are notoriously nocturnal and already awake. Yet between the two, an infant proved far easier to handle than broken infrastructure:
> “I can attest that pager is worse, and it really wasn't that bad because I had someone to keep me company when everything was breaking and they were really happy to see me, unlike the machine, which was an uncaring silicon god with no forgiveness, none at all.”
Unlike production machinery, a crying child can simply be fed or sung to until she gently stops yelling. During the brief concluding Q&A, an audience member jokes about baby names, prompting the speaker to clarify that she was definitely not named Nagios, Circonus, OmniOS, SmartOS, or Linux. Instead, she was named Ariadne, after the Greek mythological figure who helped navigate the labyrinth and held sway over the Minotaur.
[45:51](https://www.youtube.com/watch?v=bg6-LVCHmGM&t=2751s) Robert Treat on Yogi Berra: The True Father of DevOps
Robert Treat takes the stage for a topical tribute to baseball legend Yogi Berra, who had passed away earlier that week. Treat argues that while the technology industry loves to debate the origins and core principles of DevOps, Berra has been completely overlooked. Industry figures routinely credit Gene Kim, Kevin Behr, and George Spafford (authors of *The Phoenix Project* and *The Visible Ops Handbook*), point to John Allspaw as a founding father, or cite industrial forebears like Taiichi Ohno of Toyota manufacturing and Eliyahu Goldratt. Others follow John Willis in tracing every foundational DevOps axiom back to W. Edwards Deming. While Deming’s principles can certainly be reverse-engineered into modern software delivery, Treat contends that Berra’s classic aphorisms articulated DevOps culture long before anyone else:
* **"The future ain't what it used to be":** Software development methodologies like Waterfall and Agile exist solely to wrestle with this truth, attempting to build roadmaps and rollout schedules that inevitably deviate from reality. * **"Nobody goes there anymore; it's too crowded":** Applied directly to cloud infrastructure, Treat suggests that Amazon Web Services suffers from severe resource contention. If building a business from scratch today, he argues with a grin, one should use Joyent—where no one is in the way and you can claim all the bandwidth and I/O you need. * **"A nickel ain't worth a dime anymore":** A blistering critique of Silicon Valley’s defiance of financial reality, from exorbitant developer compensation and ballooning housing costs to overpriced BART rides and expensive burritos. * **"We made too many wrong mistakes":** Teams inevitably screw up, but the key is failing safely without fatal consequences. Surge presentations celebrate good mistakes born of experimentation, whereas wrong mistakes cripple organizations. * **"You can observe a lot by watching":** The fundamental bedrock of modern telemetry, observability, and systems monitoring was summarized perfectly by Yogi decades earlier.
Treat urges attendees to study Berra's wisdom and raise a glass to his memory while exploring the restaurants and bars around National Harbor:
> “He's given so much to us, it's time that we take a moment to reflect upon him and realize his greatness and study his teachings.”
[50:52](https://www.youtube.com/watch?v=bg6-LVCHmGM&t=3052s) For Theo: Preparing the AWS DynamoDB Outage Interpretive Dance
Conference host Geir Magnusson transitions the session to acknowledge OmniTI and Surge founder Theo Schlossnagle. For the first time in the conference's history, Theo was absent, traveling the world and expressing his heartbreak on Twitter over missing the event. Adding to the weekend's drama, Amazon Web Services suffered a massive service outage just days prior. Traditionally, AWS outages had struck right in the middle of Surge, wreaking havoc on attendees' ability to enjoy the conference. Magnusson jokes that event organizers pleaded with Jeff Bezos to reschedule the disruption so it would finish before attendees arrived, freeing up their evenings to drink.
To console Theo across the miles—and taking full advantage of the fact that the lightning talks are being recorded—the organizers decide to stage a spontaneous interpretive dance depicting the official postmortem of the weekend's AWS downtime. Magnusson solicits volunteers from the audience, reassuring reluctant participants that the performance will never reach their employers. A diverse group steps up, including a mix of plant participants and genuine volunteers. One brave volunteer reveals that she studied ballet for three years in college, immediately earning herself the lead role of the "primadonna," cast specifically as the AWS DynamoDB metadata service. Armed with condensed postmortem incident notes issued by Amazon, Magnusson prepares to narrate the Sunday 2:19 AM breakdown while the volunteers act out the cascading failures across the cloud.
> “So we thought that for Theo we should do an interpretive dance of the postmortem of the weekend's outage.”
[54:21](https://www.youtube.com/watch?v=bg6-LVCHmGM&t=3261s) Reenacting the DynamoDB Metadata Outage
The performance wraps up with an audience-participation reenactment of an Amazon DynamoDB postmortem. The speaker recruits audience volunteers to play the roles of storage servers and simultaneous requests to demonstrate a cascading failure. Following a brief network disruption that impacted storage servers, responses from the metadata service exceeded the retrieval and transmission timeouts allowed by the servers. As a consequence, affected storage servers were unable to obtain their membership data and took themselves out of service, halting request processing.
```mermaid flowchart TD accTitle: DynamoDB Cascading Failure Loop accDescr: Diagram illustrating the retry storm between DynamoDB storage servers and the metadata service.
subgraph Failure["Network Disruption"] NetFail["Network Disruption Impacting Storage"] Timeouts["Metadata Response Exceeds Timeouts"] NetFail --> Timeouts end
subgraph Loop["Cascading Overload"] DropNodes["Storage Servers Drop from Service"] RetryStorm["Storage Retries Membership Requests"] MetaLoad["Metadata Service Saturated"]
Timeouts --> DropNodes DropNodes --> RetryStorm RetryStorm --> MetaLoad MetaLoad -->|"Slows responses to all servers"| DropNodes end
subgraph Recovery["Resolution"] PauseReq["Pause Metadata Requests (5:06 AM)"] AddCap["Add Significant Capacity"] Restored["Service Restored (7:10 AM PDT)"]
MetaLoad --> PauseReq PauseReq --> AddCap AddCap --> Restored end ```
The situation quickly spiraled into a thundering herd. Disrupted servers repeatedly attempted to refresh their membership data, flooding the metadata service with massive, concurrent requests. This heavy retry load bogged down the metadata service to the point where it could no longer respond promptly even to healthy storage servers that had been completely unaffected by the original network glitch.
- At 5:06 AM PDT, after several failed attempts to add capacity under saturated conditions, the decision was made to pause incoming requests to the metadata service, cutting off retry activity and shedding load. - With the metadata service relieved, administrative requests succeeded, allowing operators to spin up significant additional capacity. - At 7:10 AM PDT, DynamoDB was fully restored and error rates dropped low enough for dependent AWS services and customers to resume operations. - The presenter jokes that Amazon took a while to spool up capacity, deadpanning, “I guess they have very low standards and AWS Services depend on DynamoDB to resume normal operations,” before teasing an interpretive dance on AWS Elastic Beanstalk for the following year.
---
[58:23](https://www.youtube.com/watch?v=bg6-LVCHmGM&t=3503s) Bryan Cantrill on LX-Branded Zones and a "Crime Against Common Sense"
Host Geir Magnusson takes the stage to introduce the final lightning talk of the event, calling it an unwritten conference tradition. He introduces Bryan Cantrill of Joyent, joking that this might be the very first lightning talk where Cantrill actually knew what he was going to say before stepping up to the microphone. Cantrill takes the stage, noting that while there is an unwritten "Cantrill exception" allowing him to ignore the strict time limit, he will stick to the subject: an ordeal recorded in Joyent's internal history as a "crime against common sense."
Cantrill explains the backdrop: Joyent's implementation of LX-branded zones in SmartOS. The project involves building an entire Linux system call emulation layer directly inside the SmartOS (illumos) kernel so unmodified Linux binaries can execute natively in isolated zones. While running Linux containers on a Solaris-derived kernel sounds wonderful when it succeeds, building it requires replicating every corner case, quirk, and semantic misbehavior of the Linux kernel because developers cannot modify the third-party proprietary binaries they must run. Cantrill highlights the sheer pain of the effort:
> “It sounds great, it's great when it's done, okay, it is hell on earth to implement, and we have—all earned 10,000 years of lightning talks in implementing LX-branded zones because we have implemented Linux in all of its horrors, all of its semantic atrocities have been implemented because we can't actually argue with the application, we have to simply get it working.”
Selecting which system-level horror to talk about was difficult, but Cantrill chooses the investigation of Plex Media Server, a closed-source binary popular with hobbyists. When deployed inside an LX-branded zone, Plex consistently crashed and produced core dumps in incomprehensible ways.
---
[01:00:42](https://www.youtube.com/watch?v=bg6-LVCHmGM&t=3642s) The Plex Mystery and Dissecting Unoptimized jemalloc
In January, Joyent engineer Patrick Mooney began investigating an inexplicable LX core dump produced by Plex. Emulating a system call table means that any kernel-level mismatch causes userland applications to die in opaque, baffling ways. To aid troubleshooting, Joyent managed to obtain a binary build from the Plex developers compiled with debugging information. However, compiling with debug flags often forces the compiler to emit horribly unoptimized machine code.
Joyent's internal chat transcripts reveal the developers' escalating disbelief. Patrick Mooney pasted snippets of assembly into the channel, asking whether he had lost his mind or if the code was genuinely needlessly complex. Robert Mustacchi replied to Patrick's observation that the vendor binary miraculously retained symbol tables and frame pointers—calling it a "Shangri-La" compared to typical stripped Linux binaries. Mustacchi became so irritated by the general lack of symbols and frame pointers across the Linux ecosystem that he typed "self demerit," prompting an automated chat bot to increment his official demerit counter for falling for the troll.
Cantrill walks the audience through an actual disassembly snippet originating from unoptimized libjemalloc linked into the Plex binary, describing it with palpable frustration:
- The binary loads a 64-bit value from a base-pointer offset ending in `0xd80` into register `%rax` (`movq...(%rbp), %rax`). - It writes the value of register `%rdx` into memory at `0x10(%rax)`. - Immediately following that, it loads the exact same memory address from `%rbp` back into `%rax` a second time. Cantrill jokes that you wish the CPU would stop and ask: “You mean the one you just loaded, you want that one?... Do you think it's changed? No, probably not. Can I just give you the same thing I just gave you?” - Next, it moves the value at `0x10(%rax)` into `%eax`, followed by moving `%eax` into `%edx`, entirely repeating registers and values that were already held seconds prior.
While laughably bad, the inefficient assembly was not what caused Plex to crash, leaving Patrick Mooney stuck. However, Patrick channeled his frustration into fixing the SmartOS debugging toolchain: he realized that SmartOS core dumps lacked support for reading the `%fs` segment base register (`FS base`) used for thread-local storage in x86-64 Linux binaries, and promptly implemented that support so future core files would retain it.
[01:04:50](https://www.youtube.com/watch?v=bg6-LVCHmGM&t=3890s) Debugging Jitter, jemalloc Unit Test Failures, and Futex Paranoia
The speaker dives into internal chat logs from their debugging investigation, highlighting the humor of how multiple unrelated engineering discussions intersect simultaneously. In the middle of trying to diagnose why jemalloc is causing core dumps across different services, an engineer named Robert drops a message out of nowhere: “One day we'll replace QEMU's iths and it'll be glorious.” The speaker jokes that it felt like a random fortune cookie falling from the ceiling, even though Robert probably had a valid point. Meanwhile, another colleague, Patrick, pitched a “beautiful, beautiful theory” about what was causing the crashes, but as the speaker laments, the theory was directly contradicted by incoming empirical data, leaving the team no closer to discovering the root failure.
```mermaid flowchart TD accTitle: jemalloc Failure Investigation accDescr: Troubleshooting path from community reports to identifying madvise MADV_DONTNEED
subgraph Symptoms ["Application Failures"] Plex["Plex crashes"] Splunk["Splunk crashes"] RandomCores["Random Core Dumps"] end
subgraph Triage ["Community Report & Red Herrings"] PlexUser["Plex User: jemalloc unit tests fail"] FutexStress["Futex Stress Tests (Ruled out)"] end
subgraph Discovery ["Root Cause Traced"] Reproducible["Reproducible Unit Test Found"] SyscallInspect["Inspect Syscalls: madvise(MADV_DONTNEED)"] end
Symptoms --> PlexUser PlexUser --> FutexStress PlexUser --> Reproducible Reproducible --> SyscallInspect ```
A breakthrough arrives via an open-source bug report from a user running Plex, who observes that the jemalloc unit test suite fails to complete and bails out. Because jemalloc is present in the stack across various crashing programs like Splunk and Plex, having a failing unit test gives the engineering team an isolated, reproducible test case rather than having to chase chaotic production core dumps. Whenever random crashes happen under LX (the Linux emulation layer in SmartOS/illumos), the team's knee-jerk reaction is to assume their futex emulation is buggy. While the speaker admits futexes are “unbelievably god-awful broken” and worthy of ten thousand lightning talks of their own, stress testing confirms their futex implementation is completely solid. Isolating a single reproducible jemalloc unit test, the speaker inspects its system calls and spots a call to `madvise` passing the flag `MADV_DONTNEED`.
- The team divides duties: running futex stress tests on the side while simultaneously digging into the jemalloc unit test failures. - “What we have learned from this is that our futex implementation is definitely right, but we always blame the poor futexes,” the speaker notes regarding their initial suspicions.
[01:07:14](https://www.youtube.com/watch?v=bg6-LVCHmGM&t=4034s) POSIX Advice vs. Linux Imperative Commands
Examining `madvise` leads the speaker into a critique of API design, semantics, and language. Under the original POSIX standard, `madvise` provides optional hints from the application to the operating system kernel about anticipated memory usage patterns, enabling optimizations that the kernel cannot predict on its own. Crucially, advice by definition can be completely ignored. The POSIX standard explicitly mandates that calling `posix_madvise` “shall have no effect on the semantics of access to memory in the specified range, although it may affect the performance of access.” Under POSIX, `MADV_DONTNEED` simply alerts the kernel that an address range is unlikely to be accessed in the near future; the backing memory remains mapped, and its data semantics do not alter.
In stark contrast, the Linux manual page turns this hint into an imperative command. The speaker mocks the mangled grammar of the Linux man page, pointing out phrases like “do not expect access in the near future” and the bizarre temporal phrasing “for the time being, the application is finished with the given range.” On Linux, `MADV_DONTNEED` explicitly discards page contents: subsequent reads to an anonymous, private mapping do not retrieve the old data if the page is untouched, but instead return freshly zero-filled on-demand pages. The speaker argues this violates the entire concept of advice: “Why don't you unmap it? Yeah, that's not advice—unmap it, that's a command, that's a system call.”
| Dimension | POSIX `posix_madvise` (`MADV_DONTNEED`) | Linux `madvise` (`MADV_DONTNEED`) | |:--- |:--- |:--- | | **Nature of Call** | Advisory hint; kernel is free to ignore it entirely. | Imperative memory-management command. | | **Data Preservation** | Semantics unchanged; data cannot be assumed cleared or altered. | Anonymous private pages are immediately discarded and zeroed on next read. | | **Implementation Cost** | Flags pages to an eviction/reclaim candidate list cheaply. | Must actively modify page tables and reclaim/zero pages immediately. | | **jemalloc Expectation** | Cannot assume memory returns zeroed. | Explicitly relies on the OS guaranteeing zero-filled pages on subsequent access. |
[01:10:56](https://www.youtube.com/watch?v=bg6-LVCHmGM&t=4256s) The Broken Semantics and the Stack Overflow Rant
The speaker illustrates the difference with a minimal C program: map anonymous private memory with `mmap`, store the integer `123`, invoke `madvise(..., MADV_DONTNEED)`, and read the location back. On standard POSIX systems, the application cannot rely on getting zeroes back; it might retain `123` if the kernel never felt memory pressure, or get zeroes if pages were reclaimed. However, jemalloc specifically relies on Linux's guarantee that the memory is instantaneously cleared to zero. The speaker finds this unconscionable because Linux's behavior destroys the very performance benefit `MADV_DONTNEED` was designed to offer. Instead of doing the lightweight operation of appending pages to an OS reclaim list, the Linux kernel has to do heavy memory management work to tear down mappings and allocate zero-fill pages.
The frustration drove the speaker to search the internet to see if others were equally appalled by Linux's semantic divergence. While searching for `madvise MADV_DONTNEED Linux`, the top result on Stack Overflow was the question: *“Does madvise MADV_DONTNEED instruct the OS to lazily write to disk?”* The speaker launches into an exasperated comedic rant: - “You've been told, questioner, your entire life that there's no such thing as a stupid question, but that's a lie that smart people tell you—there is such a thing as a stupid question, and this is one of them.” - The speaker adds that while the poster has every right to live a fulfilling life and raise children, they must be kept far away from computers and never be permitted to use words like memory, disk, or call `madvise(MADV_DONTNEED)`.
[01:13:25](https://www.youtube.com/watch?v=bg6-LVCHmGM&t=4405s) The Stack Overflow Verdict and the 2005 LKML Debate
The speaker recounts digging into developer forums to understand how `madvise(MADV_DONTNEED)` behaves on Linux, hoping for a clean, comforting solution. Instead, he encountered a visceral, one-word blunt Stack Overflow answer warning developers away entirely: stay away from `madvise(MADV_DONTNEED)`, stay away from `madvise`, and frankly, stay away from operating systems and computers altogether, perhaps relocating to a roommate-seeking compound in Idaho. The answer pointed out that Linux does not treat `MADV_DONTNEED` as a hint to drop pages only after flushing them back to disk; instead, the kernel immediately throws them away. Far from being classified as an accidental bug, the maintainers consider this immediate data loss a deliberate design choice. Reading through Damon's impassioned explanation, the speaker felt an immediate kinship with the author's simmering frustration, noting that using `MADV_DONTNEED` under these semantics simply causes data loss.
```mermaid flowchart TD accTitle: POSIX versus Linux madvise Semantics accDescr: Diagram illustrating the diverging paths between standard POSIX madvise semantics and the Linux immediate-discard implementation. subgraph POSIX["POSIX Standard / Solaris"] P1["madvise(..., MADV_DONTNEED)"] --> P2["Treated as hint to page out"] P2 --> P3["Dirty pages flushed to backing store"] P4["MADV_FREE (Solaris)"] --> P5["Explicitly invalidate/free memory"] end subgraph Linux["Linux Implementation"] L1["madvise(..., MADV_DONTNEED)"] --> L2["Immediate page discard"] L2 --> L3["Dirty data dropped (Data Loss)"] end ```
Eager to discover who was responsible and whether Linux kernel developers grasped how flawed this behavior was, the speaker tracked the issue back to a 2005 Linux Kernel Mailing List (LKML) thread titled *"Wrong madvise MADV_DONTNEED semantics"*. In that thread, a poster pointed out that while the Linux man page and source code asserted that `MADV_DONTNEED` implies the application no longer cares about the data, that behavior blatantly violates the POSIX specification. The poster noted that other systems, like Solaris, provide `MADV_FREE` to explicitly invalidate pages when an application is done with them, and suggested Linux should introduce `MADV_FREE` while restoring proper POSIX semantics to `MADV_DONTNEED`. Robert Love weighed in favorably in 2005, agreeing that renaming the current semantics to `MADV_FREE` and giving `MADV_DONTNEED` standard semantics would be sensible. Yet, a decade later in 2015, the problem remained entirely unresolved. Another participant in the debate, Jörn Engel, captured the lingering indignation perfectly:
> “In my opinion, this is still a crime against common sense.”
- The Stack Overflow author Damon warned that Linux discards pages immediately rather than flushing dirty pages before eviction. - In 2005, developers on LKML pointed out that POSIX defines `madvise` merely as an advisory performance hint, not a destructive data-drop operation. - Solaris had long separated these concepts cleanly by offering `MADV_FREE` for explicit cache invalidation.
---
[01:16:17](https://www.youtube.com/watch?v=bg6-LVCHmGM&t=4577s) Tracking the Origin: Tru64, SAP, and the 1999 Bug Importation
Determined to trace the original sin, the speaker investigated which Unix variant originated this destructive behavior. While virtually every other mainstream system followed POSIX, the culprit turned out to be Tru64 UNIX. An email dated August 20, 1999 revealed that developers at SAP were porting their enterprise Unix software stack to Linux. A developer named Christoph was searching for memory-management primitives equivalent to AIX's `disclaim` or Tru64's `madvise`. Between AIX and Tru64, AIX actually had the correct architectural approach, but Christoph accidentally referenced Tru64's divergent implementation.
Christoph had noted on the mailing list that while `madvise` existed across many systems, implementations disagreed on `MADV_DONTNEED`, suggesting that Tru64's behavior might warrant a distinct flag like `MADV_FREE` or `MADV_DONTNEED`. Other kernel contributors responded that Tru64 had clearly misinterpreted the call—converting an advisory function intended purely for speed optimizations into a hard mapping removal. Despite this warning, the Tru64 semantics were adopted directly into the Linux kernel anyway. As a result, an obscure interpretation made by a Tru64 engineer in the late 1990s leaped into Linux and eventually cascaded into crashing Plex running on LX-branded zones years later.
- Christoph at SAP initiated the request on August 20, 1999, to facilitate running enterprise Unix applications on Linux. - Reviewers on LKML at the time acknowledged that Tru64's destructive interpretation was an odd misuse of an advisory optimization API. - Linux adopted the Tru64 behavior wholesale, baking the semantic divergence into the operating system for over fifteen years.
---
[01:18:33](https://www.youtube.com/watch?v=bg6-LVCHmGM&t=4713s) The Patch, jemalloc Benchmarks, and the Man Page "Fix"
The speaker notes that a proper fix—adding `MADV_FREE` to Linux—was finally proposed in 2014, fifteen years after the initial Tru64 code importation. Benchmarks using FreeBSD's allocator, `jemalloc`, proved that supporting `MADV_FREE` delivered massive performance improvements because applications could hint memory availability without suffering immediate page unmapping. Yet, despite the obvious performance gains and widespread developer demand, the patch languished unintegrated well into 2015, puncturing the common narrative that Linux kernel development always moves rapidly.
Instead of fixing the broken semantics in the kernel code, maintainers opted to "fix" the documentation. Historically, the Linux man page stated that the kernel is entirely free to ignore the advice passed to `madvise` because the call is, by definition, advisory. When confronted with the contradiction between the documented advisory nature and the kernel's destructive, non-optional page dropping, the maintainers resolved the bug simply by removing the sentence stating that the kernel may ignore the advice. The speaker closes his lightning talk with sarcastic exasperation at this bureaucratic workaround:
> “In the man page it used to say the kernel is free to ignore the advice because it's advice, and the bug is determined to be, well, the sentence is the bug, we should eliminate that.”
- In 2014, benchmarking with `jemalloc` demonstrated major throughput gains if Linux adopted proper `MADV_FREE` behavior. - By late 2015, the `MADV_FREE` implementation had still not landed in mainline production kernels. - The documentation discrepancy was resolved merely by striking out the sentence explaining that `madvise` advice is optional.
## Notable quotes > [23:03](https://www.youtube.com/watch?v=bg6-LVCHmGM&t=1383s) The number one problem that really is facing engineering writing is that you are terrified of your subject and you are terrified of your verb.
## Mentioned Abel Mathew, AddressSanitizer (ASan), AIX, Amazon Web Services (AWS), AMQParty, Andrew Wong, Apache Kafka, AppNexus, Ariadne, Atsushi Tero, Backtrace, Braintree, Broxy, Bryan Cantrill, Christoph, Circonus, Cisco, Clang, Dan McDonald, David Pacheco, Dimitris Kavourinis, Dino Farinacci, DWARF, DynamoDB, Eduardo Miranda, Eliyahu Goldratt, FreeBSD, GCC, GDB, Geir Magnusson, Gene Kim, George Spafford, Hemingway Editor, HTTParty, illumos, ILNP (RFC 6740), Intel Xeon E5, Internet Research Task Force (IRTF), Jackalope, Jeff Bezos, jemalloc, John Allspaw, John Willis, Josh Schmiedel, Joyent, Jörn Engel, Kevin Behr, libunwind, Linux, Linux Kernel Mailing List (LKML), LISP, LX-branded zones, Manta, Mark Cavage, Nagios, Named Data Networking (NDN), Node.js, OmniOS, OmniTI, PARC, Patrick Mooney, Physarum polycephalum, Plex Media Server, POSIX, PostgreSQL, QEMU, RabbitMQ, Rack, Ran Atkinson, Redis, Robert Love, Robert Mustacchi, Robert Treat, SAP, Scott Aaronson, SmartOS, Solaris, Splunk, Stack Overflow, Surge, Taiichi Ohno, The Phoenix Project, The Visible Ops Handbook, Theo Schlossnagle, Tru64 UNIX, Unicorn, Valgrind, Van Jacobson, W. Edwards Deming, Yogi Berra
## Video description The Surge 2015 Lightning Talks, sponsored by AppNexus, hosted by Geir Magnusson. Now with more interpretive dance.
[Source](https://www.youtube.com/watch?v=bg6-LVCHmGM)