X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id AE32DD1B57A for ; Mon, 27 Oct 2003 16:06:45 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 74231-04 for ; Mon, 27 Oct 2003 12:06:13 -0400 (AST) Received: from lorax.kcilink.com (lorax.kciLink.com [206.112.95.1]) by svr1.postgresql.org (Postfix) with ESMTP id 1DECDD1B538 for ; Mon, 27 Oct 2003 12:06:13 -0400 (AST) Received: from localhost (localhost [127.0.0.1]) by lorax.kcilink.com (Postfix) with ESMTP id 972583E29 for ; Mon, 27 Oct 2003 11:06:12 -0500 (EST) Received: from lorax.kcilink.com ([127.0.0.1]) by localhost (lorax.kcilink.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 31908-03-6 for ; Mon, 27 Oct 2003 11:06:12 -0500 (EST) Received: from lorax.kciLink.com (localhost [127.0.0.1]) by lorax.kcilink.com (Postfix) with ESMTP id DB0E63E24 for ; Mon, 27 Oct 2003 11:06:11 -0500 (EST) Received: (from news@localhost) by lorax.kciLink.com (8.12.8p1/8.12.8/Submit) id h9RG6BtZ075429 for pgsql-performance@postgresql.org; Mon, 27 Oct 2003 11:06:11 -0500 (EST) To: pgsql-performance@postgresql.org Path: not-for-mail From: Vivek Khera Newsgroups: ml.postgres.performance Subject: Re: My own performance/tuning q&a Date: Mon, 27 Oct 2003 11:06:11 -0500 Organization: Khera Communications, Inc., Rockville, MD Lines: 63 Message-ID: References: <16281.22423.26659.54130@yertle.int.kciLink.com> <200310242050.h9OKoYX22829@candle.pha.pa.us> <6.0.0.22.0.20031024194443.024306b8@pop.hotpop.com> NNTP-Posting-Host: yertle.kcilink.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: lorax.kcilink.com 1067270771 84809 216.194.193.105 (27 Oct 2003 16:06:11 GMT) X-Complaints-To: daemon@kciLink.com NNTP-Posting-Date: Mon, 27 Oct 2003 16:06:11 +0000 (UTC) User-Agent: Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.4 (Portable Code, berkeley-unix) Cancel-Lock: sha1:fkTT76x2oCjQPkLm+SLbpPB6M7E= X-Virus-Scanned: by amavisd-new at kciLink.com X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/675 X-Sequence-Number: 4423 >>>>> "AL" == Allen Landsidel 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 Subject: Re: go for a script! / ex: PostgreSQL vs. MySQL Newsgroups: ml.postgres.performance To: Vivek Khera 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/