Andrew Hammond <[EMAIL PROTECTED]> writes:
> My goal is to tune the disk / filesystem on our prototype system. It's
> an EMC disk array, so sectors on disk are 512 bytes of usable space.
> We've decided to go with RAID 10 since the goal is to maximize
> performance. Currently the raid element size is set at 16 sectors which
> is 8192 bytes of payload.
Do people find it works well to have a stripe size that small? It seems like
it would be better to have it be at least a few filesystem/postgres blocks so
that subsequent reads stand a chance of being sequential and not causing
another spindle to have to seek. Does this depend on whether it's an DSS load
vs an OLTP load? If it's a single query at a time DSS system perhaps small
blocksizes work best to get maximum throughput?
> I've got a sysadmin working on getting XFS going with 8192 byte blocks.
Having your filesystem block size match postgres's block size is probably a
good idea. So 8k blocks is good.
> My next task will be to calculate the amount of space used by XFS for
> headers etc. to find out how much of those 8192 bytes can be used for the
> postgres payload.
No filesystem that I know of uses up space in every block. The overhead is all
stored elsewhere in blocks exclusively contain such overhead data. So just
setting postgres to 8k which the default would work well.
> Then configure postgres to use datablocks that size. So I'm looking for
> details on how to manipulate the size of the datablock.
Look in pg_config_manual.h in src/include. Postgres has to be recompiled to
change it and the database has to be reinitialized. But it could be set to 16k
or 32k. In which case you would probably want to adjust your filesystem to
match. But unless you do experiments you won't know if it would be of any
benefit to change.
> I'm also not entirely sure how to make the datablocks line up with the
> filesystem blocks. Any suggestions on this would be greatly appreciated.
They just will. The files start on a block boundary, so every 8k is a new
block. Postgres stores 8k at a time always.
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?