Thread: interesting benchmarks PG/Firebird Linux/Windows fsync/nofsync
Hello, just recently I held a short course on PG. One course attendant, Robert Dollinger, got interested in benchmarking single inserts (since he currently maintains an application that does exactly that on Firebird and speed is an issue there). He came up with a table that I think is interesting for other people so I asked permission to publish it on this list. Here it is: http://1006.org/pg/postgresql_firebird_win_linux.pdf Note: some german words are there, I can't change the pdf, so here's a short explanation: He tested the speed of 4000 inserts through a Delphi application with zeos components. the 3 parameters are: * transaction - single: all 4000 inserts inside 1 transaction - multi: 4000 inserts with 4000 commits * fsync (for PG) or forced writes (for FB) - true/false * "Verbindung" = connection - local - LAN - wireless notes: the server ran either on a windows desktop machine or a linux laptop; the client allways ran on the windows desktop Timings are in msec, note that you cannot directly compare Windows and Linux Performance, since machines were different. You can, however, compare PG to Firebird, and you can see the effect of the 3 varied parametert. One thing that stands out is how terribly bad Windows performed with many small single transactions and fsync=true. Appearantly fsync on Windows is a very costly operation. Another (good) thing is that PG beats FB on all other tests :-) Bye, Chris.
> One thing that stands out is how terribly bad Windows > performed with many small single transactions and fsync=true. > > Appearantly fsync on Windows is a very costly operation. What's the hardware? If you're running on disks with write cache enabled, fsync on windows will write through the write cache *no matter what*. I don't know of any other OS where it will do that. If you don't have a battery backed write cache, then all other configurations are considered very dangerous in case your machine crashes. If you have battery backed write cache, then yes, pg on windows will perform poorly indeed. There is a patch in the queue for 8.0.2, and already applied to 8.1 IIRC, that will fix the bad performance with write-cache on win32. (can't read the PDF, it crashes my adobe reader for some reason. Perhaps it contains the information above...) //Magnus
Chris Mair wrote: > Timings are in msec, note that you cannot directly > compare Windows and Linux Performance, since machines > were different. > > You can, however, compare PG to Firebird, and you > can see the effect of the 3 varied parametert. > > One thing that stands out is how terribly > bad Windows performed with many small single > transactions and fsync=true. > > Appearantly fsync on Windows is a very costly > operation. Yes, we now enable FILE_FLAG_WRITE_THROUGH on Win32 for open_sync and I am about to open a discussion whether this should be the default for Win32, and whether we should backpatch this to 8.0.X. -- 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
"Bruce Momjian" <pgman@candle.pha.pa.us> writes > > Yes, we now enable FILE_FLAG_WRITE_THROUGH on Win32 for open_sync and I > am about to open a discussion whether this should be the default for > Win32, and whether we should backpatch this to 8.0.X. Just a short msg: Oracle/SQL Server enable it as default in win32 *no matter what* ... Regards, Qingqing