Hi, I recently started running FreeBSD 14 as a guest on Proxmox 8.4, and I've been surprised by the low I/O performance, I'm not sure what's going on. Here's some of the statistics, of the FreeBSD VM and also a Debian 12 VM on the same hypervisor. I tried the "kern.timecounter.hardware=TSC-low" workaround, which didn't appear to help. FreeBSD runs fine on another system running Hyper-V, so I think it's an issue with KVM/Proxmox. I used to do custom kernel builds of FreeBSD, so I might look into if there's a kernel tweak (or dtrace) to test with.
Code:
ryan@bsd ~ $% fio --randrepeat=1 --direct=1 --gtod_reduce=1 --name=test --bs=4k --iodepth=64 --readwrite=randrw --rwmixread=75 --size=3G --filename=test
test: (g=0): rw=randrw, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=psync, iodepth=64
fio-3.38
Starting 1 process
test: Laying out IO file (1 file / 3072MiB)
note: both iodepth >= 1 and synchronous I/O engine are selected, queue depth will be capped at 1
Jobs: 1 (f=1): [m(1)][94.1%][eta 00m:44s]
test: (groupid=0, jobs=1): err= 0: pid=1131: Thu Apr 24 04:34:07 2025
read: IOPS=832, BW=3330KiB/s (3410kB/s)(2301MiB/707658msec)
bw ( KiB/s): min= 593, max=253936, per=100.00%, avg=52986.39, stdev=35179.06, samples=89
iops : min= 148, max=63484, avg=13246.49, stdev=8794.78, samples=89
write: IOPS=278, BW=1115KiB/s (1142kB/s)(771MiB/707658msec); 0 zone resets
bw ( KiB/s): min= 280, max=85640, per=100.00%, avg=17745.73, stdev=11815.42, samples=89
iops : min= 70, max=21410, avg=4436.31, stdev=2953.86, samples=89
cpu : usr=0.08%, sys=4.40%, ctx=550, majf=0, minf=0
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=589126,197306,0,0 short=0,0,0,0 dropped=0,0,0,0
latency : target=0, window=0, percentile=100.00%, depth=64
Run status group 0 (all jobs):
READ: bw=3330KiB/s (3410kB/s), 3330KiB/s-3330KiB/s (3410kB/s-3410kB/s), io=2301MiB (2413MB), run=707658-707658msec
WRITE: bw=1115KiB/s (1142kB/s), 1115KiB/s-1115KiB/s (1142kB/s-1142kB/s), io=771MiB (808MB), run=707658-707658msec
Code:
ryan@debian ~ $% fio --randrepeat=1 --direct=1 --gtod_reduce=1 --name=test --bs=4k --iodepth=64 --readwrite=randrw --rwmixread=75 --size=3G --filename=test
test: (g=0): rw=randrw, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=psync, iodepth=64
fio-3.33
Starting 1 process
test: Laying out IO file (1 file / 3072MiB)
note: both iodepth >= 1 and synchronous I/O engine are selected, queue depth will be capped at 1
Jobs: 1 (f=1): [m(1)][100.0%][r=30.0MiB/s,w=10.6MiB/s][r=7683,w=2714 IOPS][eta 00m:00s]
test: (groupid=0, jobs=1): err= 0: pid=8199: Thu Apr 24 05:25:51 2025
read: IOPS=5907, BW=23.1MiB/s (24.2MB/s)(2301MiB/99727msec)
bw ( KiB/s): min=14464, max=37376, per=100.00%, avg=23653.38, stdev=5527.81, samples=199
iops : min= 3616, max= 9344, avg=5913.34, stdev=1381.95, samples=199
write: IOPS=1978, BW=7914KiB/s (8104kB/s)(771MiB/99727msec); 0 zone resets
bw ( KiB/s): min= 4888, max=12920, per=100.00%, avg=7923.30, stdev=1861.57, samples=199
iops : min= 1222, max= 3230, avg=1980.82, stdev=465.39, samples=199
cpu : usr=3.31%, sys=15.13%, ctx=786454, majf=0, minf=7
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=589126,197306,0,0 short=0,0,0,0 dropped=0,0,0,0
latency : target=0, window=0, percentile=100.00%, depth=64
Run status group 0 (all jobs):
READ: bw=23.1MiB/s (24.2MB/s), 23.1MiB/s-23.1MiB/s (24.2MB/s-24.2MB/s), io=2301MiB (2413MB), run=99727-99727msec
WRITE: bw=7914KiB/s (8104kB/s), 7914KiB/s-7914KiB/s (8104kB/s-8104kB/s), io=771MiB (808MB), run=99727-99727msec
Disk stats (read/write):
sda: ios=588970/197376, merge=0/61, ticks=63484/58123, in_queue=155130, util=83.80%