Fractal: Fault-Tolerant Shell-Script Distribution
Zhicheng Huang (Brown University), Ramiz Dundar (Brown University), Yizheng Xie (Brown University), Konstantinos Kallas (University of California, Los Angeles), Nikos Vasilakis (Brown University)
23rd USENIX Symposium on Networked Systems Design and Implementation (NSDI '26) · Day 3 · Designing Robust Networked Systems
Overview
Modern software ecosystems frequently compose opaque software components to accomplish complex tasks, interacting through diverse communication mechanisms such as raw data streams or well-defined protocols without exposing internal states and execution logic. While this design is powerful, opacity severely complicates fault tolerance in distributed execution environments. This challenge manifests across microservices, agentic workflows, and particularly shell scripts—which remain pervasive across domains such as bioinformatics analysis, data science, and pipeline orchestration. Although previous systems have improved the runtime performance of shell programs through single-node acceleration and distributed execution frameworks, none of these distributed shell execution environments are fault-tolerant.

Key moments
- 0:00 Introduction and motivating example for distributed shell pipelines
- 2:00 Challenges of adding fault tolerance to distributed shell programs
- 4:00 Introduction to Fractal and its subgraph-based fault tolerance design
- 6:00 Remote pipes, progress tracking, and recovery mechanisms
- 8:00 Evaluation setup and benchmarks compared against Bash and Dish
- 9:50 Fault-free performance results and speedup comparisons
- 11:00 Fault recovery performance and fault injection analysis
Fractal: Fault-Tolerant Shell-Script Distribution
Speakers: Zhicheng Huang (Brown University); Ramiz Dundar (Brown University); Yizheng Xie (Brown University); Konstantinos Kallas (University of California, Los Angeles); Nikos Vasilakis (Brown University)
Conference: USENIX NSDI
YouTube: https://www.youtube.com/watch?v=f0EBY2Lopnw
Overview
Modern software ecosystems frequently compose opaque software components to accomplish complex tasks, interacting through diverse communication mechanisms such as raw data streams or well-defined protocols without exposing internal states and execution logic. While this design is powerful, opacity severely complicates fault tolerance in distributed execution environments. This challenge manifests across microservices, agentic workflows, and particularly shell scripts—which remain pervasive across domains such as bioinformatics analysis, data science, and pipeline orchestration. Although previous systems have improved the runtime performance of shell programs through single-node acceleration and distributed execution frameworks, none of these distributed shell execution environments are fault-tolerant.
This talk introduces Fractal, the first system that provides fault tolerance for the distribution of unmodified shell programs. Designed to bolt directly onto existing shell distribution engines, Fractal focuses on tolerating fail-stop and fail-restart crashes of worker nodes during long-running, deterministic, and idempotent computations. By operating at the level of subgraphs assigned to individual workers and tracking progress exclusively at input and output boundaries using remote pipes, Fractal guarantees exactly-once delivery semantics and identical execution behavior under faulty conditions without requiring manual script rewriting or access to internal command states.
Background
▶ Watch: Introduction and motivating example for distributed shell pipelines (0:00)
Over the past few decades, extensive work has focused on accelerating shell programs, ranging from single-node optimizations to distributed execution across distributed file systems and serverless platforms. However, running complex shell pipelines—such as parsing Hadoop Distributed File System (HDFS) logs, filtering search bots, extracting IPs, calculating visit frequencies, and sorting results—at scale exposes a critical deficiency: lack of fault tolerance.
When engineers attempt to make such pipelines fault-tolerant, they typically resort to manual rewrites using existing big-data frameworks. For instance, developers might rebuild data lineage using resilient distributed dataset abstractions in Apache Spark or implement explicit mappers and reducers in Apache Hadoop streaming. However, this manual refactoring forces developers to abandon the benefits of composing existing command-line tools opaquely, while often capturing only a subset of the computation and leaving surrounding preprocessing and postprocessing logic back in the shell. Furthermore, manual porting is error-prone because shell programs dynamically interact with the operating environment and compose heterogeneous command-line utilities.
Directly distributing unmodified shell programs avoids these engineering bottlenecks, but introduces severe recovery challenges. Standard checkpoint-recovery techniques fail because shell utilities maintain opaque internal states—such as grep maintaining line-level matching buffers or sort buffering entire input streams before producing output. Similarly, barrier-based or lineage-based approaches struggle because shell pipelines communicate through raw data streams devoid of structured metadata, preventing traditional systems from tracking progress and identifying recovery points after a node failure.
Key Findings
▶ Watch: Introduction to Fractal and its subgraph-based fault tolerance design (4:00)
- Substantial Speedup Over MapReduce Baselines: Fractal achieves up to a 107× runtime improvement over Apache Hadoop streaming (which peaks at 9.5×) across benchmark suites due to its ability to exploit data, task, and pipeline parallelism simultaneously across the entire shell script, avoiding rigid MapReduce synchronization barriers.
- Low Fault-Free Overhead: When compared against DISH (the underlying state-of-the-art shell distribution system that Fractal builds upon), Fractal introduces minimal overhead during fault-free execution and occasionally outperforms DISH thanks to specialized runtime optimizations.
- Efficient Fault Recovery: In a 4-node cluster executing a top-$N$ word frequency pipeline, Fractal recovers from faults injected at 10% completion in 36 seconds (compared to 94 seconds for Hadoop streaming), and handles late-stage failures (injected at 90% completion) by isolating re-execution burdens.
- Generalizability: Evaluated across 5 benchmarks from the Koala benchmark suite, totaling 77 scripts and up to 33.4 GB of input data, demonstrating robust applicability to diverse shell workflows.
Technical Deep Dive
▶ Watch: Remote pipes, progress tracking, and recovery mechanisms (6:00)
Fractal is architected to bolt directly onto underlying shell distribution systems (such as DISH) without altering the underlying Unix binaries or requiring modifications to user-written shell scripts. It operates under the assumption that worker nodes execute long-running, deterministic, and idempotent computations for parallel execution, while side-effectful and non-idempotent operations (such as output redirection or client filesystem interactions) execute locally on the client machine.
The foundational abstraction in Fractal is the subgraph, defined as the complete program fragment assigned to a single worker machine. Each subgraph reads data exclusively from the distributed file system or from upstream subgraphs, and writes its output across worker boundaries solely to downstream subgraphs or the client machine. Fractal treats each subgraph as an entirely opaque black box, bypassing the need to inspect internal command states. Instead, it tracks execution strictly at input and output boundaries.
To manage communication and progress tracking without structured metadata, Fractal introduces remote pipes as drop-in replacements for standard Unix pipes. During normal fault-free execution, remote pipes periodically report progress metrics—such as the exact byte count sent and received—to a logically centralized monitor. This telemetry is leveraged during recovery to detect and discard duplicate transmissions, enforcing strict exactly-once delivery semantics.
Fractal also incorporates sophisticated runtime optimizations, such as selectively deciding whether to persist intermediate subgraph outputs to disk based on real-time cluster telemetry (e.g., available disk capacity) and subgraph characteristics (e.g., input data volume).
Upon detecting a worker failure, Fractal classifies subgraphs into two distinct categories and applies specialized recovery strategies:
- Regular Subgraphs: These operate independently on individual data blocks. Recovery is achieved by simply re-executing the computation on the original distributed file system input data block.
- Merger Subgraphs: These aggregate results from multiple regular subgraphs. Recovery ensures that all missing inputs are regenerated either by reading persistent disk outputs or by re-executing upstream subgraphs if intermediate data was not persisted. Any duplicated data generated during this process is automatically filtered and removed by the remote pipes.
Experimental Setup & Results
▶ Watch: Fault-free performance results and speedup comparisons (9:50)
The evaluation of Fractal utilizes five distinct benchmarks drawn from the Koala benchmark suite, comprising a total of 77 scripts processing up to 33.4 GB of input data. The authors compare Fractal against three baselines: Bash (the standard single-node shell interpreter), DISH (the state-of-the-art shell distribution engine), and Apache Hadoop streaming. To rigorously test resilience, the authors developed FRAC, a specialized fault injection subsystem capable of injecting faults at precise progress points during execution.
In fault-free evaluations conducted on a 30-node cluster, Fractal demonstrated massive performance gains over Apache Hadoop streaming. While Hadoop streaming achieved a maximum speedup of 9.5× over single-node Bash, Fractal attained speedups of up to 107×. This performance differential stems from Fractal’s capacity to execute data, task, and pipeline parallelism concurrently across the entire script, whereas Hadoop streaming forces rigid MapReduce boundaries where all mappers and reducers must synchronize before subsequent stages proceed. Fractal exhibits minor slowdowns exclusively in a small subset of trivial benchmarks where distribution overhead dominates execution time. Compared directly against DISH, Fractal maintains comparable performance, proving that its fault-tolerance mechanisms introduce negligible overhead during normal execution.
In fault-recovery evaluations on a 4-node cluster running a top-$N$ word frequency pipeline, Fractal completed fault-free executions more than 3 times faster than Hadoop streaming. When faults were injected at 10% completion (during regular subgraph or mapper execution), Hadoop streaming required 94 seconds of recovery overhead, whereas Fractal recovered in just 36 seconds. When faults were injected at 90% completion (during merger subgraph or reducer execution), both systems incurred heavier recovery costs due to the extensive re-computation required to regenerate missing inputs for aggregation phases, yet Fractal maintained superior efficiency across the recovery lifecycle.
Practical Implications
▶ Watch: Fault recovery performance and fault injection analysis (11:00)
For infrastructure teams and systems engineers building distributed data-processing pipelines, Fractal bridges a long-standing gap between the flexibility of shell script composition and the robustness required for production-scale distributed computing. Practitioners no longer need to manually port ad-hoc shell scripts into rigid big-data frameworks like Spark or Hadoop simply to achieve fault tolerance.
However, practitioners must consider certain operational tradeoffs. While Fractal eliminates manual refactoring overhead, workloads dominated by extremely small input sizes or trivial computation may suffer from distribution and monitoring overheads. Furthermore, side-effectful operations must still run locally on the client machine, meaning system designers must carefully structure pipelines to isolate non-idempotent tasks outside of distributed worker subgraphs.
Key Takeaways
- Unmodified Shell Fault Tolerance: Fractal provides the first fault-tolerant distributed execution framework for unmodified shell scripts without requiring manual code rewrites.
- Subgraph-Level Abstraction: By treating execution fragments assigned to single workers as opaque subgraphs, Fractal avoids the impossibility of checkpointing internal states of arbitrary Unix tools.
- Remote Pipes for Boundary Tracking: Remote pipes replace standard Unix pipes to monitor byte-level progress and prune duplicate data during recovery, guaranteeing exactly-once semantics.
- Dramatic Performance Advantage: Fractal achieves up to a 107× speedup over Apache Hadoop streaming by unlocking simultaneous data, task, and pipeline parallelism.
- Targeted Recovery Strategies: Fault recovery is bifurcated into simple re-execution for regular subgraphs and lineage-backed regeneration for merger subgraphs, minimizing wasted compute time.
About the Speaker(s)
The research was presented by Zhicheng Huang, a researcher at Brown University, alongside co-authors Ramiz Dundar, Yizheng Xie, and Nikos Vasilakis from Brown University, and Konstantinos Kallas from the University of California, Los Angeles. The team specializes in systems, programming languages, and distributed runtime environments, with a focus on making expressive, legacy developer interfaces robust and scalable for modern distributed clusters.
Reviews
→ Top-rated talks at 23rd USENIX Symposium on Networked Systems Design and Implementation (NSDI '26)
All talks from 23rd USENIX Symposium on Networked Systems Design and Implementation (NSDI '26)