Discussion:
[ADMIN] postgres block size alignment with filesystem block size
(too old to reply)
Mike Broers
2012-06-06 15:54:40 UTC
Permalink
Hello, I am setting up a new postgres production server in a managed
hosting environment. I dont have much insight into the underlying disk
architecture but the filesystem I have been presented with has a 4k block
size. Postgres defaults to 8k block size; would it be beneficial to repave
the filesystem at an 8k block size or problematic to leave it at 4k? I
have seen posts suggesting alignment of the postgres block size and the
file system block size and the raid block size, but wonder if a multiple is
sufficient or if it should match exactly.

Thank you
Mike
Tom Lane
2012-06-06 16:24:35 UTC
Permalink
Post by Mike Broers
Hello, I am setting up a new postgres production server in a managed
hosting environment. I dont have much insight into the underlying disk
architecture but the filesystem I have been presented with has a 4k block
size. Postgres defaults to 8k block size; would it be beneficial to repave
the filesystem at an 8k block size or problematic to leave it at 4k?
I doubt it's worth the trouble to change it. Most filesystems default
to 4k or smaller block sizes, so that's what PG is accustomed to run on.
I think it would only really be an issue if PG's block size weren't a
multiple of the filesystem block.

regards, tom lane
--
Sent via pgsql-admin mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Bruce Momjian
2012-06-13 17:52:14 UTC
Permalink
Post by Tom Lane
Post by Mike Broers
Hello, I am setting up a new postgres production server in a managed
hosting environment. I dont have much insight into the underlying disk
architecture but the filesystem I have been presented with has a 4k block
size. Postgres defaults to 8k block size; would it be beneficial to repave
the filesystem at an 8k block size or problematic to leave it at 4k?
I doubt it's worth the trouble to change it. Most filesystems default
to 4k or smaller block sizes, so that's what PG is accustomed to run on.
I think it would only really be an issue if PG's block size weren't a
multiple of the filesystem block.
I have heard about performance issues when the virtual machine block
size isn't aligned with the host OS block size.
--
Bruce Momjian <***@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +
--
Sent via pgsql-admin mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Loading...