>> - Could we use mmap:ing of files at a higher level then
>>   src/backend/strorage/ipc/ipc.c to get even better performance
>>   and cleaness?
>
>Yes, we could use mmap() to map the actual files.  I will post time
>timings on this soon.

I do not think this will be a practicable solution, since it would mean the whole db 
has to mmap'ed. This means there has to be enough virtual memory to hold
the complete database, or at least one table at a time. Or do I understand this wrong ??

Andreas


Thu, 14 May 1998 11:27:51 +0200
Andreas Zeugswetter <andreas.zeugswetter@telecom.at>
AW: [HACKERS] mmap and MAP_ANON
> 
> >> - Could we use mmap:ing of files at a higher level then
> >>   src/backend/strorage/ipc/ipc.c to get even better performance
> >>   and cleaness?
> >
> >Yes, we could use mmap() to map the actual files.  I will post time
> >timings on this soon.
> 
> I do not think this will be a practicable solution, since it would mean the whole db 
> has to mmap'ed. This means there has to be enough virtual memory to hold
> the complete database, or at least one table at a time. Or do I understand this wrong ??

We can map parts of the table, even in 8k chunks.  However, looking at
my sequential scan timing tests, it would be slower.

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

Thu, 14 May 1998 10:55:34 -0400 (EDT)
Bruce Momjian <maillist@candle.pha.pa.us>
Re: AW: [HACKERS] mmap and MAP_ANON
Andreas Zeugswetter wrote:
> 
> >> - Could we use mmap:ing of files at a higher level then
> >>   src/backend/strorage/ipc/ipc.c to get even better performance
> >>   and cleaness?
> >
> >Yes, we could use mmap() to map the actual files.  I will post time
> >timings on this soon.
> 
> I do not think this will be a practicable solution, since it would mean the whole db
> has to mmap'ed. This means there has to be enough virtual memory to hold
> the complete database, or at least one table at a time. Or do I understand this wrong ??

Why would we map the whole database or even a whole table?
You can map the section of a file you are interested in.

# man mmap

Besides a sensible memory manager does not actually map the pages
until they are access, unfort. not all OSes are sensible.


-- 
---------------------------------------------
Gï¿½ran Thyni, sysadm, JMS Bildbasen, Kiruna

Thu, 14 May 1998 17:25:10 +0200
"G���ran Thyni" <goran@bildbasen.se>
Re: AW: [HACKERS] mmap and MAP_ANON