Reference. Performal: Formal Verification of Latency Properties for Distributed Systems
Understanding and debugging the performance of distributed systems is a notoriously hard task, but a critical one. Traditional techniques like logging, tracing, and benchmarking represent a best-effort way to find performance bugs, but they either require a full deployment to be effective or can only find bugs after they manifest. Even with such techniques in place, real deployments often exhibit performance bugs that cause unwanted behavior. In this paper, we present Performal, a novel methodology that leverages the recent advances in formal verification to provide rigorous latency guarantees for real, complex distributed systems. The task is not an easy one: it requires carefully decoupling the formal proofs from the execution environment, formally defining latency properties, and proving them on real, distributed implementations. We used Performal to prove rigorous upper bounds for the latency of three applications: a distributed lock, ZooKeeper and a MultiPaxos-based State Machine Replication system. Our experimental evaluation shows that these bounds are a good proxy for the behavior of the deployed system and can be used to identify performance bugs in real-world systems.
Cite
Cites 84 works (5 here)
With notes (5)
Finding Invariants of Distributed Systems: It’s a Small (Enough) World After All hanceFindingInvariantsDistributed
Today’s distributed systems are increasingly complex, leading to subtle bugs that are difficult to detect with standard testing methods. Formal verification can provably rule out such bugs, but historically it has been excessively labor intensive. For distributed systems, recent work shows that, given a correct inductive invariant, nearly all other proof work can be automated; however, the construction of such invariants is still a difficult manual task. In this paper, we demonstrate a new methodology for automating the construction of inductive invariants, given as input a (formal) description of the distributed system and a desired safety condition. Our system performs an exhaustive search within a given space of candidate invariants in order to find and verify inductive invariants which suffice to prove the safety condition. Central to our ability to search efficiently is our algorithm’s ability to learn from counterexamples whenever a candidate fails to be invariant, allowing us to check the remaining candidates more efficiently. We hypothesize that many distributed systems, even complex ones, may have concise invariants that make this approach practical, and in support of this, we show that our system is able to identify and verify inductive invariants for the Paxos protocol, which proved too complex for previous work.
DistAI: Data-Driven Automated Invariant Learning for Distributed Protocols yaoDistAIDataDrivenAutomated
Distributed systems are notoriously hard to implement correctly due to non-determinism. Finding the inductive invariant of the distributed protocol is a critical step in verifying the correctness of distributed systems, but takes a long time to do even for simple protocols. We present DistAI, a data-driven automated system for learning inductive invariants for distributed protocols. DistAI generates data by simulating the distributed protocol at different instance sizes and recording states as samples. Based on the observation that invariants are often concise in practice, DistAI starts with small invariant formulas and enumerates all strongest possible invariants that hold for all samples. It then feeds those invariants and the desired safety properties to an SMT solver to check if the conjunction of the invariants and the safety properties is inductive. Starting with small invariant formulas and strongest possible invariants avoids large SMT queries, improving SMT solver performance. Because DistAI starts with the strongest possible invariants, if the SMT solver fails, DistAI does not need to discard failed invariants, but knows to monotonically weaken them and try again with the solver, repeating the process until it eventually succeeds. We prove that DistAI is guaranteed to find the ∃-free inductive invariant that proves the desired safety properties in finite time, if one exists. Our evaluation shows that DistAI successfully verifies 13 common distributed protocols automatically and outperforms alternative methods both in the number of protocols it verifies and the speed at which it does so, in some cases by more than two orders of magnitude.
I4: Incremental inference of inductive invariants for verification of distributed protocols maI4IncrementalInference2019
Designing and implementing distributed systems correctly is a very challenging task. Recently, formal verification has been successfully used to prove the correctness of distributed systems. At the heart of formal verification lies a computerchecked proof with an inductive invariant. Finding this inductive invariant, however, is the most difficult part of the proof. Alas, current proof techniques require inductive invariants to be found manually—and painstakingly—by the developer. In this paper, we present a new approach, Incremental Inference of Inductive Invariants (I4), to automatically generate inductive invariants for distributed protocols. The essence of our idea is simple: the inductive invariant of a finite instance of the protocol can be used to infer a general inductive invariant for the infinite distributed protocol. In I4, we create a finite instance of the protocol; use a model checking tool to automatically derive the inductive invariant for this finite instance; and generalize this invariant to an inductive invariant for the infinite protocol. Our experiments show that I4 can prove the correctness of several distributed protocols like Chord, 2PC and Transaction Chains with little to no human effort.
Ivy: Safety verification by interactive generalization padonIvySafetyVerification
Despite several decades of research, the problem of formal verification of infinite-state systems has resisted effective automation. We describe a system — Ivy — for interactively verifying safety of infinite-state systems. Ivy’s key principle is that whenever verification fails, Ivy graphically displays a concrete counterexample to induction. The user then interactively guides generalization from this counterexample. This process continues until an inductive invariant is found. Ivy searches for universally quantified invariants, and uses a restricted modeling language. This ensures that all verification conditions can be checked algorithmically. All user interactions are performed using graphical models, easing the user’s task. We describe our initial experience with verifying several distributed protocols.
IronFleet: proving practical distributed systems correct hawblitzel-2015-ironfleet
External (79)
- Artifact for Performal: Formal Verification of Latency Properties for Distributed Systems (2023)
- For a Few Dollars More: Verified Fine-Grained Algorithm Analysis Down to LLVM (2022)
- Performance Interfaces for Network Functions (2022)
- ORION and the Three Rights: Sizing, Bundling, and Prewarming for Serverless DAGs (2022)
- DuoAI: Fast, Automated Inference of Inductive Invariants for Verifying Distributed Protocols (2022)
- Aequitas: Admission Control for Performance-Critical RPCs in Datacenters (2022)
- DProf: distributed profiler with strong guarantees (2019)
- Verifying concurrent, crash-safe systems with Perennial (2019)
- Inferring Inductive Invariants from Phase Structures (2019)
- Performance Contracts for Software Network Functions (2019)
- Scaling symbolic evaluation for automated verification of systems code with Serval (2019)
- Zeno: Diagnosing Performance Problems with Temporal Provenance (2019)
- Amazon Found Every 100ms of Latency Cost them 1% in Sales (blog) (2019)
- Combining Source and Target Level Cost Analyses for OCaml Programs (2019)
- Verifying concurrent software using movers in CSPEC (2018)
- A Fistful of Dollars: Formalizing Asymptotic Complexity Claims via Deductive Program Verification (2018)
- Weighted Sampling of Execution Traces (2018)
- Distributed Network Monitoring and Debugging with SwitchPointer (2018)
- Debugging Distributed Systems with Why-Across-Time Provenance (2018)
- Proving confidentiality in a file system using DiskSec (2018)
- Verifying the Correctness and Amortized Complexity of a Union-Find Implementation in Separation Logic with Time Credits (2017)
- IronFleet: proving safety and liveness of practical distributed systems (2017)
- Pivot Tracing: Dynamic Causal Monitoring for Distributed Systems (2017)
- A Coq Library for Internal Verification of Running-Times (2017)
- Hyperkernel: Push-Button Verification of an OS Kernel (2017)
- High-assurance timing analysis for a high-assurance real-time operating system (2017)
- WorkloadCompactor: Reducing Datacenter Cost While Providing Tail Latency SLO Guarantees (2017)
- The state of online retail performance (Akamai press release) (2017)
- Towards automatic resource bound analysis for OCaml (2016)
- Chapar: certified causally consistent distributed key-value stores (2016)
- SNC-Meister: Admitting More Tenants with Tail Latency SLOs (2016)
- Compositional certified resource bounds (2015)
- Using Crash Hoare logic for certifying the FSCQ file system (2015)
- Pingmesh: A Large-Scale System for Data Center Network Latency Measurement and Analysis (2015)
- Silo: Predictable Message Latency in the Cloud (2015)
- Towards Pre-Deployment Detection of Performance Failures in Cloud Distributed Systems (2015)
- Verdi: a framework for implementing and formally verifying distributed systems (2015)
- DynamoDB service disruption summary (AWS message 5467D2) (2015)
- What Bugs Live in the Cloud? A Study of 3000+ Issues in Cloud Systems (2014)
- Upper-bounding Program Execution Time with Extreme Value Theory (2013)
- Verifying Real-Time Software Is Not Reasonable (Today) (2013)
- Fay: Extensible Distributed Tracing from Kernels to Clusters (2012)
- Resource Aware ML (2012)
- Amazon DynamoDB: a seamlessly scalable non-relational database service (2012)
- ZOOKEEPER-1465 (Apache Jira issue) (2012)
- Timing Analysis of a Protected Operating System Kernel (2011)
- Hybrid measurement-based WCET analysis at the source level using object-level traces (2010)
- Benchmarking cloud serving systems with YCSB (2010)
- Timed I/O automata (2010)
- Amortized Resource Analysis with Polynomial Potential (2010)
- Finding latent performance bugs in systems implementations (2010)
- Dapper, a Large-Scale Distributed Systems Tracing Infrastructure (2010)
- ZooKeeper: Wait-Free Coordination for Internet-Scale Systems (2010)
- Statistical-based WCET estimation and validation (2009)
- End-to-end performance forecasting (2009)
- Chronos: A timing analyzer for embedded software (2007)
- Execution-time profiles (2007)
- Measurements or static analysis or both? (2007)
- X-Trace: A Pervasive Network Tracing Framework (2007)
- Using Magpie for request extraction and workload modelling (2004)
- Early performance testing of distributed software applications (2004)
- pwcet: A tool for probabilistic worst-case execution time analysis of real-time systems (2003)
- Paxos Made Simple (2001)
- A hierarchical fair service curve algorithm for link-sharing, real-time, and priority services (2000)
- SCED: a generalized scheduling policy for guaranteeing quality-of-service (1999)
- Timed Automata (CAV 1999) (1999)
- The part-time parliament (1998)
- Revisiting the Paxos algorithm (1997)
- A Process Algebra for Timed Systems (1995)
- Automatic verification of real-time communicating systems by constraint-solving (1995)
- A theory of timed automata (1994)
- Fischer's protocol in timed process algebra (1994)
- Model-checking in dense real-time (1993)
- An overview and synthesis on timed process algebras (1992)
- Modeling and verification of time dependent systems using time Petri nets (1991)
- A calculus for network delay. I. Network elements in isolation (1991)
- Analysis of asynchronous concurrent systems by timed Petri nets (1973)
- The humble programmer (1972)
- Rules for Ordering Uncertain Prospects (1969)