I have this 12 SATA disks zpool V28 (FreeBSD 9.0-release) (6 mirror vdevs, ashift=12) + 1 32 GB SSD as cache.
It performs excellent with blocksizes >= 128k (default zfs recordsize).
Eg.

Even worse, a
The zfs iostat is mostly silent on disks when executing the above commands, which means that ZFS is using it's in-memory cache to get the next-sector data, but even so performance drops hard.
When I try to copy the 160Gb_huge_file on the same filesystem using mc I get 60MB/s but with
I wish the applications could use the full speed of ZFS underneath.
Is there a sysctl which could help ZFS with this performance penalty?
Or is just badly written apps' fault (cat, mc, iscsi_tgt ...)?
It performs excellent with blocksizes >= 128k (default zfs recordsize).
Eg.
# dd if=160Gb_huge_file of=/dev/null ibs=128k obs=128k
gets me 1.6GB/s transfer rate but# dd if=160Gb_huge_file of=/dev/null ibs=4k obs=128k
gets me 10MB/s 
Even worse, a
# cat 160Gb_huge_file >>/dev/null
takes ages at 2MB/s.The zfs iostat is mostly silent on disks when executing the above commands, which means that ZFS is using it's in-memory cache to get the next-sector data, but even so performance drops hard.
When I try to copy the 160Gb_huge_file on the same filesystem using mc I get 60MB/s but with
# dd if=160Gb_huge_file of=copy_of_huge_file ibs=128k obs=128k
k it goes up to 300MB/s, same as regular cp.I wish the applications could use the full speed of ZFS underneath.
Is there a sysctl which could help ZFS with this performance penalty?
Or is just badly written apps' fault (cat, mc, iscsi_tgt ...)?