{"id":51266043,"url":"https://github.com/bernoussama/vibedbfs","last_synced_at":"2026-06-29T15:02:16.639Z","repository":{"id":355330662,"uuid":"1227682200","full_name":"bernoussama/vibedbfs","owner":"bernoussama","description":null,"archived":false,"fork":false,"pushed_at":"2026-05-03T02:44:35.000Z","size":89,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"test/libfuse-test","last_synced_at":"2026-05-03T04:26:52.672Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bernoussama.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-03T02:42:24.000Z","updated_at":"2026-05-03T02:44:35.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/bernoussama/vibedbfs","commit_stats":null,"previous_names":["bernoussama/vibedbfs"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/bernoussama/vibedbfs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bernoussama%2Fvibedbfs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bernoussama%2Fvibedbfs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bernoussama%2Fvibedbfs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bernoussama%2Fvibedbfs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bernoussama","download_url":"https://codeload.github.com/bernoussama/vibedbfs/tar.gz/refs/heads/test/libfuse-test","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bernoussama%2Fvibedbfs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34931592,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-29T02:00:05.398Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-29T15:02:15.687Z","updated_at":"2026-06-29T15:02:16.626Z","avatar_url":"https://github.com/bernoussama.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dbfs\n\ndbfs is a FUSE filesystem backed by SQLite.\n\nIt stores filesystem metadata and file contents in a SQLite database, exposes them through FUSE, and currently supports basic file, directory, symlink, hardlink, rename, truncate, read, and write operations.\n\nSee [Architecture](docs/architecture.md) for ASCII diagrams of the system structure and data flows.\n\n## Build\n\n```bash\ncargo build\ncargo build --release\n```\n\n## Run\n\nCreate a mountpoint and mount a database-backed filesystem:\n\n```bash\nmkdir -p /tmp/dbfs-mnt\ncargo run -- mount /tmp/dbfs.sqlite /tmp/dbfs-mnt\n```\n\nIn another shell:\n\n```bash\necho hello \u003e /tmp/dbfs-mnt/hello.txt\ncat /tmp/dbfs-mnt/hello.txt\n```\n\nUnmount when finished:\n\n```bash\nfusermount3 -u /tmp/dbfs-mnt\n```\n\n## Storage\n\nThe file-backed database is opened with:\n\n```sql\nPRAGMA foreign_keys = ON;\nPRAGMA journal_mode = WAL;\nPRAGMA synchronous = NORMAL;\nPRAGMA busy_timeout = 5000;\nPRAGMA wal_autocheckpoint = 10000;\n```\n\nFile data is stored in 64 KiB chunk rows in SQLite. FUSE writes are buffered in memory and flushed to SQLite on `flush`, `fsync`, or `release`, which lets buffered write workloads avoid one SQLite transaction per small write. Overlapping dirty writes are coalesced before flush, and full-chunk writes skip the read-modify-write cycle. All SQL queries use prepared statement caching to avoid re-parsing.\n\nImportant caveat: `fsync` currently flushes dbfs dirty writes into SQLite, but SQLite still runs with `synchronous = NORMAL`. This is not the strongest crash-durability mode.\n\n## Test\n\nRun the Rust tests:\n\n```bash\ncargo test\n```\n\nThe mount integration test is skipped unless FUSE tests are explicitly enabled and `fusermount3` is available:\n\n```bash\nDBFS_RUN_FUSE_TESTS=1 cargo test --test mount_integration\n```\n\nThere is also a libfuse-oriented pytest test harness:\n\n```bash\npytest tests/test_with_libfuse.py -v\n```\n\n## Benchmark\n\nUse the fio helper script:\n\n```bash\nscripts/bench-fio.sh\n```\n\nDefault workload:\n\n```text\n512M, 4k, randwrite, fsync=1\n```\n\nNo-fsync random-write benchmark:\n\n```bash\nscripts/bench-fio.sh --job randwrite --size 512M --bs 4k --fsync 0\n```\n\nRun a small suite:\n\n```bash\nscripts/bench-fio.sh --job suite --size 512M --bs 4k --fsync 0\n```\n\nPass extra fio arguments after `--`:\n\n```bash\nscripts/bench-fio.sh --job randwrite --fsync 0 -- --group_reporting --output-format=json\n```\n\n## Current fio Results\n\n### dbfs vs Native vs FUSE Passthrough\n\nThree-way comparison on overlay/ext4, interleaved runs, `fio` with `ioengine=sync`, `numjobs=1`:\n\n| Workload | Native | FUSE Passthrough | dbfs | dbfs vs Passthrough |\n| --- | ---: | ---: | ---: | ---: |\n| `randwrite`, `4k`, `fsync=0` | 1455 MiB/s | 152 MiB/s | 217 MiB/s | **1.43x** |\n| `randwrite`, `4k`, `fsync=1` | 3.8 MiB/s | 2.1 MiB/s | 29.7 MiB/s | **14.2x** |\n| `randread`, `4k` | 100 MiB/s | 120 MiB/s | 137 MiB/s | **1.14x** |\n| `seqwrite`, `128k`, `fsync=0` | 2535 MiB/s | 535 MiB/s | 1056 MiB/s | **1.97x** |\n| create 5000 files | 0.219s | 0.837s | 0.769s | **1.09x** |\n| delete 5000 files | 4.256s | 5.003s | 5.852s | 0.85x |\n\ndbfs beats FUSE passthrough in 5 of 6 workloads. On fsync-heavy writes, dbfs is 14.2x faster than passthrough and 7.8x faster than native ext4 because SQLite WAL batches per-write fsyncs into efficient journal commits.\n\nFull benchmark notes:\n\n- [Disk-backed dbfs vs FUSE passthrough benchmark](docs/2026-05-03-disk-backed-fuse-passthrough-benchmark.md)\n- [Optimization results and methodology](docs/2026-05-03-optimization-results.md)\n- [Buffered-write fio results](docs/2026-05-03-fio-buffered-write-results.md)\n- [FUSE passthrough comparison (pre-optimization)](docs/2026-05-03-fio-fuse-passthrough-comparison.md)\n\n## Requirements\n\n- Rust toolchain\n- Linux with FUSE support\n- `fusermount3`\n- `fio` for benchmarks\n- `pytest` for the Python/libfuse test harness\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbernoussama%2Fvibedbfs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbernoussama%2Fvibedbfs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbernoussama%2Fvibedbfs/lists"}