Re: Drupal and PostgreSQL - performance issues? - Mailing list pgsql-general

From Ang Chin Han
Subject Re: Drupal and PostgreSQL - performance issues?
Date
Msg-id 8c8854360810140647n58abc9bend377e0e234dd39a9@mail.gmail.com
Whole thread Raw
In response to Re: Drupal and PostgreSQL - performance issues?  ("Scott Marlowe" <scott.marlowe@gmail.com>)
Responses Re: Drupal and PostgreSQL - performance issues?  (Martin Gainty <mgainty@hotmail.com>)
Re: Drupal and PostgreSQL - performance issues?  ("Scott Marlowe" <scott.marlowe@gmail.com>)
List pgsql-general
On Tue, Oct 14, 2008 at 8:56 PM, Scott Marlowe <scott.marlowe@gmail.com> wrote:
> On Tue, Oct 14, 2008 at 3:40 AM, Ivan Sergio Borgonovo
> <mail@webthatworks.it> wrote:
>> On Mon, 13 Oct 2008 20:45:39 -0600
>> "Joshua Tolley" <eggyknap@gmail.com> wrote:
>>
>> Premise:
>> I'm not sustaining that the "default" answers are wrong, but they are
>> inadequate.
>> BTW the OP made a direct comparison of pgsql and mysql running
>> drupal. That's a bit different than just asking: how can I improve
>> PostgreSQL performances.
>
> Sadly, no one has run any meaningful benchmarks so far.

Not sure about "meaningful", but:
http://2bits.com/articles/benchmarking-postgresql-vs-mysql-performance-using-drupal-5x.html
Their attached config file shows a relatively untuned postgresql
config, but in *Drupal's* case, I'm not sure how else tweaking the
config would help when it shows: "Executed 99 queries in 67.81
milliseconds." which in itself is not too shabbly, but that points
towards Drupal's inclination to issue a *lot* of small, simple
queries.

> Actually the most common answer is to ask them if they've actually
> used a realistic benchmark.  Then tune.

The benchmark is a mostly read-only Drupal site -- a few admins, but a
lot of readers. Drupal as a benchmark is skewed towards lots and lots
of small, simple queries, which MyISAM excels at. The long term fix
ought to be to help the Drupal team to make it

The front page of one my site, even with some caching turned on, but
with a logged in user, shows 389 queries just to generate it, mostly
consisting of queries like "SELECT dst FROM url_alias WHERE src =
'$link' AND language IN('en', '') ORDER BY language DESC". Explain
analyze shows that postgresql happily uses the index to grab the
correct value, in less than 0.04 ms. But it's still not fast enough,
esp. when Drupal stupidly issues some of the exact same queries up to
9 times!

This, to me, is clearly some thing to be fixed at Drupal's level.
Joshua Drake is on the right path -- helping the Drupal folks treat
the database as a database instead of a blind data store. This is
something I'm working on as well on Drupal's code base, but it looks
like it wouldn't be making to the mainstream Drupal release anything
soon as the changes are too drastic.

pgsql-general by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: Drupal and PostgreSQL - performance issues?
Next
From: Greg Smith
Date:
Subject: Re: Drupal and PostgreSQL - performance issues?