open-menu closeme
Engineering
github linkedin rss
  • Page-cache thrashing on EC2: kill the tenant before it takes the host down

    calendar Oct 28, 2026 · 30 min read · Linux EC2 container  ·
    Share on: twitter copy

    For a long time, some of our container hosts, most often the smallest ones, would go dark every so often. A t3.micro with 1 GiB of memory, running a customer's containers, would stop sending logs and metrics all at once and never start again. The orchestrator still showed every container as RUNNING. The only signs of …


    Read More
  • Pre-load container images on the Bottlerocket read-only root filesystem

    calendar Oct 25, 2026 · 13 min read · Bottlerocket container Linux  ·
    Share on: twitter copy

    We run customer workloads in containers, and each container gets its own VM (an EC2 instance or a microVM). Every VM needs a few OCI images regardless of the workload: the language runtime image the customer's workload is built on, a log forwarding sidecar, an internal monitoring container. The obvious way to provide …


    Read More
  • Leaked empty directories exhaust inodes

    calendar Oct 23, 2026 · 6 min read · Linux container  ·
    Share on: twitter copy

    I fixed an issue where new containers failed to launch on a node with "no space left on device". There was free space available, and the issue happened only on a small percentage of nodes. It turned out those nodes churned containers more often than the others, and the failure came from running out of inodes, …


    Read More
  • Share one client per service

    calendar Oct 13, 2026 · 6 min read · Go Distributed System  ·
    Share on: twitter copy

    I recently dealt with an issue where a service failed occasionally during short throttling windows. The root cause was one I had seen many times before: a process holding multiple clients for the same service. This post walks through the issue, why the bug is rare in Java but common in Go, and how to avoid it. The bug …


    Read More
  • Debugging zero disk reads after moving to Bottlerocket

    calendar Oct 6, 2026 · 9 min read · Linux Container Bottlerocket  ·
    Share on: twitter copy

    Our container platform moved from Amazon Linux 2 (AL2) to Bottlerocket. Soon after the migration started, a partner team that runs Spark jobs reported a regression. Their jobs still finished successfully, but far more of them reported zero "storage read bytes": about 23% of tasks on AL2, and about 56% on …


    Read More
  • When sync.Cond is a better primitive than channels: lessons from Go's HTTP/2 client

    calendar Sep 17, 2026 · 14 min read · Go Concurrency  ·
    Share on: twitter copy

    I recently reviewed code that let a dynamic set of goroutines wait for updates from a single writer. Each waiter wanted to block until the writer had published something newer than what it had already seen. The implementation used channels and was hard to follow. A condition variable (sync.Cond) would have been less …


    Read More
  • Mysterious boot hang on Graviton: mitigated but never root-caused

    calendar Sep 11, 2026 · 10 min read · Linux Bottlerocket  ·
    Share on: twitter copy

    I was getting an arm64 build of our Bottlerocket variant ready for production on Graviton EC2 instances. Load tests kept failing at a low rate. Somewhere between 0.3% and 1% of instances froze a few seconds into boot and never came back. The x86_64 build of the same variant has never done this. I never found the root …


    Read More
  • What is an ABI? Break one to find out

    calendar Sep 1, 2026 · 11 min read · Linux  ·
    Share on: twitter copy

    I used NVIDIA's go-dcgm to read GPU health data and stats. It hardcodes the name of the dynamic library it loads, which looked odd at first and turns out to be good practice. go-dcgm uses cgo, and its initDCGM dlopens the literal string libdcgm.so.4 at runtime: 1func initDCGM(m mode, args ...string) (err error) { 2 …


    Read More
  • Counting systemd service restarts: NRestarts and the D-Bus API behind it

    calendar Aug 18, 2026 · 14 min read · Linux systemd  ·
    Share on: twitter copy

    A while ago I debugged a resource leak caused by a service stuck in a restart loop. Each restart left a process behind, and after a few minutes the host had over a thousand copies of it. Nothing alerted on the loop itself. We noticed CPU and memory climbing, and only found the restart loop after reading the journal. …


    Read More
  • Apply sysctl before systemd: a lesson from reserving ephemeral ports too late

    calendar Aug 1, 2026 · 7 min read · Linux Network Bottlerocket  ·
    Share on: twitter copy

    We run an OpenTelemetry Collector (otel-collector) as a systemd service on Bottlerocket. Its Prometheus metrics endpoint was configured on port 51000, which falls inside the default Linux ephemeral port range. On a small portion of EC2 instances, the otel-collector kept restarting, failing to bind with EADDRINUSE. …


    Read More
    • ««
    • «
    • 1
    • 2
    • 3
    • 4
    • 5
    • »
    • »»

Peng Zhang

Software Engineer

Recent Posts

  • Page-cache thrashing on EC2: kill the tenant before it takes the host down
  • Pre-load container images on the Bottlerocket read-only root filesystem
  • Leaked empty directories exhaust inodes
  • Share one client per service
  • Debugging zero disk reads after moving to Bottlerocket
  • When sync.Cond is a better primitive than channels: lessons from Go's HTTP/2 client
  • Mysterious boot hang on Graviton: mitigated but never root-caused
  • What is an ABI? Break one to find out

Tags

LINUX 29 GO 23 BOTTLEROCKET 11 CONTAINER 9 ALGORITHMS 8 INTERVIEW 7 CONCURRENCY 4 SYSTEMD 4 DISTRIBUTED SYSTEM 3 GUIDE 3 AWS 2 CONTAINERS 2 EC2 2 SELINUX 2
All Tags
ALGORITHMS8 AWS2 BOTTLEROCKET11 CONCURRENCY4 CONTAINER9 CONTAINERS2 CRYPTOGRAPHY1 DATABASES1 DISTRIBUTED SYSTEM3 DNS1 DOCKER1 EC22 GO23 GUIDE3 INTERVIEW7 LINUX29 NETWORK1 SELINUX2 SHELL1 SYSTEMD4 TESTING1 WEB2
[A~Z][0~9]
Peng Zhang

Copyright 2022-  PENG ZHANG. All Rights Reserved

to-top