Subject: Re: PostgreSQL
To: None <email@example.com>
From: None <firstname.lastname@example.org>
Date: 02/02/2006 02:54:18
On Thu, Feb 02, 2006 at 01:19:06AM +0000, email@example.com wrote:
> Threads can be created MUCH faster, they take up a lot less memory and they run
> in the same address space, which means access to shared data is easy and fast.
Come on. How often to do create a thread? Once per connection. How often
do you create connections? Don't tell me for each HTTP request, that
would be a nice major bottle neck to kill *independent* of the DB(MS) or
The amount of memory used by the process vs. thread is neglectable. The
whole text segment is shared, most of the global data segment is shared,
only the specific context is not. Matter of fact, when counting libc
internal data in, threading might not actually save anything at all.
Even if you add the overhead of the kernel, most of the state keeps
being shared, so almost *nothing* is gained by using a thread.
> If PostgreSQL forks a new process for a each connection to a database, it will
> be 1) slow, 2) it'll use up all the memory much sooner.
ROFL. This is just amusing. Any more wisdom?