Re: Tuning for PostGreSQL Database
From: Sean Chittenden (seanc_at_FreeBSD.org)
Date: 07/20/03
- Previous message: Tom Samplonius: "Re: Tuning for PostGreSQL Database"
- In reply to: Jim C. Nasby: "Re: Tuning for PostGreSQL Database"
- Next in thread: Christopher Weimann: "Re: Tuning for PostGreSQL Database"
- Reply: Christopher Weimann: "Re: Tuning for PostGreSQL Database"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Sun, 20 Jul 2003 13:53:39 -0700 To: "Jim C. Nasby" <jim@nasby.net>
> > > Are there optimal parameters for sizing on the disk
> > > throughput?
> >
> > Increase your file system cache.
>
> How? I've been wondering if there's a way to do this, and all the
> settings I've played with seem to have no effect; it just sits at
> 199BUF according to top.
You might want to get in the habit of using sysctl for getting that
kind of info. `sysctl -d vfs.bufspace`
#!/bin/sh
echo "Max Buffer space == $((`sysctl -n vfs.maxbufspace` / 1024 / 1024))MB"
The sysctl's that are going to be of most interest (in terms of
monitoring) are:
sysctl -a| grep bufspace
However, none of those will let you adjust your buffer size. To do
that, you want to change kern.nbuf in /boot/loader.conf (*grumble*
Undocumented loader option).
kern.maxbcache
Limits the amount of KVM reserved for use by the buffer
cache, specified in bytes. The default maximum is 200MB.
This parameter is used to prevent the buffer cache from
eating too much KVM in large-memory machine configurations.
Only mess around with this parameter if you need to greatly
extend the KVM reservation for other resources such as the
swap zone or NMBCLUSTERS. Note that the NBUF parameter
will override this limit. Modifies VM_BCACHE_SIZE_MAX.
By default, the number of NBUF's on a system is auto sized and takes
up to kern.maxbcache. There was a post by a guy to the performance@
list where he was trying to optimize a 4GB machine for squid and he'd
set it kern.nbuf to 16384 with 512 KVA_PAGES. *shrug* YMMV with this
guy's settings, but:
http://lists.freebsd.org/pipermail/freebsd-performance/2003-June/000262.html
This post in the developers handbook should also be of interest to
most people playing with the NBUF setting:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/x8987.html
I've attached an untested patch that lets you see what your kern.nbufs
are via a sysctl. At the moment, determining what kern.nbuf is set to
is a bit ellusive. If someone with src foo can bless this patch, I'll
commit it.
> Windows: "Where do you want to go today?"
> Linux: "Where do you want to go tomorrow?"
> FreeBSD: "Are you guys coming, or what?"
Cool signature.
-sc
-- Sean Chittenden
- text/plain attachment: patch
- application/pgp-signature attachment: stored
- Previous message: Tom Samplonius: "Re: Tuning for PostGreSQL Database"
- In reply to: Jim C. Nasby: "Re: Tuning for PostGreSQL Database"
- Next in thread: Christopher Weimann: "Re: Tuning for PostGreSQL Database"
- Reply: Christopher Weimann: "Re: Tuning for PostGreSQL Database"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|