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

From: Sean Chittenden <sean(at)chittenden(dot)org>
To: Vivek Khera <khera(at)kcilink(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: go for a script! / ex: PostgreSQL vs. MySQL
Date: 2003-10-13 19:04:46
Message-ID: 20031013190446.GA72842@perrin.nxad.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-performance

> >> 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

--
Sean Chittenden

In response to

Browse pgsql-general by date

  From Date Subject
Next Message darren 2003-10-13 19:09:32 Re: Create Function... ERROR: language "plpgsql" does
Previous Message Jan Wieck 2003-10-13 18:56:47 Re: "slicing" records

Browse pgsql-performance by date

  From Date Subject
Next Message Sean Chittenden 2003-10-13 19:10:23 Re: go for a script! / ex: PostgreSQL vs. MySQL
Previous Message David Griffiths 2003-10-13 19:04:18 Re: Another weird one with an UPDATE