cockroachdb / cockroachdb/cockroach

storage: tune reserved space based on filesystem type

Abierto
#93,178 2 comentarios 0 reacciones 0 asignados Ver en GitHub
A-storage C-enhancement T-storage
Lenguaje dominante
Go
Estrellas
32.5k
Forks
4.1k
Métricas de merge de PR
Métricas de PR pendientes

Descripción

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

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.