[kwlug-disc] Newbie... Playing with Linux etc...
Khalid Baheyeldin
kb at 2bits.com
Tue Apr 20 14:41:18 EDT 2010
On Tue, Apr 20, 2010 at 12:28 PM, Fernando Duran <liberosec at yahoo.ca> wrote:
>
> For some applications, PostgreSQL is just too slow (e.g. high traffic
>> Drupal sites). Not a realistic option.
>>
>
> "Postgress is slow" for me is just a (now) unsupported claim that comes
> from the past. All the benchmarks etc I read regarding mysql vs pg
> performance vary a lot depending on configurations, hardware, data set,
> types of queries etc so I don't think you can say that all over the board pg
> is slower. I don't see people migrating pg -> mysql but I see the opposite.
> I don't hear clients complaining about pg but I hear them complaining about
> mysql. It's possible that I'm suffering from confirmation bias.
>
Here are benchmarks that we conducted in-house. It is not on a hypothetical
TPC-X type benchmark, it is on a real use case (Drupal CMS, on the same
hardware, out of the box parameters).
http://2bits.com/articles/benchmarking-postgresql-vs-mysql-performance-using-drupal-5x.html
After I published this, there were the usual screams of "but it is not
tuned", ...etc.
I worked with one person who decided to go beyond screaming and offered
PostgreSQL tuning assistance. We did tune many things over a week, with
little difference in the end. We did not take it further than that.
I am not saying PostgreSQL is generally slow, but rather: slow for
particular workloads (CMS web application).
Another case is a client who decided to build their web site on PostgreSQL
"because they use pg for other applications in-house", only to have 6 second
page loads. Not all of the issues with this site are PostgreSQL, but it was
definitely a major contributor to the slowness.
For a typical Drupal / PHP app it may very well be that pg is slower, that's
> fine. I'll trade marginal speed for data integrity almost anytime and I can
> be easily convinced that in some cases (like a web forum) you may want the
> opposite trade-off.
>
> The "not a realistic option": there are many high-traffic web sites that
> use pg: imdb.com, cdbaby.com etc, so that's just not true.
>
True.
If you are writing custom code from scratch you can do almost anything with
the tools you like.
For example, Twitter started with Ruby on Rails and it did not scale for
them. They replaced the guts of the site with Scala, a JVM language, and
wrote their own.
But most web sites want to tack on the long tail of the ecosystem (modules,
...etc.), rather than write their own. In which case, they will use whatever
is most used, for better or worse ...
> We have this discussion every year within Drupal. We do support both MySQL
>> and PostgreSQL (and sqlite lately) in core. Contributed modules have sparse
>> support for PostgreSQL though.
>>
>> We then have people come and preach virtues of PostgreSQL (free, capable,
>> ...etc.) and all that, but in the end no one is willing to step in and do
>> the work needed. We have about one maintainer that comes in does some work
>> and then disappear and PostgreSQL is left in the lurch.
>>
>
> Agreed. It may not be worth it to support pg in drupal or other apps.
>
Which is sad, because PostgreSQL is capable and free. It should be better
than that, but there is a lack of interest / lack of contributions from the
PostgreSQL community for one reason or the other.
This is really my lament: lack of hands to do the job, not the product
itself ...
In the meantime, you see Microsoft working on getting their SQL Server into
Drupal, so they gain a piece of the action, and Linux does not eat their
lunch in that space.
http://drupal.org/project/sqlsrv
> We hear this speech of "PostgreSQL is better, MySQL is crap" too often, but
>> when it comes to people putting their code where their mouth is, the reality
>> is different.
>>
>
> Like somebody said, this is like "we keep hearing about Linux is better,
> Windows is crap", perhaps there's some truth in it? but seriously, instead
> of listening to sides of a "war", I try to listen to experienced and
> practical people who have been on both sides, and in the case pg pg vs mysql
> these people seem to agree that in general pg > mysql.
"In general" is all good, but not the entire picture.
I used PostgreSQL where it really shines: e.g. an ERP application that
preserves data integrity, with closer number of writes as reads, and a large
number of users is not the issue.
> Usually the people defending mysql haven't used that much pg, same as with
> Windows/Linux so I can see a parallel ("Oh no, can it be true that I'm on
> the dark side?" http://www.youtube.com/watch?v=OpZ8EkK3eWY ).
>
> Would be great to have this discussion at the KWLUG meeting on May 3rd as
>> part of the MySQL presentation.
>>
>
> Yes, I'll bring my "just say no to mysql" t-shirts :-)
>
:-)
Instead of bashing, we need to have an informed and intelligent discussion
with use case and facts, not just an argument of "X is better than Y". We
need to qualify where X is a better fit and where Y is better.
Blanket statements are not helpful.
--
Khalid M. Baheyeldin
2bits.com, Inc.
http://2bits.com
Drupal optimization, development, customization and consulting.
Simplicity is prerequisite for reliability. -- Edsger W.Dijkstra
Simplicity is the ultimate sophistication. -- Leonardo da Vinci
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://kwlug.org/pipermail/kwlug-disc_kwlug.org/attachments/20100420/55c3fcf1/attachment.htm>
More information about the kwlug-disc
mailing list