Skip site navigation (1) Skip section navigation (2)

Re: Forking vs. Threading

From: Shridhar Daithankar <shridhar(at)frodo(dot)hserus(dot)net>
To: bryan(dot)encina(at)valleypres(dot)org
Cc: pgsql-advocacy(at)postgresql(dot)org
Subject: Re: Forking vs. Threading
Date: 2004-03-19 14:08:58
Message-ID: 405AFEFA.5080004@frodo.hserus.net (view raw or flat)
Thread:
Lists: pgsql-advocacy
Bryan Encina wrote:

> Below is a post from the Fedora mailing list as to why one of the users
> recommends Firebird over PostgreSQL (this thread came up because of
> questions regarding MySQL licensing) and I was wondering if someone from
> pgsql advocacy had any comments on this or would like to respond.
> 
> Sorry for top posting, but I didn't want to ruin any formatting.
> 
> -b
> 
> --------------------------------
> I like PostgreSQL as far as it's simplicity and things go.  It's nice,
> and there are some good front ends for it.  The one complaint I have
> with Postgres is that it forks.
> 
> MySQL and Firebird use threads and Postgres forks.  Forking is ok,
> unless you have many database connections.  The more connections the
> more processes.  I noticed while profiling an application that every
> connection alone was taking over 1MB of memory.  This based on the
> process per connection gripe I have.

Umm.. Notcied how much of that 1MB is shared?

> So, Postgres, sure I like it, but as far as a major DBMS goes, I think
> it is limited by it's memory usage.  That's just my opinion on the
> matter.  However, it is a fact that it forks (forking takes more time
> and more resources than threading).  One benefit in forking is the same
> reason Apache forks( memory leaks can be minimized).  However, I think
> if a DBMS has that bad of a memory leak....I won't use it.

Postgresql uses fork because threading isn't as stable as forks on all the 
platforms it runs on. Furthermore when postgresql started it was definitely not..

Forking isn't as major issue on linux as it could be on say solaris. However 
connection setup time is rather tiny amount of what a database does actually. 
Isn't it?

> 
> I like to advocate Firebird as much as possible.  It runs on many
> platforms and seems to be pretty scalable as far as connections and
> usage goes, and it has a very flexible license as well.

Firebird does have an edge over postgresql in terms of native windows port. 
Nobody denies that..

> 
> I like all three mentioned DBMS, just different reasons for using them
> at different times.

Certainly..

  Shridhar

In response to

Responses

pgsql-advocacy by date

Next:From: Robert BernierDate: 2004-03-19 14:21:54
Subject: another postgres article
Previous:From: Josh BerkusDate: 2004-03-17 18:53:36
Subject: Fwd: Hi Josh... not sure if this qualifies for anything...

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group