Re: Linux v.s. Mac OS-X Performance

From: Greg Smith <gsmith(at)gregsmith(dot)com>
To: Wes <wespvp(at)msg(dot)bt(dot)com>
Cc: pgsql general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Linux v.s. Mac OS-X Performance
Date: 2007-11-30 06:18:11
Message-ID: Pine.GSO.4.64.0711300030470.19500@westnet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 29 Nov 2007, Wes wrote:

> Perhaps PostgreSQL isn't heavily threaded enough to make a difference

PostgreSQL doesn't use threads at all; it forks processes. See 1.14 in
http://www.postgresql.org/docs/faqs.FAQ_DEV.html

> The benchmark that got us looking at this was a MySQL benchmark showing
> performance scaling by number of threads on various linux operating
> systems.

Presumably you mean this one: http://ozlabs.org/~anton/linux/sysbench/

The threading/malloc issues in MySQL are so awful that similar approaches
have already been suggested for other operating systems. Check out
http://developers.sun.com/solaris/articles/mysql_perf_tune.html for
comments about this under Solaris for example.

The fact that PostgreSQL scalability doesn't fall off like this suggests
it doesn't have this particular issue. Note that the curve in that
sysbench run is awfully similar to the MySQL results at
http://tweakers.net/reviews/649/7 (just shifted to the right because there
are many more cores in that system). Then look at their PostgreSQL
results running the same test. Forgive the error where they state
"PostgreSQL might be called a textbook example of a good implementation of
multithreading"; it's actually a good multi-process implementation.
Interestingly, those results are from a Solaris system.

It's good to know about the Google perftools allocator, as there are
plenty of client applications that could benefit as yours has from this
technique (like the multi-threaded C++ apps it appears aimed at). I just
wouldn't expect it to be a big win for the PostgreSQL server itself.

--
* Greg Smith gsmith(at)gregsmith(dot)com http://www.gregsmith.com Baltimore, MD

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Robert Treat 2007-11-30 06:56:13 Re: Tools for dumping pg_xlog, pg_clog, etc?
Previous Message Trevor Talbot 2007-11-30 05:51:02 Re: 8.2.3: Server crashes on Windows using Eclipse/Junit