Re: [HACKERS] fork/exec for backend

From: Tom <tom(at)sdf(dot)com>
To: Goran Thyni <goran(at)bildbasen(dot)se>
Cc: hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] fork/exec for backend
Date: 1998-01-24 21:35:33
Message-ID: Pine.BSF.3.95q.980124133228.19914C-100000@misery.sdf.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Goran Thyni 1998-01-24 22:16:53 Re: [HACKERS] fork/exec for backend
Previous Message Bruce Momjian 1998-01-24 20:45:48 Re: [HACKERS] fork/exec for backend