Re: [HACKERS] fork/exec for backend - Mailing list pgsql-hackers

From Tom
Subject Re: [HACKERS] fork/exec for backend
Date
Msg-id Pine.BSF.3.95q.980124133228.19914C-100000@misery.sdf.com
Whole thread Raw
In response to fork/exec for backend  (Goran Thyni <goran@bildbasen.se>)
Responses Re: [HACKERS] fork/exec for backend  (Goran Thyni <goran@bildbasen.se>)
Re: [HACKERS] fork/exec for backend  (Bruce Momjian <maillist@candle.pha.pa.us>)
List pgsql-hackers
On 24 Jan 1998, Goran Thyni wrote:

> Fork on modern unices (linux and (a think) *BSD) cost
> almost nothing (in time and memory) thanks to COW (copy-on-write).
> Exec in expensive as it breaks COW.

  Not so.  Modern Unixs will share executable address space between
processes.  So if you fork and exec 10 identical programs, they will share
most address space.

  If you want to speed this up, link postgresql static.  This makes exec()
cost almost nothing too.  postgresql becomes its own best shared library.

  Again, this only applies to "modern" systems, but FreeBSD definitely has
this behaviour.

Tom


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Re: Browsing the tables and why pgsql does not perform well
Next
From: Goran Thyni
Date:
Subject: Re: [HACKERS] fork/exec for backend