Re: Linux max on shared buffers?

Поиск
Список
Период
Сортировка
От Curt Sampson
Тема Re: Linux max on shared buffers?
Дата
Msg-id Pine.NEB.4.44.0207231114130.497-100000@angelic.cynic.net
обсуждение исходный текст
Ответ на Re: Linux max on shared buffers?  (Jan Wieck <JanWieck@Yahoo.com>)
Список pgsql-general
On Mon, 22 Jul 2002, Jan Wieck wrote:

> I have some more wrinkles to iron out as well. We can hold blocks of
> hundreds of different files in our buffer cache without the need to keep
> an open file descriptor...

As you can with mmap as well. The mapping remains after the file
descriptor is closed.

> In a complicated schema where you cannot keep all files open anymore...

You can keep just as many files open when you use mmap as you can with
the current scheme. The limit is the number of file descriptors you have
available.

> ...access to your kernel buffered blocks requires open(), mmap(), munmap()
> and close() then? Four system calls to get access to a cached block
> where we get away with a TAS today?

If you leave the block mapped, you do not need to do any of that. Your
limit on the number of mapped blocks is basically just the limit on
address space. So it would not be unreasonable to have your "cache" of
mappings be, say, a gigabyte in size. On systems which normally allocate
less shared memory than that, this would mean you would actually make
fewer syscalls than you would with shared memory.

cjs
--
Curt Sampson  <cjs@cynic.net>   +81 90 7737 2974   http://www.netbsd.org
    Don't you know, in this new Dark Age, we're all light.  --XTC


В списке pgsql-general по дате отправления:

Предыдущее
От: Darren Ferguson
Дата:
Сообщение: Re: Access Two Databases
Следующее
От: Josh Jore
Дата:
Сообщение: Re: Access Two Databases