{"id":27007287,"url":"https://github.com/johnramsden/zncache","last_synced_at":"2025-04-04T08:20:08.196Z","repository":{"id":272550524,"uuid":"916460696","full_name":"johnramsden/ZNCache","owner":"johnramsden","description":"ZNS drive workload testing","archived":false,"fork":false,"pushed_at":"2025-03-28T05:38:58.000Z","size":465,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-28T06:27:22.008Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/johnramsden.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2025-01-14T06:19:41.000Z","updated_at":"2025-03-28T05:39:01.000Z","dependencies_parsed_at":"2025-01-15T07:34:50.505Z","dependency_job_id":"a4a32121-1162-4451-a292-dd119a018ba5","html_url":"https://github.com/johnramsden/ZNCache","commit_stats":null,"previous_names":["johnramsden/znworkload","johnramsden/zncache"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnramsden%2FZNCache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnramsden%2FZNCache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnramsden%2FZNCache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnramsden%2FZNCache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johnramsden","download_url":"https://codeload.github.com/johnramsden/ZNCache/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247142263,"owners_count":20890685,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":"2025-04-04T08:20:07.593Z","updated_at":"2025-04-04T08:20:08.182Z","avatar_url":"https://github.com/johnramsden.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ZNWorkload\n\nTest workloads for ZNS\n\n## Setup\n\nClone repo:\n\n```shell\ngit clone https://github.com/johnramsden/ZNWorkload.git --recursive\n```\n\nCompile dependencies:\n\n```shell\n./build-deps.sh\n```\n\nCompile project:\n\n```shell\nmeson setup buildDir\nmeson compile -C buildDir\n```\n\nThere are various variables that can be set: (defaults in `meson_options.txt`)\n\n* `debugging`: Enables debug output (default true)\n* `debugsymbols`: Enables debug symbols\n* `verify`: Enables correctness verification (default true)\n* `BLOCK_ZONE_CAPACITY`: Sets SSD zone size (default 1077MiB 1129316352)\n* `READ_SLEEP_US`: Read delay to simulate remote data (default 40430us)\n* `PROFILING_INTERVAL_SEC`: Interval to print metrics on (averaged) (default 10)\n* `PROFILER_PRINT_EVERY`: Print metrics on every call, not just at interval (default true)\n* `EVICT_HIGH_THRESH_ZONES`: High water mark for zone eviction\n* `EVICT_LOW_THRESH_ZONES`: Low water mark for zone eviction\n* `EVICT_HIGH_THRESH_CHUNKS`: High water mark for chunk eviction\n* `EVICT_LOW_THRESH_CHUNKS`: Low water mark for chunk eviction\n* `EVICT_INTERVAL_US`: Sleep time between evictions (us) (default 100,000, or 0.1s)\n* `EVICTION_POLICY`: (`ZN_EVICT_PROMOTE_ZONE`, `ZN_EVICT_CHUNK`) Eviction policy, default `ZN_EVICT_PROMOTE_ZONE`\n* `MAX_ZONES_USED`: Set maximum zones to use (default 0 means all)\n\nTo modify these:\n\n```shell\nmeson setup --reconfigure buildDir -Dverify=true -Ddebugging=true -DBLOCK_ZONE_CAPACITY=1048576\nmeson compile -C buildDir\n```\n\n## Testing and Development\n\nCreate an emulated ZNS device via `scripts/nullblk-zones.sh` with:\n\n* sector size: 4096B\n* zone size: 32MiB\n* conventional zones (non seq writes): 0\n* sequential zones: 100\n\n```shell\n./scripts/nullblk.sh 4096 32 0 100 \"zns\" # or ssd\n```\n\n```\nCreated /dev/nullb0\n```\n\nTo destroy:\n\n```shell\n./scripts/nullblk-zoned-delete.sh 0 # Replace 0 with ID if different\n```\n\n# Workloads\n\nFor detailed experiment reproduction, see [WORKLOADS](docs/WORKLOADS.md)\n\n### Min-workload\n\nFor mini-test:\n\n* 14 zones\n* 8chunks per zone\n* `2*14=28 is capacity`\n* Start evict at 2 zones free: `24` entries\n* On evict, evict 4 zones: `20` entries remain\n\nZNS:\n\n```shell\n./scripts/nullblk.sh 4096 1 0 14 \"zns\"\n```\n\nOn SSD:\n\n```shell\n./scripts/nullblk.sh 4096 1 0 14 \"ssd\"\n```\n\n```shell\n./zncache /dev/nullb0 524288 2\n```\n\nThis means 2chunks to fill a zone: `1024*1024/2`\n\n### Documentation\n\nRun `doxygen`:\n\n```shell\ndoxygen Doxyfile\n```\n\nOpen `docs/html/index.html` in a browser.\n\n### Formatting\n\nRun `clang-format`:\n\n```shell\nclang-format -i src/ze_cache.c\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnramsden%2Fzncache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnramsden%2Fzncache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnramsden%2Fzncache/lists"}