Re: Shared Memory Sizing
От | Curt Sampson |
---|---|
Тема | Re: Shared Memory Sizing |
Дата | |
Msg-id | Pine.NEB.4.43.0206271241300.6613-100000@angelic.cynic.net обсуждение исходный текст |
Ответ на | Re: Shared Memory Sizing (Bruce Momjian <pgman@candle.pha.pa.us>) |
Список | pgsql-general |
On Wed, 26 Jun 2002, Bruce Momjian wrote: > I advise in my hardware tuning guide that it be increased until paging > starts, then reduce it, and start around 25%. Is that OK? I don't think that's optimal. The general gist is that if the OS has as much free memory as postgres has shared memory used for buffering, it's going to be buffering pretty much all the data that posgres is. So every block that postgres holds is using 8K of memory that the OS could use to cache a different block. Now it's a bit more subtle than this in that copying a buffer between postgres's shared memory and OS memory also has a cost, and we should try to minimize that. But still, that's a lot cheaper than moving a buffer between memory and disk. This sort of thing is one of the main reasons I like the idea of moving to mmap for data files; it gets rid of both the double buffering and the copying back-and-forth. (And even if you do end up copying, you still save the kernel/userland transition, which is also a little bit expensive.) 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 по дате отправления: