Thread

  1. shmem/mmap Q

    Goran Thyni <goran@bildbasen.se> — 1998-02-12T19:44:05Z

    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?
    
           regards,
    -- 
    ---------------------------------------------
    Gran Thyni, sysadm, JMS Bildbasen, Kiruna
    
    
    
  2. Re: [HACKERS] shmem/mmap Q

    Bruce Momjian <maillist@candle.pha.pa.us> — 1998-02-12T21:14:19Z

    > 
    > 
    > 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