Re: PostgreSQL pre-fork speedup - Mailing list pgsql-hackers

From sdv mailer
Subject Re: PostgreSQL pre-fork speedup
Date
Msg-id 20040506042955.87128.qmail@web60203.mail.yahoo.com
Whole thread Raw
In response to Re: PostgreSQL pre-fork speedup  ("scott.marlowe" <scott.marlowe@ihs.com>)
Responses Re: PostgreSQL pre-fork speedup
List pgsql-hackers
Forking is expensive on many systems. Linux is a bit
better but still expensive compared to threads. On
Windows, creating process is much more expensive than
on Linux. Check this benchmark:

http://cs.nmu.edu/~randy/Research/Papers/Scheduler/understanding.html

Forking shouldn't be taken lightly as free thing.
There are pros and cons. The general trend is going
towards threads, but that's a different issue.


--- "scott.marlowe" <scott.marlowe@ihs.com> wrote:
> On Wed, 5 May 2004, sdv mailer wrote:
> 
> > Forking is quite fast on Linux but creating a new
> > process is still 10x more expensive than creating
> a
> > thread and is even worse on Win32 platform. CPU
> load
> > goes up because the OS needs to
> allocate/deallocate
> > memory making it difficult to get a steady state
> > resource consumption.
> 
> Just a nit to pick here.  In Linux, the difference
> between forking and 
> spawning a new thread is almost nothing.  Definitely
> less than a factor of 
> 2, and most assuredly less than the quoted factor of
> 10 here.
> 
> The fact that windows has a heavy process /
> lightweight thread design 
> means little to me, since I'll likely never deploy a
> production postgresql 
> server on it that needs to handle any serious load.
> 


    
__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs  
http://hotjobs.sweepstakes.yahoo.com/careermakeover 


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: ALTER TABLE TODO items
Next
From: sdv mailer
Date:
Subject: Re: PostgreSQL pre-fork speedup