Skip to content

Instantly share code, notes, and snippets.

View congwang-mk's full-sized avatar

Cong Wang congwang-mk

View GitHub Profile
root@localhost:~# kerf exec --console --verbose web-server
Instance name: web-server (ID: 1)
Checking if kernel image is loaded for instance 'web-server'...
Status file: /sys/fs/multikernel/instances/web-server/status
Instance status: 'loaded'
✓ Kernel image found for instance 'web-server'
Instance ID to boot: 1
Using reboot syscall with command: 0x4d4b4c49
Calling reboot syscall at TSC 126359934520
✓ Boot command executed successfully (result: 0)
@congwang-mk
congwang-mk / bench_redis.py
Created March 21, 2026 22:08
Sandlock vs Docker Redis benchmark
#!/usr/bin/env python3
"""Benchmark Redis: bare metal vs sandlock vs Docker.
redis-server runs in each environment.
redis-benchmark runs on host, connecting to the server.
Tests SET/GET with small payloads (256 bytes) — similar to RioDB's pattern.
"""
import json
import subprocess