Re: Tuning for PostGreSQL Database

From: Sean Chittenden (seanc_at_FreeBSD.org)
Date: 07/20/03

  • Next message: Tom Samplonius: "Re: Tuning for PostGreSQL Database"
    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
    
    

    
    




  • Next message: Tom Samplonius: "Re: Tuning for PostGreSQL Database"

    Relevant Pages

    • Re: How to change MAX number of network connections
      ... |> At least some systems also have the sysctl command for making changes ... To view current settings, either just ... |> That'll show which ports are available for connections to remote machines. ...
      (comp.os.linux.networking)
    • Re: How to change MAX number of network connections
      ... >sit and wait for one of them to timeout before it can go on. ... At least some systems also have the sysctl command for making changes ... That'll show which ports are available for connections to remote machines. ... for your distribution on how to automate /proc/sys settings during bootup. ...
      (comp.os.linux.networking)
    • Re: mp3 playback weirdness (system events?)
      ... Florian Liekweg wrote: ... sysctl settings before. ... suggest changing these settings for some multimedai benefits. ... I have the samme problem with mp3 playback, ...
      (comp.unix.bsd.freebsd.misc)
    • Re: Tuning for PostGreSQL Database
      ... >> throughput? ... > Increase your file system cache. ... settings I've played with seem to have no effect; ... Linux: "Where do you want to go tomorrow?" ...
      (freebsd-performance)