Re: memory strangeness (fwd)

Поиск
Список
Период
Сортировка
От Curt Sampson
Тема Re: memory strangeness (fwd)
Дата
Msg-id Pine.NEB.4.44.0207091117510.21914-100000@angelic.cynic.net
обсуждение исходный текст
Ответ на Re: memory strangeness (fwd)  (Tim Ellis <Tim.Ellis@gamet.com>)
Ответы Re: memory strangeness (fwd)  (Tim Ellis <Tim.Ellis@gamet.com>)
Список pgsql-admin
On Mon, 8 Jul 2002, Tim Ellis wrote:

> Is there not a method of reading a disk block and instructing the OS not
> to buffer it, or am I hallucinating?

Yes. Read the block from a raw device. Of course, it's up to you to deal
with an filesystem issues or whatever. :-)

FreeBSD also has the O_DIRECT flag, but that's not guaranteed not to
buffer the read. A much smarter way to do this is just to let the OS
deal with the caching, and use the mmap system call to map blocks you
want to modify into your processes' address space. This will also let
you buffer more than 2GB of data, since the number of blocks buffered
will not be limited by the maximum address space of a single process.

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-admin по дате отправления:

Предыдущее
От: Bob Smith
Дата:
Сообщение: Meaning of message in logfile
Следующее
От: Bhuvan A
Дата:
Сообщение: Re: createuser --password