I use 'fio' disk tools test speed. The disk is a intel ssd , trim and 4k alignment is enabled.
Hardware is Dell R610.
The disk controller is ahci and lsi 9211-8i, drive is p20, IT model, sysctl is default. Freebsd file system is ZFS or UFS, CentOS is XFS.
If install centos7 and use 'fio' test too, is no problem.
command is:
fio -filename=/mnt/test.fio_test_file -direct=1 iodepth 1 -thread -rw=randread(or randrw/randwrite) -ioengine=psync -bs=4k -size 1G -numjobs=1(or 64) -runtime=30 -group_reporting -name=pleasehelpme
freebsd speed is: [59172KB/0KB/0KB /s] [14.8K/0/0 iops]
centos7 speed is : [248.5MB/0KB/0KB /s] [63.5K/0/0 iops]
close to 5 times the speed!
And test randrw
randwrite
, the problem remains.
But no rand
, just read or write is very good, faster than centos..............
I have not tried other tools on freebsd11
, may be fio
problem? but i'm not sure...
So why ? and how to fix?
Retry at 2016-12-6
I read https://github.com/axboe/fio/ .
I think is fio problem, but test postgresql(two system the configure is same) tps is not good, two system tps very different.
Looks like freebsd really is not good performance, rather than fio problems.
May be configure problems? I do not know....
2017-01-08 I give up freebsd11, use centos7.
freebsd11 performance it should be great, But it is not , may be my configure is error, but i can not fix this disk iops problem. so ... Had to give up.
QAQ.....if you can fix this problem, please tell me. Thank you very much.
In some cases depending on the hardware FreeBSD maybe need some adjustments, some times could be an issue with the controller (DELL PERC) or in others cases a simple kernel flag could help.
From https://wiki.freebsd.org/BenchmarkAdvice
Parallel read/write tests
If you do a FS/disk I/O test where writes and reads are interleaved / in parallel, you need to be aware that FreeBSD prioritizes writes over reads.
Benchmarking ZFS
If you want to benchmark ZFS, be aware that it will only shine if you are willing to spend money. Using ZFS on a one or two disks will not give improved performance (compared to e.g. UFS), but it will give improved safety for your data (you know when your data is damaged by e.g. radiation or data-manipulating harddisk-errors). To make it shine you need to add at least a lot fo RAM, or one read-optimized SSD for L2ARC cache for read performance (the number of SSD's depends upon the size of the workingset) or two mirrored (for data safety in case one SSD gets damaged) write-optimized SSDs for the ZIL for synchronous (DBs/NFS/...) write performance.
Try to use diskinfo
The
-t
option triggers a simple and rather naive benchmark of the disks seek and transfer performance.For ZFS: https://wiki.freebsd.org/ZFSTuningGuide