Fecha: 2026-09-08 07:19-07:23
Host cliente: docker
Kernel: 6.12.48+deb13-amd64
192.168.1.250:/dades /mnt/nfsnas nfs4 rw,noatime,vers=4.2,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,nconnect=4,timeo=600,retrans=2,sec=sys,clientaddr=192.168.1.200,local_lock=none,addr=192.168.1.250,_netdev 0 0
Servidor: 192.168.1.250 (nas, 2 CPU Debian 13)
Cliente: 192.168.1.200
Enlace cliente: 1000 Mb/s full duplex (eno1)
Sistema de archivos servidor: ZFS (pool dades, RAIDZ1)
Discos del pool: 4x Seagate ST8000DM004 (7.3T, SMR)
sync a async (backup en /etc/exports.bak.YYYYMMDD)sync=disabled en datasets dades y dades/nasNOTA de hardware: modelo ST8000DM004 = serie BarraCuda SMR (grabación manufacturada). Las escrituras aleatorias en SMR sufren penalización extrema sin async; por eso se necesitaba esta optimización.
| Test | Medida | |
|---|---|---|
| dd escritura secuencial 512M | 28.3 MB/s | |
| dd escritura secuencial 512M (fdatasync) | 37.0 MB/s | |
| dd lectura secuencial 512M | 100 MB/s | |
| fio lectura secuencial 1M (direct=1) | 95.9 MB/s \ | 91 IOPS |
| fio escritura secuencial 1M (direct=1) | 97.4 MB/s \ | 92 IOPS |
| fio lectura aleatoria 4K (direct=1) | 10.1 MB/s \ | 2471 IOPS |
| fio escritura aleatoria 4K (direct=1) | 10.2 MB/s \ | 2492 IOPS |
| Test | Antes (sync) | Después (async) | Mejora |
|---|---|---|---|
| dd escritura sec. | 18.1 MB/s | 28.3 MB/s | x1.6 |
| fio esc. sec. 1M | 19.5 MB/s | 97.4 MB/s | x5.0 |
| fio esc. aleat. 4K | 0.155 MB/s (37 IOPS) | 10.2 MB/s (2492 IOPS) | x66 |
| fio lec. sec. 1M | 95.2 MB/s | 95.9 MB/s | - (igual, ya a tope) |
| fio lec. aleat. 4K | 9.2 MB/s | 10.1 MB/s | x1.1 |
Las escrituras ahora alcanzan ~tope de gigabit (igual que las lecturas). La escritura aleatoria 4K pasó de 37 → 2492 IOPS (x66) con async.
sync=disabled / export async: si el servidor pierde la alimentación (sin SPS/UPS) se pueden perder datos aún no escritos de la última parte de la operación. El usuario tiene previsto instalar un SPS/UPS, que lo mitigará.
| Test | Pi 3 (USB2+100Mbps) | ZFS sync | ZFS async |
|---|---|---|---|
| Escritura sec. dd | 10.8 MB/s | 18.1 | 28.3/37.0 |
| Escritura aleat. 4K | 0.945 (230) | 0.155 (37) | 10.2 (2492) |
| Lectura aleat. 4K | 0.955 (233) | 9.2 (2242) | 10.1 (2471) |