Re: [HACKERS] shmem/mmap Q - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [HACKERS] shmem/mmap Q
Date
Msg-id 199802122115.QAA04359@candle.pha.pa.us
Whole thread Raw
In response to shmem/mmap Q  (Goran Thyni <goran@bildbasen.se>)
List pgsql-hackers
>
>
> A while back we talked about exec/shmem/mmap.
> I am thinking about messing it up and make some test
> around this issues when I get some spare time.
>
> I think I figured out that most memory,
> at least the buffers is allocated in shmem.
>
> What are the primary reason for this?
> Speed? Footprint? Synchonization/Locking? Other?

The exec() adds 0.01 seconds on a start connection/do select/disconnect
test that takes 0.09 seconds.  That's a lot.

Seems like the exec() is not necessary because it is the same binary as
the parent, and we can skip loading all those shared memory segments
into the address space.  I also think we may be able to do some
initialization in the postmaster that can be given to each backend.

Once you get the shared memory stuff figured out, the only other issue
is initialized variables or static local varaibles that are changed by
the postmaster.  This should be minimal because the postmaster doesn't
do much.

--
Bruce Momjian
maillist@candle.pha.pa.us

pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Shared memory corruption?
Next
From: "Nguyen, Thuan"
Date:
Subject: ...