Skip to content

Instantly share code, notes, and snippets.

View fmikker's full-sized avatar

Fredrik Mikker fmikker

  • Sweden
View GitHub Profile
#!/usr/bin/env python3
BACKUP_FILE = 'backup.ab'
# Constants
# ref: https://github.com/omnirom/android_bootable_recovery/blob/android-7.1/adbbu/twadbstream.h
TWRP = b'TWRP' + b'\x00\x00\x00\x00'
TWSTREAMHDR = b'twstreamheader'
TWFN = b'twfilename'
@Artefact2
Artefact2 / 00considerations.md
Last active September 1, 2021 02:59
Borg compression benchmark/comparison

Considerations

  • Tests were run in single-user mode, one at a time.
  • Data was read from and written to tmpfs.
  • borg-1.1rc2 seems about 10% slower than borg-1.0.11 (many possible reasons, borg-1.1rc2 binary comes from GitHub but 1.0.11 from the Arch repos)
  • Still making sense of the auto,X,Y compression modes
@milkey-mouse
milkey-mouse / README.md
Last active October 14, 2017 22:52
back up a full image of a libvirt-based VM while it's running
@hellerbarde
hellerbarde / latency.markdown
Created May 31, 2012 13:16 — forked from jboner/latency.txt
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs