From owner-freebsd-questions@FreeBSD.ORG Tue May 17 16:38:08 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C5F4216A4CE for ; Tue, 17 May 2005 16:38:08 +0000 (GMT) Received: from aiolos.otenet.gr (aiolos.otenet.gr [195.170.0.23]) by mx1.FreeBSD.org (Postfix) with ESMTP id C721343D76 for ; Tue, 17 May 2005 16:38:06 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from orion.daedalusnetworks.priv (aris.bedc.ondsl.gr [62.103.39.226])j4HGaKaP001765; Tue, 17 May 2005 19:36:21 +0300 Received: from orion.daedalusnetworks.priv (orion [127.0.0.1]) j4HGbx4I036082; Tue, 17 May 2005 19:37:59 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost)j4HGbxcn036081; Tue, 17 May 2005 19:37:59 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Date: Tue, 17 May 2005 19:37:59 +0300 From: Giorgos Keramidas To: michael luch Message-ID: <20050517163759.GA34091@orion.daedalusnetworks.priv> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: cc: freebsd-questions@FreeBSD.org Subject: Re: buffer cache size X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 May 2005 16:38:08 -0000 On 2005-05-17 16:32, michael luch wrote: > I think that the buffer cache on my system is not growing sufficiently and > wonder if I can I tune it. > > Here's a snippet from the output of top on my system: > > Mem: 646M Active, 2905M Inact, 174M Wired, 121M Cache, 112M Buf, 5460K Free > Swap: 512M Total, 192K Used, 512M Free > > I have a MySQL db that's more than 1GB in size. When I do a SELECT, mysqld > becomes about 25%busy (fair enough, it's waiting for disk). However, I was > expecting to see the Buffer Cache size (that's the 121M Cache I think) > grow, and expected to see subsequent SELECTs cause mysqld become CPU bound, > as data from the database should now be in the buffer cache. However, this > is not the case. I have 2GB of inactive memory, but a small buffer cache > and a disk bound mysqld :( > > Are there some tunables I should look at to allow the buffer cache to grow? > All the searches I did suggested that the vm system should look after this > itself. Inactive pages are a form of cache too (not buffer cache, but page cache, but anyway). The pages on the inactive list are reused as necessary or used as an extension of the page cache (after they have been written to storage if necessary).