Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Meta Engineering 12 min read Case study mediumAdept

Strobelight: A profiling service built on open source technology

Strobelight is Meta's fleet-wide profiling orchestrator, running 42 profilers (mostly eBPF-based, plus ad-hoc bpftrace scripts) on every production host with safeguards against PMU counter conflicts, concurrency limits and queuing. Default continuous profiling uses dynamic sampling that retunes run probability daily per service to hit target sample counts, with sample weights normalizing data for cross-host and cross-service comparison. LBR data feeds Meta's FDO pipeline (CSSPGO and BOLT), cutting CPU cycles up to 20% for top services, and one efficiency win alone saved an estimated 15,000 servers annually. Stack Schemas and thread-local Strobemeta enrich stacks with tags and request metadata, while a centralized symbolization service built on DWARF, gsym and blazesym avoids on-host debug-info parsing, relying on frame pointers in all user-space binaries.

Related posts

  • Reverse debugging at scale

    Meta Engineering hardMaster

    Meta continuously records Intel Processor Trace (Intel PT) data for all running processes in production, keeping it in a bounded circular buffer. An eBPF kernel probe notifies the collector within milliseconds of a crash, so the crashed process's trace is saved before other processes overwrite it. Traces and binaries are stored for offline analysis, where an LLDB plugin decodes taken and not-taken branches against the binary, symbolicates the executed instructions, and builds a function call tree that makes reverse-step-over and reverse breakpoints cheap. The same timestamped traces also support latency analysis that sampled call stacks miss, with visualization planned for Meta's Tracery tool and VSCode.

  • How we wrote a Python profiler

    Datadog Engineering mediumAdept

    Datadog built an always-on statistical profiler for Python because deterministic profilers like cProfile can add 2-3x overhead, too much for production. The design borrows from JDK Flight Recorder and splits into recorder, collectors, exporter and scheduler. A Cython-based stack collector samples every thread's stack 100 times per second and lowers its polling rate under heavy load to cap overhead. Memory and lock collectors add allocation and lock-contention data, and profiles are aggregated into compact pprof (protobuf) files uploaded every minute through the Datadog Agent.

  • Accelerating our Android apps with Baseline Profiles

    Meta Engineering mediumAdept

    Meta generates Android Baseline Profiles from production class-load and method-usage data to trigger ART install-time AOT compilation and app image creation, improving startup, scroll and navigation metrics by 3% to 40% across its apps. Cloud Profiles fell short because they help only later users in a rollout, give developers no control, are skewed toward early startup (ART treats startup as done after five seconds), and work only through Google Play. Meta samples class loads through a custom ClassLoader at a very low rate, adds method-cluster telemetry, keeps entries that appear above a frequency threshold, and feeds a human-readable profile to profgen. The inclusion threshold started at 80–90% of traces to limit code-size and memory-pressure costs, since compiled code is about 10x larger than dex. It has since dropped to 20%, and profiles now hold tens of thousands of entries.

  • The pursuit of an autonomic scale and efficiency system for Microsoft 365: Making it as easy as breathing

    Engineering@Microsoft easyNovice

    Microsoft 365's Cloud Profiling and Reporting Pipeline continuously profiles 1000+ services, capturing CPU, allocations, rooted and duplicated memory, exceptions, IO, GC pause stacks and blocking latency. It feeds that production data back to engineers through Visual Studio code lens cost trends, Roslyn analyzers for efficient patterns, and pull request bots that comment on efficiency opportunities. Anomaly detection over the dataset flags code-level resource regressions through heatmaps and routes them into incident tooling. A flame-graph viewer supports shared issue tagging and trending over time. The stated goal is a self-optimizing cloud that eventually uses AI tools like PerfLens to fix inefficient code automatically.

  • .NET Continuous Profiler: CPU and wall time profiling

    Datadog Engineering hardMaster

    Datadog's .NET continuous profiler samples managed threads every 10 ms instead of relying on ETW, perf or enter/leave hooks, which cost too much for 24/7 production use. CPU samples are taken only from runnable threads, with CPU time read via NtQueryInformationThread or /proc. Wall time samples add extra threads tied to trace spans for Code Hotspots. Stack walking uses signal handlers plus libunwind on Linux, and on Windows uses thread suspension with DoStackSnapshot (32-bit) or RtlVirtualUnwind (64-bit), with a watcher thread and LD_PRELOAD trampolines to avoid deadlocks. Profiling the profiler showed std::ifstream reads of /proc allocating 8 KB per sample; switching to low-level C reads cut CPU and removed the allocations.

The quest for software engineering knowledge.

Look:
Layout: