[mythtv-users] Poor performance with ZFS (ZFS on Linux)

Rajil Saraswat rajil.s at gmail.com
Sat Jun 2 00:27:51 UTC 2018


On 06/01/2018 12:25 AM, Mark Wedel wrote:
>
>  I don't think you ever included a zpool status of your system, but if
> you assign the entire disk for a zpool (instead of using partitions),
> ZFS will recognize that and try to be faster.  From my recollection,
> these were the 2 main things you get by doing that:
>
> 1) If ZFS is using the entire disk, it will enable write caching on
> the SSD, because it can then know the status of the cache, if it
> synchronizes the cache that data it expects is written out, etc.  If
> the disk is partitioned, ZFS can't be sure that something else isn't
> also accessing that disk and thus messing with those settings.
>
> 2) For SSD, ZFS will try to align its blocks with the memory cells of
> the drive.  Otherwise, especially if you have partitioned the disk,
> each time ZFS writes, it may end up accessing 2 memory cells,
> requiring 2-rewrites of those cells, etc.
>
>  Since it sounds like you are running a mirror, you could try removing
> one drive from the mirror, making a pool on that entire disk and
> putting your databased on that and see if it performs better (it may
> not - I don't know).
>
I have two pools, one for /boot and second for the rest of the system.
The /boot zpool has some feature flags disabled for backwards
compatibility with Grub. The second pool 'rpool' has all the feature
flags enabled.

I performed the test as you suggested. I created a pool 'dbpool' and
gave it a whole  HDD (WD Red 8TB). These are the results i get for
mythfilldatabase (time /usr/bin/mythfilldatabase  --file --sourceid 1
--xmlfile /tmp/guide/guide.xml)

Mirrored SSD:

real    4m46.065s
user    0m3.960s
sys     0m2.281s

single HDD:

real    3m35.423s
user    0m3.842s
sys     0m2.222s


The HDD is performing 25% better than the SSD. The HDD is 3% occupied
while the SSD is 60% occupied.



More information about the mythtv-users mailing list