cockroachdb / cockroachdb/cockroach

storage: tune reserved space based on filesystem type

Aperta
#93,178 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub
A-storage C-enhancement T-storage
Lingua principale
Go
Stelle
32.5k
Fork
4.1k
Metriche di merge delle PR
Metriche PR in attesa

Descrizione

Different filesystems should have different reserved capacity. Modern versions of ext[2-4][1]reserve 5% of blocks as the high watermark for available disk space (see `-m`). ZFS should use ~82% (value from personal experience, mostly due to the correlation between zpool utilization, disk fragmentation, and work required to find a free block to perform a write).

> looking at a roachtest out-of-disk failure, we noticed that the node crashed with `ENOSPC` at 95%. This is because ext4 reserves 5% space for the root user by default. However, this interacts poorly with some of our heuristics that try to halt writes at 95% to prevent running out of disk (e.g. AddSSTable ingestion and rebalancing), because at 95% we're already out of disk. This reserved space also serves a similar purpose to our ballast files, in that the root user can reallocate it to CockroachDB in an emergency.

[1] [mkfs.ext4](https://linux.die.net/man/8/mkfs.ext4)

Jira issue: CRDB-22206

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.