From: | Dmytrii Nagirniak <dnagir(at)gmail(dot)com> |
---|---|
To: | Simon Riggs <simon(at)2ndQuadrant(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Optimise PostgreSQL for fast testing |
Date: | 2012-02-26 23:57:07 |
Message-ID: | 6015296B-E4C9-4C09-B474-04494E289A7D@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi Guys,
Sorry for the late reply.
Thanks to all of you for the help. Appreciate all your suggestions.
So far (with my pretty limited knowledge of PG) I could speed it up a little bit (~20% or so comparing to the original installation) only by "tweaking" the settings.
I think it is relatively good keeping in mind that no single line of code has been changed.
Just my quick summary. Not interested in query tuning for now, just the DB tweaking:
Best perf optimisation - `fsync=off`.
Paralelisation should be considered as the 2nd option after `fsync=off`.
All further optimisations might not be worth the effort unless you know PG well.
RAM Disk didn't improve perf much at all.
As Craig Ringer replied to my question at SO, the PostgreSQL 9.0 High Performance is worth the read.
PG has awesome documentation, including Perf related: http://wiki.postgresql.org/wiki/Tuning_Your_PostgreSQL_Server
So far this is my approach:
Since SQLite has basic FTS support (which I totally missed; thanks for pointing that out!) I can go a long way with it and probably won't need PG soon. But when I do:
Run most of the specs agains SQLite. Only run specs that rely on PG features against PG (which should be minority).
Run full acceptance tests (Cucumber) against a production DB (be it SQLite or PG).
Will parallelise both unit and acceptance tests in the future.
Thanks a lot to all of you guys.
Your suggestions, criticism and discussion was really healthy, helpful and to the point.
Cheers,
Dmytrii
http://www.ApproachE.com
On 24/02/2012, at 9:25 PM, Simon Riggs wrote:
> On Fri, Feb 24, 2012 at 12:16 AM, Dmytrii Nagirniak <dnagir(at)gmail(dot)com> wrote:
>
>> That's totally fine if PG can't beat SQLite on speed in **this particular
>> case**.
>
> The point is that PG can beat SQLite in this test *easily* if you
> choose to use the main architectural difference as an advantage:
> running tests concurrently.
>
> --
> Simon Riggs http://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Marti Raudsepp | 2012-02-27 09:57:50 | Re: A better COPY? |
Previous Message | Alban Hertroys | 2012-02-26 23:05:52 | Re: A better COPY? |