Re: go for a script! / ex: PostgreSQL vs. MySQL

Поиск
Список
Период
Сортировка
От Sean Chittenden
Тема Re: go for a script! / ex: PostgreSQL vs. MySQL
Дата
Msg-id 20031011092308.GA39942@perrin.nxad.com
обсуждение исходный текст
Ответ на Re: go for a script! / ex: PostgreSQL vs. MySQL  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
Ответы Re: go for a script! / ex: PostgreSQL vs. MySQL  (Vivek Khera <khera@kcilink.com>)
Список pgsql-performance
> >NB> shared_buffers = 1/16th of total memory
> >NB> effective_cache_size = 80% of the supposed kernel cache.
>
> I think Sean(?) mentioned this one for FreeBSD (Bash code):

sh, not bash.  :)

> echo "effective_cache_size = $((`sysctl -n vfs.hibufspace` / 8192))"
>
> I've used it for my dedicated servers.  Is this calculation correct?

Yes, or it's real close at least.  vfs.hibufspace is the amount of
kernel space that's used for caching IO operations (minus the
necessary space taken for the kernel).  If you're real paranoid, you
could do some kernel profiling and figure out how much of the cache is
actually disk IO and multiply the above by some percentage, say 80%?
I haven't found it necessary to do so yet.  Since hibufspace is all IO
and caching any net activity is kinda pointless and I assume that 100%
of it is used for a disk cache and don't use a multiplier.  The 8192,
however, is the size of a PG page, so, if you tweak PG's page size,
you have to change this constant (*grumbles*).

-sc

--
Sean Chittenden

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

Предыдущее
От: Christopher Kings-Lynne
Дата:
Сообщение: Re: go for a script! / ex: PostgreSQL vs. MySQL
Следующее
От: "Chris Faulkner"
Дата:
Сообщение: sql performance and cache