Thread: FreeBSD Softupdates??
Just a quick q. Does anyone know what effects FreeBSD's 'softupdates' would have on the /usr/local/pgsql/data filesystem. Would this help performance, or would it be a shot in the foot?? -- Dale Walker dale@icr.com.au Independent Computer Retailers (ICR) http://www.icr.com.au ICRnet http://www.icr.net.au
* Dale Walker <dale@icr.com.au> [000926 01:02] wrote: > > Just a quick q. > > Does anyone know what effects FreeBSD's 'softupdates' would have > on the /usr/local/pgsql/data filesystem. > > Would this help performance, or would it be a shot in the foot?? It can cause problems because softupdates makes meta data changes (in this case file creation/removal) asyncronously, the same actually happens with most other logging filesystems that don't support transactions. Since afaik postgresql doesn't use lots and lots of tempfiles you may want to play it safe and not use softupdates. -- -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org] "I have the heart of a child; I keep it in a jar on my desk."
On Tue, Sep 26, 2000 at 03:20:31AM -0700, Alfred Perlstein wrote: > It can cause problems because softupdates makes meta data changes > (in this case file creation/removal) asyncronously, the same actually > happens with most other logging filesystems that don't support > transactions. I've been running FreeBSD 4.1 with soft updates on my development box for a while now without any problems at all. Although it's not production so there's not a lot of load on PgSQL. I don't know if it hurts or hampers performance. HTH, Neil -- Neil Conway <neilconway@home.com> Get my GnuPG key from: http://klamath.dyndns.org/mykey.asc Encrypted mail welcomed I am not interested in the past. I am interested in the future for that is where I intend to spend the rest of my life. -- Charles F. Ketterring
Attachment
-- Start of PGP signed section. > On Tue, Sep 26, 2000 at 03:20:31AM -0700, Alfred Perlstein wrote: > > It can cause problems because softupdates makes meta data changes > > (in this case file creation/removal) asyncronously, the same actually > > happens with most other logging filesystems that don't support > > transactions. > > I've been running FreeBSD 4.1 with soft updates on my development box > for a while now without any problems at all. Although it's not > production so there's not a lot of load on PgSQL. > > I don't know if it hurts or hampers performance. Good question. I can see soft updates improving performance because it flushes meta-data writes all at once, rather than each time a file is created/destroyed. I don't see any downside for PostgreSQL. The default fsync() will still work, or at least it should. This is not the same as mounting a volume as async. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026
I've been runing since softupdates became mainstream, on a relatively heavily used production server ... I can't answer about performance gains/loss, but from what I know of softupdates, it should be neglible for a database system ... but, I haven't been 'shot in the foot' yet for any of our database ... On Tue, 26 Sep 2000, Neil Conway wrote: > On Tue, Sep 26, 2000 at 03:20:31AM -0700, Alfred Perlstein wrote: > > It can cause problems because softupdates makes meta data changes > > (in this case file creation/removal) asyncronously, the same actually > > happens with most other logging filesystems that don't support > > transactions. > > I've been running FreeBSD 4.1 with soft updates on my development box > for a while now without any problems at all. Although it's not > production so there's not a lot of load on PgSQL. > > I don't know if it hurts or hampers performance. > > HTH, > > Neil > > -- > Neil Conway <neilconway@home.com> > Get my GnuPG key from: http://klamath.dyndns.org/mykey.asc > Encrypted mail welcomed > > I am not interested in the past. I am interested in the future for > that is where I intend to spend the rest of my life. > -- Charles F. Ketterring > Marc G. Fournier ICQ#7615664 IRC Nick: Scrappy Systems Administrator @ hub.org primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org
* Bruce Momjian <pgman@candle.pha.pa.us> [000926 07:12] wrote: > -- Start of PGP signed section. > > On Tue, Sep 26, 2000 at 03:20:31AM -0700, Alfred Perlstein wrote: > > > It can cause problems because softupdates makes meta data changes > > > (in this case file creation/removal) asyncronously, the same actually > > > happens with most other logging filesystems that don't support > > > transactions. > > > > I've been running FreeBSD 4.1 with soft updates on my development box > > for a while now without any problems at all. Although it's not > > production so there's not a lot of load on PgSQL. > > > > I don't know if it hurts or hampers performance. > > Good question. I can see soft updates improving performance because it > flushes meta-data writes all at once, rather than each time a file is > created/destroyed. I don't see any downside for PostgreSQL. The > default fsync() will still work, or at least it should. This is not the > same as mounting a volume as async. You are correct, softupdates will honour a fsync and stabilize the file (make sure it's a round if you have a crash). -- -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org] "I have the heart of a child; I keep it in a jar on my desk."
* Alfred Perlstein <bright@wintelcom.net> [000926 08:42] wrote: > * Bruce Momjian <pgman@candle.pha.pa.us> [000926 07:12] wrote: > > -- Start of PGP signed section. > > > On Tue, Sep 26, 2000 at 03:20:31AM -0700, Alfred Perlstein wrote: > > > > It can cause problems because softupdates makes meta data changes > > > > (in this case file creation/removal) asyncronously, the same actually > > > > happens with most other logging filesystems that don't support > > > > transactions. > > > > > > I've been running FreeBSD 4.1 with soft updates on my development box > > > for a while now without any problems at all. Although it's not > > > production so there's not a lot of load on PgSQL. > > > > > > I don't know if it hurts or hampers performance. > > > > Good question. I can see soft updates improving performance because it > > flushes meta-data writes all at once, rather than each time a file is > > created/destroyed. I don't see any downside for PostgreSQL. The > > default fsync() will still work, or at least it should. This is not the > > same as mounting a volume as async. > > You are correct, softupdates will honour a fsync and stabilize the > file (make sure it's a round if you have a crash). UFS doesn't support 'round' files, I meant 'around' of course. :) -- -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org] "I have the heart of a child; I keep it in a jar on my desk."
Alfred Perlstein wrote: > [snipped thread] OK, if I'm reading it right, the general concensus seems to be - it'll work, but there is a possibility of data loss in event of system crash....although everything should be OK 99.9% of the time. yep, this is about what I thought.. I wanted to get a feel for practicality though. Thanks for all your input guys, I'll stick to my standard filesystem for now.. -- Dale Walker dale@icr.com.au Independent Computer Retailers (ICR) http://www.icr.com.au ICRnet http://www.icr.net.au
> Alfred Perlstein wrote: > > > [snipped thread] > > OK, if I'm reading it right, the general concensus seems to be - it'll > work, but there is a possibility of data loss in event of system > crash....although everything should be OK 99.9% of the time. > > yep, this is about what I thought.. I wanted to get a feel for > practicality though. > > Thanks for all your input guys, I'll stick to my standard filesystem for > now.. No, softupdates to not affect recovery. Standard PostgreSQL flushes all stuff to disk on transaction commit, and this it not affected by the file system softupdate status. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026
Bruce Momjian wrote: > > > No, softupdates to not affect recovery. Standard PostgreSQL flushes all > stuff to disk on transaction commit, and this it not affected by the > file system softupdate status. > AAahhh... yes I see (light goes on in head), this was sort of aluded to in on of the responses, but it didn't click. Therefore, there would be little practical benefit?? I'll try a long series of insert/select/updates and compare. -- Dale Walker dale@icr.com.au Independent Computer Retailers (ICR) http://www.icr.com.au ICRnet http://www.icr.net.au
Soft updates make file creation/destruction faster. My BSDI system uses it, and it is clearly faster for interactive use. I never tested PostgreSQL. > Bruce Momjian wrote: > > > > > > No, softupdates to not affect recovery. Standard PostgreSQL flushes all > > stuff to disk on transaction commit, and this it not affected by the > > file system softupdate status. > > > > AAahhh... > > yes I see (light goes on in head), this was sort of aluded to in on of > the responses, but it didn't click. > > Therefore, there would be little practical benefit?? > > I'll try a long series of insert/select/updates and compare. > > > -- > Dale Walker dale@icr.com.au > Independent Computer Retailers (ICR) http://www.icr.com.au > ICRnet http://www.icr.net.au > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026
* Bruce Momjian <pgman@candle.pha.pa.us> [000926 13:55] wrote: > > Alfred Perlstein wrote: > > > > > [snipped thread] > > > > OK, if I'm reading it right, the general concensus seems to be - it'll > > work, but there is a possibility of data loss in event of system > > crash....although everything should be OK 99.9% of the time. > > > > yep, this is about what I thought.. I wanted to get a feel for > > practicality though. > > > > Thanks for all your input guys, I'll stick to my standard filesystem for > > now.. > > No, softupdates to not affect recovery. Standard PostgreSQL flushes all > stuff to disk on transaction commit, and this it not affected by the > file system softupdate status. This is only true if the user isn't running postgresql async. So softupdates should be ok as long as postgresql is issueing fsyncs, if you're running postgresql in async mode, then it's probably better not to use softupdates. Also, since running postgresql in sync mode will basically cause the negation of most softupdate benifits with the exception of tempfiles, doesn't postgresql differenciate between system files and tempfiles? -- -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org] "I have the heart of a child; I keep it in a jar on my desk."
The consensu from the FreeBSD -STABLE lists are that SOFTUPDATES helps ANY UFS FileSystem, and makes it MORE robust because of the logging and the way FSCK works. I've turned SOFTUPDATES on all my FS's on 4.1.1-STABLE. Larry * The Hermit Hacker <scrappy@hub.org> [000926 10:32]: > > I've been runing since softupdates became mainstream, on a relatively > heavily used production server ... I can't answer about performance > gains/loss, but from what I know of softupdates, it should be neglible for > a database system ... but, I haven't been 'shot in the foot' yet for any > of our database ... > > > On Tue, 26 Sep 2000, Neil Conway wrote: > > > On Tue, Sep 26, 2000 at 03:20:31AM -0700, Alfred Perlstein wrote: > > > It can cause problems because softupdates makes meta data changes > > > (in this case file creation/removal) asyncronously, the same actually > > > happens with most other logging filesystems that don't support > > > transactions. > > > > I've been running FreeBSD 4.1 with soft updates on my development box > > for a while now without any problems at all. Although it's not > > production so there's not a lot of load on PgSQL. > > > > I don't know if it hurts or hampers performance. > > > > HTH, > > > > Neil > > > > -- > > Neil Conway <neilconway@home.com> > > Get my GnuPG key from: http://klamath.dyndns.org/mykey.asc > > Encrypted mail welcomed > > > > I am not interested in the past. I am interested in the future for > > that is where I intend to spend the rest of my life. > > -- Charles F. Ketterring > > > > Marc G. Fournier ICQ#7615664 IRC Nick: Scrappy > Systems Administrator @ hub.org > primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 972-414-9812 (voice) Internet: ler@lerctr.org US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749