Thread: Re: [HACKERS] removing the exec() from doexec()

Re: [HACKERS] removing the exec() from doexec()

From
Bruce Momjian
Date:
> This exec() takes 15% of our startup time.  I have wanted it removed for
> many releases now.  The only problem is to rip out the code that
> re-attached to shared memory and stuff like that, because you will no
> longer loose the shared memory in the exec().  The IPC code is
> complicated, so good luck.  I or others can help if you get stuck.
>

Another item is to no longer use SYSV shared memory but use
mmap(MAP_ANON) because this allows a much larger amount of shared memory
to be used.

--
Bruce Momjian                          |  830 Blythe Avenue
maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)

Re: [HACKERS] removing the exec() from doexec()

From
Brett McCormick
Date:
On Wed, 29 April 1998, at 21:53:36, Bruce Momjian wrote:

> > This exec() takes 15% of our startup time.  I have wanted it removed for
> > many releases now.  The only problem is to rip out the code that
> > re-attached to shared memory and stuff like that, because you will no
> > longer loose the shared memory in the exec().  The IPC code is
> > complicated, so good luck.  I or others can help if you get stuck.
> >
>
> Another item is to no longer use SYSV shared memory but use
> mmap(MAP_ANON) because this allows a much larger amount of shared memory
> to be used.

What are the portability issues?  I haven't written much portable
code, and certainly not with IPC.

Re: [HACKERS] removing the exec() from doexec()

From
Bruce Momjian
Date:
>
> On Wed, 29 April 1998, at 21:53:36, Bruce Momjian wrote:
>
> > > This exec() takes 15% of our startup time.  I have wanted it removed for
> > > many releases now.  The only problem is to rip out the code that
> > > re-attached to shared memory and stuff like that, because you will no
> > > longer loose the shared memory in the exec().  The IPC code is
> > > complicated, so good luck.  I or others can help if you get stuck.
> > >
> >
> > Another item is to no longer use SYSV shared memory but use
> > mmap(MAP_ANON) because this allows a much larger amount of shared memory
> > to be used.
>
> What are the portability issues?  I haven't written much portable
> code, and certainly not with IPC.

Not sure.  mmap() is pretty portable.  We will shake out any portability
issues as we go, or you can ask the list if everyone has such-and-such a
function.


--
Bruce Momjian                          |  830 Blythe Avenue
maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)