Re: My own performance/tuning q&a

Поиск
Список
Период
Сортировка
От Vivek Khera
Тема Re: My own performance/tuning q&a
Дата
Msg-id x7llr6vf64.fsf@yertle.int.kciLink.com
обсуждение исходный текст
Ответ на Re: My own performance/tuning q&a  (Vivek Khera <khera@kcilink.com>)
Список pgsql-performance
>>>>> "AL" == Allen Landsidel <all@biosys.net> writes:

>> you need to bump some header file constant and rebuild the kernel.  it
>> also increases the granularity of how the buffer cache is used, so I'm
>> not sure how it affects overall system.  nothing like an experiment...

AL> So far I've found a whole lot of questions about this, but nothing
AL> about the constant.  The sysctl (vfs.hibufspace I believe is the one)
AL> is read only, although I should be able to work around that via
AL> /boot/loader.conf if I can't find the kernel option.

Here's what I have in my personal archive.  I have not tried it yet.
BKVASIZE is in a system header file, so is not a regular "tunable" for
a kernel.  That is, you must muck with the source files to change it,
which make for maintenance headaches.



From: Sean Chittenden <sean@chittenden.org>
Subject: Re: go for a script! / ex:  PostgreSQL vs. MySQL
Newsgroups: ml.postgres.performance
To: Vivek Khera <khera@kcilink.com>
Cc: pgsql-performance@postgresql.org
Date: Mon, 13 Oct 2003 12:04:46 -0700
Organization: none

> >> echo "effective_cache_size = $((`sysctl -n vfs.hibufspace` / 8192))"
> >>
> >> I've used it for my dedicated servers.  Is this calculation correct?
>
> SC> Yes, or it's real close at least.  vfs.hibufspace is the amount
> of SC> kernel space that's used for caching IO operations (minus the
>
> I'm just curious if anyone has a tip to increase the amount of
> memory FreeBSD will use for the cache?

Recompile your kernel with BKVASIZE set to 4 times its current value
and double your nbuf size.  According to Bruce Evans:

"Actually there is a way: the vfs_maxbufspace gives the amount of
space reserved for buffer kva (= nbuf * BKVASIZE).  nbuf is easy to
recover from this, and the buffer kva space may be what is wanted
anyway."
[snip]
"I've never found setting nbuf useful, however.  I want most
parametrized sizes including nbuf to scale with resource sizes, and
it's only with RAM sizes of similar sizes to the total virtual address
size that its hard to get things to fit.  I haven't hit this problem
myself since my largest machine has only 1GB.  I use an nbuf of
something like twice the default one, and a BKVASIZE of 4 times the
default.  vfs.maxbufspace ends up at 445MB on the machine with 1GB, so
it is maxed out now."

YMMV.

-sc


--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Ph.D.                Khera Communications, Inc.
Internet: khera@kciLink.com       Rockville, MD       +1-240-453-8497
AIM: vivekkhera Y!: vivek_khera   http://www.khera.org/~vivek/

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

Предыдущее
От: Vivek Khera
Дата:
Сообщение: Re: My own performance/tuning q&a
Следующее
От: Neil Conway
Дата:
Сообщение: Re: My own performance/tuning q&a