Re: ZFS prefetch considered evil?

From: John R Pierce <pierce(at)hogranch(dot)com>
To: Alban Hertroys <dalroi(at)solfertje(dot)student(dot)utwente(dot)nl>, pgsql-general(at)postgresql(dot)org
Subject: Re: ZFS prefetch considered evil?
Date: 2009-07-09 18:40:37
Message-ID: 4A5639A5.6090401@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Alban Hertroys wrote:
> I don't know how you partitioned your zpools, but to me it seems like
> it'd be preferable to have the PostgreSQL tablespaces (and possibly
> other data that's likely to be accessed randomly) in a separate zpool
> from the rest of the system so you can restrict disabling prefetch to
> just that file-system. You probably already did that...
>
> It could be interesting to see how clustering the relevant tables
> would affect the prefetch performance, I'd expect disk access to be
> less random that way. It's probably still better to disable prefetch
> though.

in fact, somewhere in Sun.com land there's an app-note that suggests
creating TWO ZFS mount-points for Postgres, one for the $PGDATA
directory, which uses 128k blocks, and another for a tablespace that you
put all your regular databases in, this uses 8k blocks. the idea is,
the WAL logging is relatively sequential, and takes place in the 128k
block zfs, while the actual database table files are far more purely random.

These two ZFS can be made in the same zpool, the normal recommendation
is to have one large non-root zpool mirror for all your data (and
another smaller zpool mirror for your OS, at least assuming you have
more than two physical disk drives).

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Vick Khera 2009-07-09 18:45:29 Re: Asking for assistance in determining storage requirements
Previous Message Chris Spotts 2009-07-09 18:33:03 constraint checking on partitions