Re: memory strangeness (fwd)

Поиск
Список
Период
Сортировка
От Tim Ellis
Тема Re: memory strangeness (fwd)
Дата
Msg-id 20020709101947.3bd8e3d0.Tim.Ellis@gamet.com
обсуждение исходный текст
Ответ на Re: memory strangeness (fwd)  (Curt Sampson <cjs@cynic.net>)
Ответы Re: memory strangeness (fwd)
Список pgsql-admin
> > 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.

A very diplomatic way to say: "Essentially you are hallucinating" :)

I've always been a proponent of letting the OS do what it does best, so
this letting-the-OS-buffer-for-you concept, to me, is very appealing.

You still must know when the OS-buffered data has truly made it to disk
while not needing to submit lots of sync() calls. Part of that nasty
requirement that databases should guarantee data consistency and
integrity, while still performing well...

--
Tim Ellis
DBA, Gamet

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

Предыдущее
От: Auri Mason
Дата:
Сообщение: TEST, ignore this, plz
Следующее
От: becks@ultraviolence.org (becks)
Дата:
Сообщение: disk space