算法艺术创作
algorithmic-art
通过代码和可调参数创作生成艺术与交互式视觉效果。
storage-engines【设计与创意】Storage-engine and database-internals architecture: B-tree vs LSM-tree, write- ahead logging, buffer/page cache, MVCC and concurrency control, durability/fsync, and compaction. Architect-level engine selection and data-path design. USE WHEN: designing or choosing a storage engine, "B-tree vs LSM", "WAL", "buffer pool", "MVCC", "compaction", "write a…
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
name: storage-engines description: | Storage-engine and database-internals architecture: B-tree vs LSM-tree, write- ahead logging, buffer/page cache, MVCC and concurrency control, durability/fsync, and compaction. Architect-level engine selection and data-path design.
USE WHEN: designing or choosing a storage engine, "B-tree vs LSM", "WAL", "buffer pool", "MVCC", "compaction", "write amplification", "fsync/durability", embedded KV store, database internals, read/write-optimized store choice.
data-intensive); vector indexes (use vector-stores skills).
allowed-tools: Read, Grep, Glob| B-tree (InnoDB, Postgres) | LSM-tree (RocksDB, Cassandra) | |
|---|---|---|
| Writes | In-place; random I/O; write-amp from page writes | Sequential (memtable→SST); high throughput |
| Reads | 1 path, predictable | May touch many levels → read-amp (mitigate w/ bloom filters) |
| Space | Fragmentation | Space-amp until compaction |
| Best for | Read-heavy, range scans, point lookups | Write-heavy ingest, SSD-friendly |
The three amplifications (write / read / space) trade off against each other — state which one the workload can least afford.
fsync/fdatasync policy = the
durability ↔ throughput knob (group commit amortizes fsync). O_DIRECT vs
page cache; fsync correctness (don't trust it lying — the "fsync-gate").