Re: Linux max on shared buffers?
От | Jan Wieck |
---|---|
Тема | Re: Linux max on shared buffers? |
Дата | |
Msg-id | 3D382518.CCF54B48@Yahoo.com обсуждение исходный текст |
Ответ на | Re: Linux max on shared buffers? (Curt Sampson <cjs@cynic.net>) |
Ответы |
Re: Linux max on shared buffers?
Re: Linux max on shared buffers? Re: Linux max on shared buffers? |
Список | pgsql-general |
Curt Sampson wrote: > > On Wed, 17 Jul 2002, GB Clark wrote: > > > Not all platforms have mmap. This has been discussed before I belive. > > I've now heard several times here that not all platforms have mmap > and/or mmap is not compatable across all platforms. I've yet to > see any solid evidence of this, however, and I'm inclined to believe > that mmap compatability is no worse than compatability with the > system V shared memory we're using already, since both are fairly > specifically defined by POSIX. Curt, I still don't completely understand what you are proposing. What I understood so far is that you want to avoid double buffering (OS buffer plus SHMEM). Wouldn't that require that the access to a block in the file (table, index, sequence, ...) has to go directly through a mmapped region of that file? Let's create a little test case to discuss. I have two tables, 2 Gigabyte in size each (making 4 segments of 1 GB total) plus a 512 MB index for each. Now I join them in a query, that results in a nestloop doing index scans. On a 32 bit system you cannot mmap both tables plus the indexes at the same time completely. But the access of the execution plan is reading one tables index, fetching the heap tuples from it by random access, and inside of that loop doing the same for the second table. So chances are, that this plan randomly peeks around in the entire 5 Gigabyte, at least you cannot predict which blocks it will need. So far so good. Now what do you map when? Can you map multiple noncontigous 8K blocks out of each file? If so, how do you coordinate that all backends in summary use at maximum the number of blocks you want PostgreSQL to use (each unique block counts, regardless of how many backends have it mmap()'d, right?). And if a backend needs a block and the max is reached already, how does it tell the other backends to unmap something? I assume I am missing something very important here, or I am far off with my theory and the solution looks totally different. So could you please tell me how this is going to work? Jan -- #======================================================================# # It's easier to get forgiveness for being wrong than for being right. # # Let's break this rule - forgive me. # #================================================== JanWieck@Yahoo.com #
В списке pgsql-general по дате отправления: