View config
snapper.configs = let
extraConfig = ''
ALLOW_GROUPS="sudo wheel"
TIMELINE_CREATE="yes"
TIMELINE_CLEANUP="yes"
EMPTY_PRE_POST_CLEANUP="yes"
'';
in {
"home" = {
subvolume = "/home";
View main.c
#include <unistd.h>
int main() {
int a;
int *c = malloc(sizeof(int));
// 1. constraint: a[t - 3] = β, c = *μ
// 2. concrete: a[t - 3] = 0, c = 0x10, mem[0x10][t - 2] = 0;
read(fileno(stdin), &a, sizeof(a));
// 1. constraint: a[t - 2] = α where α > 10 && α <= 11
View gist:5a2f43b67d600c403688fd9315e834ef
Things done:
- splice read/splice write
- multi-threading
- optimized for cached read with a micro-benchmark:
-> splice read/splice write does not improve for neither read/write the performance (contradicting to the FAST paper)
- set FOPEN_KEEP_CACHE flag on opened files:
- operating system can use page cache (danger of double caching -> open files underlying with DIRECT_IO?)
- we must also ensure that our fuse is the only reader/writer to its underlying filesystem (similar to overlayfs)
- last night: enable write cache/async write
- increases async io, but might affect cache read
View top37
(pprof) top37
Total: 1690 samples
1673 99.0% 99.0% 1673 99.0% __splice_nocancel
9 0.5% 99.5% 10 0.6% __read_nocancel
2 0.1% 99.6% 2 0.1% __vmsplice_nocancel
2 0.1% 99.8% 2 0.1% sdallocx
1 0.1% 99.8% 728 43.1% ::splice
1 0.1% 99.9% 1 0.1% __libc_read
1 0.1% 99.9% 1 0.1% __pthread_enable_asynccancel
1 0.1% 100.0% 1 0.1% __writev_nocancel
View build.log
nix-shell -p rambox
these derivations will be built:
/nix/store/jvx63x9i6kkl4hpzx03zarzd7pg9wl86-SenchaCmd-6.5.2-linux-amd64.sh.zip.drv
/nix/store/k4yaq7vy39llk6r1y65jrdcc4v22lmbi-sencha-bare-6.5.2.drv
/nix/store/9w0b1b87biy7ma6c8r6r4blqzcpfnr08-sencha-6.5.2.drv
/nix/store/zpbqpib3sna5krwsngljwd5ibrbfsrp2-source.drv
/nix/store/fi5y70wmaar1f8zfmrlk8nrz4ss77z9a-node_modules.drv
/nix/store/7ngmcvgmfcn5h343h72bqak62h1kqhr8-rambox-bare-0.5.13.drv
/nix/store/8p3jb1bwgkp1il3wlvry6q0lva07q3dd-rambox-0.5.13.drv
these paths will be fetched (195.03 MiB download, 788.78 MiB unpacked):
View default.nix
with import <nixpkgs> {};
systemd.overrideDerivation (old: {
NIX_CFLAGS_COMPILE = "-fsanitize=address ${old . CFLAGS or ""}";
buildInputs = [
cryptsetup
] ++ old.buildInputs;
nativeBuildInputs = [
gcc7
meson
ninja
View 0_benchmark.md
$ gcc -o main main.c
$ ./main
splice with discard took about 0.12762 seconds
splice with full discard took about 0.15904 seconds
normal splice took about 0.02920 seconds
sendfile from memfd took about 0.15539 seconds
View default.nix
#with import <nixpkgs> {};
#stdenv.mkDerivation {
# name = "env";
# SHELL="${bashInteractive}/bin/bash";
# buildInputs = [
# ninja
# meson
# bashInteractive
# libtool
# automake
View cntr.nix
let
region = "us-east-1";
zone = "us-east-1a";
accessKeyId = "default";
in {
resources.ebsVolumes.cntr-disk = {
accessKeyId = accessKeyId;
tags.Name = "cntr-disk";
inherit region;
zone = zone;
View shell.nix
with import <nixpkgs> {};
stdenv.mkDerivation rec {
name = "env";
# Customizable development requirements
buildInputs = [
libxml2
notmuch
poppler_utils # for pdftohtml
python3
] ++ (with python3Packages; [