Skip to content

Instantly share code, notes, and snippets.

View RichardoC's full-sized avatar

Richard Tweed RichardoC

View GitHub Profile
@wlonkly
wlonkly / debugging.md
Last active July 8, 2021 15:13
Steps I took to troubleshoot a full disk

I wrote this down after I responded to a page today (a holiday) because it would've been a decent pairing opportunity for a couple of new people on my team. Second best is that people can read what I did afterwards and ask me any questions. And then I realized that there's nothing PagerDuty-specific or confidential in here, so I may as well share it wider. It's hardly an epic incident, but it's a good example of "doing the work", I think. I borrowed the "write down what you learned" approach from Julia "b0rk" Evans. It's a fantastic practice.

The PagerDuty incident: "Disk will be full in 12 hours. device:/dev/nvme0n1p1, host:stg-nomadusw2-client-..."

(Note for non-PD readers: We run Nomad where others might run Kubernetes.)

Here's the process I went through.

  • Noticed that the usual docker system prune -a -f didn't resolve it
  • Tried docker system prune -a -f and it cleared up 0B
@maximilien
maximilien / tar_helper.go
Created October 31, 2014 16:53
Creating tarball in Golang
package tar_helper
import (
"archive/tar"
"compress/gzip"
"errors"
"fmt"
"io"
"io/ioutil"
"os"
@jboner
jboner / latency.txt
Last active April 25, 2024 11:20
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD