![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
At the moment, I'm active as an IBM DB2 DBA. But just out of curiousity, I'm restoring a copy of our production database into an PostgreSQL (8.2) database. It's an 60+ GB database. My goal is to get an insight on performance of postgres vs db2, I've seen some pretty impressive cases on postgres, so now I'm actually curious as to how our environment would run on a PG environment as opposed to a db2 envoronment. |
|
As we speak, I'm recreating all of our 40.000+ tables into a postgres instance (after making some necessary adjustments in the SQL) and transferring a CSV export of all our data. Now, before I start populating the database, I'd like to know what the major influences on performance are on a PSQL environment. What memory parameter adjustments do I have to make in order for postgres to make an optimal use of available system memory? And do I need to make any adjustments to the optimizer? How do I influence multi-processs / multithreading use? |
#3
| ||||||
| ||||||
|
|
One of the consequences is a radically different behaviour to ascertain serializable transactions: .. |
|
You can get the whole story from http://www.postgresql.org/docs/curre...me-config.html The most important parameter is probably "shared_buffers",... "work_mem" ... |
|
Make sure that you VACUUM the database regularly, and (particularly if there are many changes in the database) make sure that "max_fsm_pages" is set big enough, else the database cannot remember all free pages, which will lead to bloat. |
|
On busy databases, increasing "checkpoint_segments" ... The optimizer is best left alone; set "effective_cache_size" ... |
|
There are several "dangerous" parameters that can give you a performance boost for updates at the possible price of integrity and durability. Read section 17.5.1 for details. |

|
You cannot influence the number of processes - each client connection will be served by its own server process. PostgreSQL has decided against multithreading in the backend: it reduces complexity, makes other backend processes immune against crashes and (at least on Linux) isn't much of a performance penalty. Sounds fair enough. |

#4
| |||
| |||
|
|
Make sure that you VACUUM the database regularly, and (particularly if there are many changes in the database) make sure that "max_fsm_pages" is set big enough, else the database cannot remember all free pages, which will lead to bloat. I've read somewhere about an Auto Vacuum Daemon? I take it, that it's a lot like DB2's auto Runstats & Reorgs? In any case, I can always schedule it through Cron. |
#5
| |||
| |||
|
|
My goal is to get an insight on performance of postgres vs db2, I've seen some pretty impressive cases on postgres, so now I'm actually curious as to how our environment would run on a PG environment as opposed to a db2 environment. |
#6
| |||
| |||
|
|
Jurgen Haan <jurgen (AT) fake (DOT) dom> wrote: My goal is to get an insight on performance of postgres vs db2, I've seen some pretty impressive cases on postgres, so now I'm actually curious as to how our environment would run on a PG environment as opposed to a db2 environment. FWIW, a colleague of mine did a similar comparison between PG and Oracle. He was the designated PG expert, and a co-worker was the Oracle maven. They implemented their company's actual data in both RDBMSes (around 1 TB), supporting the same applications, and optimized the heck out of both, sharing all information that they could between them. They bet the next round of beers on who would have the fastest result. The PG guy won, even after the two of them worked together to speed up the Oracle database for a second round. My friend tweaked many PG parameters, including some of the more obscure. The details I don't know, but he alluded to some of the same parameters mentioned upthread. I only have his description of a qualitative result, so I cannot give hard data on this case. If there is a lesson, it's that PG is at least competitive with the traditional Big Guns. |
#7
| ||||
| ||||
|
|
The details I don't know, ... I only have his description of a qualitative result, so I cannot give hard data on this case. If there is a lesson, it's that PG is at least competitive with the traditional Big Guns. |
|
It would be realy nice if you could provide some more data on the subject you just mentioned above. |
|
I have made "similair" tests between Oracle, MSSQL, the database was around 20 GB in size, and I found out that all of the RDBMSes perform very similair. I even found out that PostgreSQL on Windows is not slower nor faster than PostgreSQL on Linux. I love MSSQL query analyzer and Enterprise Manager. It's just that MSSQL is tied to Windows, and I'm much more inclined on ease of Linux administration. And Postgres is free. And the community is great! |
|
So, I'd like to have a peek on the data you mention above... or, would it be possible for me to contact that friend of yours? |
#8
| |||
| |||
|
#9
| |||
| |||
|
|
Furthermore, doesn't Oracle prohibit publication of benchmark results involving their products? |
![]() |
| Thread Tools | |
| Display Modes | |
| |