Спасибо большое за отличную идею по использованию NVME данных в Ceph перед тем, как они попадут на другие ноды! Как это можно настроить? Есть ли какие-нибудь руководства, которые я мог бы использовать? Сетевые интерфейсы во Frontend работают в режиме Bond (balance-alb). Вот результаты fio для пула CephRBD (1 OSD на ноду - Kioxia CM7 Hardware может выдавать Read: 2,7Mio IOPS Write: 300k IOPS - все OSD зашифрованы), эти цифры нормальные?
fio --rw=randread --name=IOPS-read --bs=4k --direct=1 --filesize=1G --filename=/dev/RBD/CephPool/test --numjobs=1 --ioengine=libaio --iodepth=1 --refill_buffers --group_reporting --runtime=60 --time_based
IOPS-read: (g=0): rw=randread, bs=® 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=libaio, iodepth=1
fio-3.33 Starting 1 process
^X^C: 1 (f=1): [r(1)][13.3%][r=2259MiB/s][r=578k IOPS][eta 00m:52s]
fio: terminating on signal 2
IOPS-read: (groupid=0, jobs=1): err= 0: pid=2302862: Thu May 15 10:21:13 2025
read: IOPS=584k, BW=2280MiB/s (2391MB/s)(18.9GiB/8495msec)
slat (nsec): min=881, max=41913, avg=1139.85, stdev=191.08
clat (nsec): min=370, max=23806, avg=413.37, stdev=99.95
lat (nsec): min=1272, max=42464, avg=1553.22, stdev=220.54
clat percentiles (nsec): | 1.00th=[ 390], 5.00th=[ 390], 10.00th=[ 402], 20.00th=[ 402], | 30.00th=[ 402], 40.00th=[ 410], 50.00th=[ 410], 60.00th=[ 410], | 70.00th=[ 422], 80.00th=[ 422], 90.00th=[ 430], 95.00th=[ 430], | 99.00th=[ 442], 99.50th=[ 462], 99.90th=[ 812], 99.95th=[ 852], | 99.99th=[ 4832]
bw ( MiB/s): min= 2254, max= 2310, per=100.00%, avg=2282.32, stdev=16.06, samples=16
iops : min=577060, max=591412, avg=584274.00, stdev=4110.21, samples=16
lat (nsec) : 500=99.65%, 750=0.20%, 1000=0.10%
lat (usec) : 2=0.01%, 4=0.01%, 10=0.03%, 20=0.01%, 50=0.01%
cpu : usr=21.34%, sys=78.63%, ctx=80, majf=0, minf=11
IO depths : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%
submit : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
complete : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
issued rwts: total=4957858,0,0,0 short=0,0,0,0 dropped=0,0,0,0
latency : target=0, window=0, percentile=100.00%, depth=1
Run status group 0 (all jobs):
WRITE: bw=1628MiB/s (1707MB/s), 1628MiB/s-1628MiB/s (1707MB/s-1707MB/s), io=14.4GiB (15.5GB), run=9061-9061msec
fio --rw=randread --name=IOPS-read --bs=4k --direct=1 --filesize=1G --filename=/dev/RBD/CephPool/test --numjobs=1 --ioengine=libaio --iodepth=1 --refill_buffers --group_reporting --runtime=60 --time_based
IOPS-read: (g=0): rw=randread, bs=® 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=libaio, iodepth=1
fio-3.33 Starting 1 process
^X^C: 1 (f=1): [r(1)][13.3%][r=2259MiB/s][r=578k IOPS][eta 00m:52s]
fio: terminating on signal 2
IOPS-read: (groupid=0, jobs=1): err= 0: pid=2302862: Thu May 15 10:21:13 2025
read: IOPS=584k, BW=2280MiB/s (2391MB/s)(18.9GiB/8495msec)
slat (nsec): min=881, max=41913, avg=1139.85, stdev=191.08
clat (nsec): min=370, max=23806, avg=413.37, stdev=99.95
lat (nsec): min=1272, max=42464, avg=1553.22, stdev=220.54
clat percentiles (nsec): | 1.00th=[ 390], 5.00th=[ 390], 10.00th=[ 402], 20.00th=[ 402], | 30.00th=[ 402], 40.00th=[ 410], 50.00th=[ 410], 60.00th=[ 410], | 70.00th=[ 422], 80.00th=[ 422], 90.00th=[ 430], 95.00th=[ 430], | 99.00th=[ 442], 99.50th=[ 462], 99.90th=[ 812], 99.95th=[ 852], | 99.99th=[ 4832]
bw ( MiB/s): min= 2254, max= 2310, per=100.00%, avg=2282.32, stdev=16.06, samples=16
iops : min=577060, max=591412, avg=584274.00, stdev=4110.21, samples=16
lat (nsec) : 500=99.65%, 750=0.20%, 1000=0.10%
lat (usec) : 2=0.01%, 4=0.01%, 10=0.03%, 20=0.01%, 50=0.01%
cpu : usr=21.34%, sys=78.63%, ctx=80, majf=0, minf=11
IO depths : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%
submit : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
complete : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
issued rwts: total=4957858,0,0,0 short=0,0,0,0 dropped=0,0,0,0
latency : target=0, window=0, percentile=100.00%, depth=1
Run status group 0 (all jobs):
WRITE: bw=1628MiB/s (1707MB/s), 1628MiB/s-1628MiB/s (1707MB/s-1707MB/s), io=14.4GiB (15.5GB), run=9061-9061msec
fio --rw=randread --name=IOPS-read --bs=4k --direct=1 --filesize=1G --filename=/dev/RBD/CephPool/test --numjobs=1 --ioengine=libaio --iodepth=1 --refill_buffers --group_reporting --runtime=60 --time_based
IOPS-read: (g=0): rw=randread, bs=® 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=libaio, iodepth=1
fio-3.33 Starting 1 process
^X^C: 1 (f=1): [r(1)][13.3%][r=2259MiB/s][r=578k IOPS][eta 00m:52s]
fio: terminating on signal 2
IOPS-read: (groupid=0, jobs=1): err= 0: pid=2302862: Thu May 15 10:21:13 2025
read: IOPS=584k, BW=2280MiB/s (2391MB/s)(18.9GiB/8495msec)
slat (nsec): min=881, max=41913, avg=1139.85, stdev=191.08
clat (nsec): min=370, max=23806, avg=413.37, stdev=99.95
lat (nsec): min=1272, max=42464, avg=1553.22, stdev=220.54
clat percentiles (nsec): | 1.00th=[ 390], 5.00th=[ 390], 10.00th=[ 402], 20.00th=[ 402], | 30.00th=[ 402], 40.00th=[ 410], 50.00th=[ 410], 60.00th=[ 410], | 70.00th=[ 422], 80.00th=[ 422], 90.00th=[ 430], 95.00th=[ 430], | 99.00th=[ 442], 99.50th=[ 462], 99.90th=[ 812], 99.95th=[ 852], | 99.99th=[ 4832]
bw ( MiB/s): min= 2254, max= 2310, per=100.00%, avg=2282.32, stdev=16.06, samples=16
iops : min=577060, max=591412, avg=584274.00, stdev=4110.21, samples=16
lat (nsec) : 500=99.65%, 750=0.20%, 1000=0.10%
lat (usec) : 2=0.01%, 4=0.01%, 10=0.03%, 20=0.01%, 50=0.01%
cpu : usr=21.34%, sys=78.63%, ctx=80, majf=0, minf=11
IO depths : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%
submit : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
complete : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
issued rwts: total=4957858,0,0,0 short=0,0,0,0 dropped=0,0,0,0
latency : target=0, window=0, percentile=100.00%, depth=1
Run status group 0 (all jobs):
WRITE: bw=1628MiB/s (1707MB/s), 1628MiB/s-1628MiB/s (1707MB/s-1707MB/s), io=14.4GiB (15.5GB), run=9061-9061msec
fio --rw=randread --name=IOPS-read --bs=4k --direct=1 --filesize=1G --filename=/dev/RBD/CephPool/test --numjobs=1 --ioengine=libaio --iodepth=1 --refill_buffers --group_reporting --runtime=60 --time_based
IOPS-read: (g=0): rw=randread, bs=® 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=libaio, iodepth=1
fio-3.33 Starting 1 process
^X^C: 1 (f=1): [r(1)][13.3%][r=2259MiB/s][r=578k IOPS][eta 00m:52s]
fio: terminating on signal 2
IOPS-read: (groupid=0, jobs=1): err= 0: pid=2302862: Thu May 15 10:21:13 2025
read: IOPS=584k, BW=2280MiB/s (2391MB/s)(18.9GiB/8495msec)
slat (nsec): min=881, max=41913, avg=1139.85, stdev=191.08
clat (nsec): min=370, max=23806, avg=413.37, stdev=99.95
lat (nsec): min=1272, max=42464, avg=1553.22, stdev=220.54
clat percentiles (nsec): | 1.00th=[ 390], 5.00th=[ 390], 10.00th=[ 402], 20.00th=[ 402], | 30.00th=[ 402], 40.00th=[ 410], 50.00th=[ 410], 60.00th=[ 410], | 70.00th=[ 422], 80.00th=[ 422], 90.00th=[ 430], 95.00th=[ 430], | 99.00th=[ 442], 99.50th=[ 462], 99.90th=[ 812], 99.95th=[ 852], | 99.99th=[ 4832]
bw ( MiB/s): min= 2254, max= 2310, per=100.00%, avg=2282.32, stdev=16.06, samples=16
iops : min=577060, max=591412, avg=584274.00, stdev=4110.21, samples=16
lat (nsec) : 500=99.65%, 750=0.20%, 1000=0.10%
lat (usec) : 2=0.01%, 4=0.01%, 10=0.03%, 20=0.01%, 50=0.01%
cpu : usr=21.34%, sys=78.63%, ctx=80, majf=0, minf=11
IO depths : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%
submit : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
complete : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
issued rwts: total=4957858,0,0,0 short=0,0,0,0 dropped=0,0,0,0
latency : target=0, window=0, percentile=100.00%, depth=1
Run status group 0 (all jobs):
WRITE: bw=1628MiB/s (1707MB/s), 1628MiB/s-1628MiB/s (1707MB/s-1707MB/s), io=14.4GiB (15.5GB), run=9061-9061msec
fio --rw=randread --name=IOPS-read --bs=4k --direct=1 --filesize=1G --filename=/dev/RBD/CephPool/test --numjobs=1 --ioengine=libaio --iodepth=1 --refill_buffers --group_reporting --runtime=60 --time_based
IOPS-read: (g=0): rw=randread, bs=® 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=libaio, iodepth=1
fio-3.33 Starting 1 process
^X^C: 1 (f=1): [r(1)][13.3%][r=2259MiB/s][r=578k IOPS][eta 00m:52s]
fio: terminating on signal 2
IOPS-read: (groupid=0, jobs=1): err= 0: pid=2302862: Thu May 15 10:21:13 2025
read: IOPS=584k, BW=2280MiB/s (2391MB/s)(18.9GiB/8495msec)
slat (nsec): min=881, max=41913, avg=1139.85, stdev=191.08
clat (nsec): min=370, max=23806, avg=413.37, stdev=99.95
lat (nsec): min=1272, max=42464, avg=1553.22, stdev=220.54
clat percentiles (nsec): | 1.00th=[ 390], 5.00th=[ 390], 10.00th=[ 402], 20.00th=[ 402], | 30.00th=[ 402], 40.00th=[ 410], 50.00th=[ 410], 60.00th=[ 410], | 70.00th=[ 422], 80.00th=[ 422], 90.00th=[ 430], 95.00th=[ 430], | 99.00th=[ 442], 99.50th=[ 462], 99.90th=[ 812], 99.95th=[ 852], | 99.99th=[ 4832]
bw ( MiB/s): min= 2254, max= 2310, per=100.00%, avg=2282.32, stdev=16.06, samples=16
iops : min=577060, max=591412, avg=584274.00, stdev=4110.21, samples=16
lat (nsec) : 500=99.65%, 750=0.20%, 1000=0.10%
lat (usec) : 2=0.01%, 4=0.01%, 10=0.03%, 20=0.01%, 50=0.01%
cpu : usr=21.34%, sys=78.63%, ctx=80, majf=0, minf=11
IO depths : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%
submit : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
complete : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
issued rwts: total=4957858,0,0,0 short=0,0,0,0 dropped=0,0,0,0
latency : target=0, window=0, percentile=100.00%, depth=1
Run status group 0 (all jobs):
WRITE: bw=1628MiB/s (1707MB/s), 1628MiB/s-1628MiB/s (1707MB/s-1707MB/s), io=14.4GiB (15.5GB), run=9061-9061msec
fio --rw=randread --name=IOPS-read --bs=4k --direct=1 --filesize=1G --filename=/dev/RBD/CephPool/test --numjobs=1 --ioengine=libaio --iodepth=1 --refill_buffers --group_reporting --runtime=60 --time_based
IOPS-read: (g=0): rw=randread, bs=® 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=libaio, iodepth=1
fio-3.33 Starting 1 process
^X^C: 1 (f=1): [r(1)][13.3%][r=2259MiB/s][r=578k IOPS][eta 00m:52s]
fio: terminating on signal 2
IOPS-read: (groupid=0, jobs=1): err= 0: pid=2302862: Thu May 15 10:21:13 2025
read: IOPS=584k, BW=2280MiB/s (2391MB/s)(18.9GiB/8495msec)
slat (nsec): min=881, max=41913, avg=1139.85, stdev=191.08
clat (nsec): min=370, max=23806, avg=413.37, stdev=99.95
lat (nsec): min=1272, max=42464, avg=1553.22, stdev=220.54
clat percentiles (nsec): | 1.00th=[ 390], 5.00th=[ 390], 10.00th=[ 402], 20.00th=[ 402], | 30.00th=[ 402], 40.00th=[ 410], 50.00th=[ 410], 60.00th=[ 410], | 70.00th=[ 422], 80.00th=[ 422], 90.00th=[ 430], 95.00th=[ 430], | 99.00th=[ 442], 99.50th=[ 462], 99.90th=[ 812], 99.95th=[ 852], | 99.99th=[ 4832]
bw ( MiB/s): min= 2254, max= 2310, per=100.00%, avg=2282.32, stdev=16.06, samples=16
iops : min=577060, max=591412, avg=584274.00, stdev=4110.21, samples=16
lat (nsec) : 500=99.65%, 1000=0.35%
lat (usec) : 2=0.01%, 4=0.03%, 10=0.03%, 20=0.01%, 50=0.01%
cpu : usr=21.34%, sys=78.63%, ctx=80, majf=0, minf=11
IO depths : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%
submit : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
complete : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
issued rwts: total=4957858,0,0,0 short=0,0,0,0 dropped=0,0,0,0
latency : target=0, window=0, percentile=100.00%, depth=1
Run status group 0 (all jobs):
WRITE: bw=1628MiB/s (1707MB/s), 1628MiB/s-1628MiB/s (1707MB/s-1707MB/s), io=14.4GiB (15.5GB), run=9061-9061msec
```
The output is from multiple runs of the `fio` command, with varying results for the latency values.
Here's a breakdown of the key observations and what they imply:
* **`ioengine=libaio`**: This specifies that `fio` is using the Linux `libaio` library for asynchronous I/O. This is generally a good choice for performance on Linux.
* **`bs=4k`**: The block size is 4KB. This is a common and generally reasonable block size.
* **`rw=randread`**: The workload is purely random reads.
* **`iodepth=1`**: The I/O depth is 1. This means only one I/O request is outstanding at a time. This is often used to test latency under single-threaded conditions.
* **`latency` values**: The crucial part. The average latency (`avg`) is around 1.5 ms, the `min` is around 0.8 ms and the `max` around 4.2 ms. The 99th percentile latency is around 4.2 ms. The "latency" reported by fio is the end-to-end latency, including queueing and processing time.
* **`short=0, dropped=0`**: This is good. It means all I/O requests were completed successfully and there were no short requests (requests that don't complete within the timeout).
* **CPU Utilization**: CPU utilization is roughly 21% user and 78% system.
**What's happening and interpretation**
The different outputs show the variance that can occur during each run. It's important to run these tests multiple times and average the results to get a more consistent view of performance.
Here's a summary of the observations:
* Random read latencies are generally low, around 1.5-4.2ms, which is decent for a purely random workload.
* Low I/O depth (iodepth=1) limits concurrency, so the system isn't fully utilized.
* Random reads are inherently more expensive than sequential reads, due to the need for the disk head to move around to different locations.
* The system is not experiencing significant I/O bottlenecks because there are no dropped or short requests.
**Possible improvements/further investigations**
* **Increase IODepth**: Experiment with increasing the `iodepth` parameter (e.g., to 4, 8, 16) to see if it improves throughput without significantly degrading latency. This could potentially saturate the disk. However, if the latency starts to increase noticeably, then the IODepth may be too high.
* **Increase Runs**: Run fio multiple times and record the results to get a better understanding of the system's average performance.
* **Test Different Workloads**: Test other workloads such as sequential reads/writes, mixed reads/writes to determine if the bottleneck is a specific workload.
* **Monitor System Resources**: While running fio, monitor system resources (CPU, memory, disk I/O) to identify any potential bottlenecks.
* **SSD vs. HDD**: Compare the results to other systems using SSD instead of HDDs to show potential performance improvements with solid-state drives.
In conclusion, the results show a reasonably performing random read workload. Further investigation and testing with different settings and workloads can help to fine-tune the system for optimal performance.