pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
data=writeback
7+ messages / 4 participants
[nested] [flat]

* data=writeback
@ 2004-04-08 07:59 Priem, Alexander <ap@cict.nl>
  2004-04-08 09:01 ` Re: data=writeback Chris <list@1006.org>
  0 siblings, 1 reply; 7+ messages in thread

From: Priem, Alexander @ 2004-04-08 07:59 UTC (permalink / raw)
  To: pgsql-performance

Hi everyone,

I have done some reading on filesystems and I thought to optimize the
settings for my PostgreSQL system. I use the ext3 filesystem and have the
PostgreSQL data and WAL on different physical drives. I made some
adjustments to my /etc/fstabd file, so it looks like this :


LABEL=/                 /                     ext3
noatime,data=ordered    1 1
LABEL=/boot             /boot                 ext3
noatime,data=ordered    1 2
none                    /dev/pts              devpts       gid=5,mode=620
0 0
none                    /proc                 proc         defaults
0 0
none                    /dev/shm              tmpfs        defaults
0 0
LABEL=/usr/local/pgsql  /usr/local/pgsql      ext3
noatime,data=writeback  1 2
LABEL=/usr/local/pgsql  /usr/local/pgsql/wal  ext3
noatime,data=ordered    1 2
/dev/sda5               swap                  swap         defaults
0 0
/dev/cdrom              /mnt/cdrom            udf,iso9660
noauto,owner,kudzu,ro   0 0
/dev/fd0                /mnt/floppy           auto
noauto,owner,kudzu      0 0


Does this look OK? My knowledge of filesystems and their (journalling)
options is not very broad...

Thanks in advance,
Alexander Priem.






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

* Re: data=writeback
  2004-04-08 07:59 data=writeback Priem, Alexander <ap@cict.nl>
@ 2004-04-08 09:01 ` Chris <list@1006.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Chris @ 2004-04-08 09:01 UTC (permalink / raw)
  To: pgsql-performance

> LABEL=/usr/local/pgsql  /usr/local/pgsql      ext3
> noatime,data=writeback  1 2
> LABEL=/usr/local/pgsql  /usr/local/pgsql/wal  ext3
> noatime,data=ordered    1 2

The same label mounted on two different mount points is probably I typo?

I'm not sure if data=writeback is ok. I was wondering about the same
thing after reading the "good pc but bad performance,why?" thread.

This is from man mount:

  writeback
  Data ordering is not preserved - data may be written into
  the  main file system after its metadata has been commit-
  ted to the journal.  This is rumoured to be the  highest-
  throughput  option.   It  guarantees internal file system
  integrity, however it can allow old  data  to  appear  in
  files after a crash and journal recovery.

How does this relate to fflush()? Does fflush still garantee 
all data has ben written?

Bye, Chris.





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

* Re: data=writeback
@ 2004-04-08 09:26 Priem, Alexander <ap@cict.nl>
  2004-04-08 09:44 ` Re: data=writeback Chris <list@1006.org>
  0 siblings, 1 reply; 7+ messages in thread

From: Priem, Alexander @ 2004-04-08 09:26 UTC (permalink / raw)
  To: Chris <list@1006.org>; pgsql-performance

> > LABEL=/usr/local/pgsql  /usr/local/pgsql      ext3
> > noatime,data=writeback  1 2
> > LABEL=/usr/local/pgsql  /usr/local/pgsql/wal  ext3
> > noatime,data=ordered    1 2
>
> The same label mounted on two different mount points is probably I typo?


No, the same label mounted on two different mount points is not a typo. This
is the way it is in my /etc/fstab.

Note that I did not create this file myself, it was created by the RedHat
Enterprise Linux 3 ES installer. I created different partitions for the data
directory (/usr/local/pgsql) and the wal directory (/usr/local/pgsql/wal)
using the installer and this is how the /etc/fstab file ended up.

Why, is this bad? They use the same label, but use different mount points?
Can this cause problems?




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

* Re: data=writeback
  2004-04-08 09:26 Re: data=writeback Priem, Alexander <ap@cict.nl>
@ 2004-04-08 09:44 ` Chris <list@1006.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Chris @ 2004-04-08 09:44 UTC (permalink / raw)
  To: pgsql-performance


> > > LABEL=/usr/local/pgsql  /usr/local/pgsql      ext3
> > > noatime,data=writeback  1 2
> > > LABEL=/usr/local/pgsql  /usr/local/pgsql/wal  ext3
> > > noatime,data=ordered    1 2
> >
> > The same label mounted on two different mount points is probably I typo?
> 
> 
> No, the same label mounted on two different mount points is not a typo. This
> is the way it is in my /etc/fstab.
> 
> Note that I did not create this file myself, it was created by the RedHat
> Enterprise Linux 3 ES installer. I created different partitions for the data
> directory (/usr/local/pgsql) and the wal directory (/usr/local/pgsql/wal)
> using the installer and this is how the /etc/fstab file ended up.
> 
> Why, is this bad? They use the same label, but use different mount points?
> Can this cause problems?

Mmm... how can the mounter distinguish the two partitions?

Maybe I'm missing a concept here, but I thought labels must uniquely
identify partitions?

Seems suspicious to me...

Does it work? When you give just "mount" at the command line what output
do you get?

Bye, Chris.





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

* Re: data=writeback
@ 2004-04-08 10:10 Priem, Alexander <ap@cict.nl>
  2004-04-08 13:01 ` Re: data=writeback list@1006.org
  0 siblings, 1 reply; 7+ messages in thread

From: Priem, Alexander @ 2004-04-08 10:10 UTC (permalink / raw)
  To: Chris <list@1006.org>; pgsql-performance

> > > > LABEL=/usr/local/pgsql  /usr/local/pgsql      ext3
> > > > noatime,data=writeback  1 2
> > > > LABEL=/usr/local/pgsql  /usr/local/pgsql/wal  ext3
> > > > noatime,data=ordered    1 2
> > >
> > > The same label mounted on two different mount points is probably I 
> > > typo?
> > 
> > 
> > No, the same label mounted on two different mount points is not a 
> > typo. This is the way it is in my /etc/fstab.
> > 
> > Note that I did not create this file myself, it was created by the 
> > RedHat Enterprise Linux 3 ES installer. I created different partitions 
> > for the data directory (/usr/local/pgsql) and the wal directory 
> > (/usr/local/pgsql/wal) using the installer and this is how the 
> > /etc/fstab file ended up.
> > 
> > Why, is this bad? They use the same label, but use different mount 
> > points? Can this cause problems?
>
> Mmm... how can the mounter distinguish the two partitions?
>
> Maybe I'm missing a concept here, but I thought labels must uniquely
identify partitions?
>
> Seems suspicious to me...
>
> Does it work? When you give just "mount" at the command line what output
do you get?
>
> Bye, Chris.

When I give "mount" at the command line, everything looks just fine :

/dev/sda2 on / type ext3 (rw,noatime,data=ordered)
none on /proc type proc (rw)
usbdevfs on /proc/bus/usb type usbdevfs (rw)
/dev/sda1 on /boot type ext3 (rw,noatime,data=ordered)
none on /dev/pts type devpts (rw,gid=5,mode=620)
none on /dev/shm type tmpfs (rw)
/dev/sdb1 on /usr/local/pgsql type ext3 (rw,noatime,data=writeback)
/dev/sda3 on /usr/local/pgsql/wal type ext3 (rw,noatime,data=ordered)

It looks like the labels are not really used, just the mount-points. Or
could this cause other problems I am not aware of? Everything seems to be
working just fine, for several months now...





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

* Re: data=writeback
  2004-04-08 10:10 Re: data=writeback Priem, Alexander <ap@cict.nl>
@ 2004-04-08 13:01 ` list@1006.org
  2004-04-08 14:52   ` Re: data=writeback Bruce Momjian <pgman@candle.pha.pa.us>
  0 siblings, 1 reply; 7+ messages in thread

From: list@1006.org @ 2004-04-08 13:01 UTC (permalink / raw)
  To: pgsql-performance

> When I give "mount" at the command line, everything looks just fine :
>
> /dev/sda2 on / type ext3 (rw,noatime,data=ordered)
> none on /proc type proc (rw)
> usbdevfs on /proc/bus/usb type usbdevfs (rw)
> /dev/sda1 on /boot type ext3 (rw,noatime,data=ordered)
> none on /dev/pts type devpts (rw,gid=5,mode=620)
> none on /dev/shm type tmpfs (rw)
> /dev/sdb1 on /usr/local/pgsql type ext3 (rw,noatime,data=writeback)
> /dev/sda3 on /usr/local/pgsql/wal type ext3 (rw,noatime,data=ordered)
>
> It looks like the labels are not really used, just the mount-points. Or
> could this cause other problems I am not aware of? Everything seems to
> be working just fine, for several months now...

Probably /dev/sdb1 and /dev/sda3 have the same labels and mount
simply mounts them in a consistent way according to some logic
we're not aware of.

I'd say: if it works don't touch it ;)

What remains unresolved is the question whether data=writeback is ok
or not. We'll see if somebody has more information on that one...

Bye, Chris.









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

* Re: data=writeback
  2004-04-08 10:10 Re: data=writeback Priem, Alexander <ap@cict.nl>
  2004-04-08 13:01 ` Re: data=writeback list@1006.org
@ 2004-04-08 14:52   ` Bruce Momjian <pgman@candle.pha.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Bruce Momjian @ 2004-04-08 14:52 UTC (permalink / raw)
  To: list@1006.org; +Cc: pgsql-performance

list@1006.org wrote:
> > When I give "mount" at the command line, everything looks just fine :
> >
> > /dev/sda2 on / type ext3 (rw,noatime,data=ordered)
> > none on /proc type proc (rw)
> > usbdevfs on /proc/bus/usb type usbdevfs (rw)
> > /dev/sda1 on /boot type ext3 (rw,noatime,data=ordered)
> > none on /dev/pts type devpts (rw,gid=5,mode=620)
> > none on /dev/shm type tmpfs (rw)
> > /dev/sdb1 on /usr/local/pgsql type ext3 (rw,noatime,data=writeback)
> > /dev/sda3 on /usr/local/pgsql/wal type ext3 (rw,noatime,data=ordered)
> >
> > It looks like the labels are not really used, just the mount-points. Or
> > could this cause other problems I am not aware of? Everything seems to
> > be working just fine, for several months now...
> 
> Probably /dev/sdb1 and /dev/sda3 have the same labels and mount
> simply mounts them in a consistent way according to some logic
> we're not aware of.
> 
> I'd say: if it works don't touch it ;)
> 
> What remains unresolved is the question whether data=writeback is ok
> or not. We'll see if somebody has more information on that one...

Should be fine.  We don't continue until fsync() writes all the data. 
We don't care what order it is written in, just that is all written
before we continue.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073



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


end of thread, other threads:[~2004-04-08 14:52 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-04-08 07:59 data=writeback Priem, Alexander <ap@cict.nl>
2004-04-08 09:01 ` Chris <list@1006.org>
2004-04-08 09:26 Re: data=writeback Priem, Alexander <ap@cict.nl>
2004-04-08 09:44 ` Chris <list@1006.org>
2004-04-08 10:10 Re: data=writeback Priem, Alexander <ap@cict.nl>
2004-04-08 13:01 ` list@1006.org
2004-04-08 14:52   ` Bruce Momjian <pgman@candle.pha.pa.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