Re: [PERFORM] data=writeback

2004-04-08 Thread Bruce Momjian
[EMAIL PROTECTED] 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
  [EMAIL PROTECTED]   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, Pennsylvania 19073

---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])


Re: [PERFORM] data=writeback

2004-04-08 Thread list
> 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.







---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faqs/FAQ.html


Re: [PERFORM] data=writeback

2004-04-08 Thread Priem, Alexander
> > LABEL=/usr/local/pgsql  /usr/local/pgsql  ext3
> > noatime,data=writeback  1 2
> > LABEL=/usr/local/pgsql  /usr/local/pgsql/wal  ext3
> > noatime,data=ordered1 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?


---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


Re: [PERFORM] data=writeback

2004-04-08 Thread Priem, Alexander
> > > > LABEL=/usr/local/pgsql  /usr/local/pgsql  ext3
> > > > noatime,data=writeback  1 2
> > > > LABEL=/usr/local/pgsql  /usr/local/pgsql/wal  ext3
> > > > noatime,data=ordered1 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...



---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
  subscribe-nomail command to [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly


Re: [PERFORM] data=writeback

2004-04-08 Thread Chris

> > > LABEL=/usr/local/pgsql  /usr/local/pgsql  ext3
> > > noatime,data=writeback  1 2
> > > LABEL=/usr/local/pgsql  /usr/local/pgsql/wal  ext3
> > > noatime,data=ordered1 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.



---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
  subscribe-nomail command to [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly


Re: [PERFORM] data=writeback

2004-04-08 Thread Chris
> LABEL=/usr/local/pgsql  /usr/local/pgsql  ext3
> noatime,data=writeback  1 2
> LABEL=/usr/local/pgsql  /usr/local/pgsql/wal  ext3
> noatime,data=ordered1 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.



---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
  subscribe-nomail command to [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly


[PERFORM] data=writeback

2004-04-08 Thread Priem, Alexander
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=ordered1 1
LABEL=/boot /boot ext3
noatime,data=ordered1 2
none/dev/pts  devpts   gid=5,mode=620
0 0
none/proc proc defaults
0 0
none/dev/shm  tmpfsdefaults
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=ordered1 2
/dev/sda5   swap  swap defaults
0 0
/dev/cdrom  /mnt/cdromudf,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.




---(end of broadcast)---
TIP 8: explain analyze is your friend