pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
postgres block size alignment with filesystem block size
3+ messages / 3 participants
[nested] [flat]

* postgres block size alignment with filesystem block size
@ 2012-06-06 15:54 Mike Broers <mbroers@gmail.com>
  2012-06-06 16:24 ` Re: postgres block size alignment with filesystem block size Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 3+ messages in thread

From: Mike Broers @ 2012-06-06 15:54 UTC (permalink / raw)
  To: pgsql-admin

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

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: postgres block size alignment with filesystem block size
  2012-06-06 15:54 postgres block size alignment with filesystem block size Mike Broers <mbroers@gmail.com>
@ 2012-06-06 16:24 ` Tom Lane <tgl@sss.pgh.pa.us>
  2012-06-13 17:52   ` Re: postgres block size alignment with filesystem block size Bruce Momjian <bruce@momjian.us>
  0 siblings, 1 reply; 3+ messages in thread

From: Tom Lane @ 2012-06-06 16:24 UTC (permalink / raw)
  To: Mike Broers <mbroers@gmail.com>; +Cc: pgsql-admin

Mike Broers <mbroers@gmail.com> writes:
> 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



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: postgres block size alignment with filesystem block size
  2012-06-06 15:54 postgres block size alignment with filesystem block size Mike Broers <mbroers@gmail.com>
  2012-06-06 16:24 ` Re: postgres block size alignment with filesystem block size Tom Lane <tgl@sss.pgh.pa.us>
@ 2012-06-13 17:52   ` Bruce Momjian <bruce@momjian.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Bruce Momjian @ 2012-06-13 17:52 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Mike Broers <mbroers@gmail.com>; pgsql-admin

On Wed, Jun 06, 2012 at 12:24:35PM -0400, Tom Lane wrote:
> Mike Broers <mbroers@gmail.com> writes:
> > 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  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2012-06-13 17:52 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2012-06-06 15:54 postgres block size alignment with filesystem block size Mike Broers <mbroers@gmail.com>
2012-06-06 16:24 ` Tom Lane <tgl@sss.pgh.pa.us>
2012-06-13 17:52   ` Bruce Momjian <bruce@momjian.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox