From owner-freebsd-stable@FreeBSD.ORG Tue Jan 3 08:23:36 2012 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 73BC71065677; Tue, 3 Jan 2012 08:23:36 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-tul01m020-f182.google.com (mail-tul01m020-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 242568FC1E; Tue, 3 Jan 2012 08:23:36 +0000 (UTC) Received: by obbwd18 with SMTP id wd18so18299192obb.13 for ; Tue, 03 Jan 2012 00:23:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=CuG5Cny+V3JlyGvEpdWBXJdQXSF5aHjzllRde105hlQ=; b=rgotT+IINh7F/Xg5P9X4LgtUrZIdwxOCQCBlTduK0dZi6QEJTTtuwLfRFXmKMQR8tm AvEvIBLwaKrGoPZcHa903koLiRsdyrb+lBahaaGfAv7b3Q1XQe+SGmYKfZ639YMeTXU+ SyKxZyNMDbA4PrCrpOkGjmuDEkslwYfONS6xM= MIME-Version: 1.0 Received: by 10.182.1.8 with SMTP id 8mr43798030obi.11.1325579015818; Tue, 03 Jan 2012 00:23:35 -0800 (PST) Received: by 10.182.152.6 with HTTP; Tue, 3 Jan 2012 00:23:35 -0800 (PST) In-Reply-To: <20120103080515.GA36252@equilibrium.bsdes.net> References: <20120102122549.GB17398@equilibrium.bsdes.net> <20120102125929.GA89966@icarus.home.lan> <20120102134150.GC17398@equilibrium.bsdes.net> <20120103080515.GA36252@equilibrium.bsdes.net> Date: Tue, 3 Jan 2012 00:23:35 -0800 Message-ID: From: Garrett Cooper To: Victor Balada Diaz Content-Type: text/plain; charset=ISO-8859-1 Cc: Artem Belevich , freebsd-stable@freebsd.org, Jeremy Chadwick Subject: Re: Performance problems with pagedaemon X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jan 2012 08:23:36 -0000 On Tue, Jan 3, 2012 at 12:05 AM, Victor Balada Diaz wrote: > On Mon, Jan 02, 2012 at 10:17:11AM -0800, Artem Belevich wrote: >> On Mon, Jan 2, 2012 at 5:41 AM, Victor Balada Diaz wrote: >> >> Mysql uses more than 20G of RAM. You may want to tune it down a bit so >> that there is a bit of free RAM around. >> >> Page daemon is trying to maintain v_free_target + v_cache_min. >> >> >vm.v_free_target: 161771 >> >vm.v_cache_min: 161771 >> >> In your case that would be about 1.2GB. If 'v_free_count + >> v_cache_count' are below that page daemon will periodically wake up >> and will start scanning active/inactive lists trying to find the pages >> it could use. In your case, when most of the memory is in active use, >> page daemon's job will be almost pointless and would just waste CPU >> time. >> >> On large memory systems default tuning for v_free/cache_min/target is >> probably somewhat conservative. You may try setting them somewhat >> lower via sysctl and see if you can find an equilibrium with mysql >> happy, pagedaemon sleeping and the system up and running. The danger >> of tuning these parameters too low is that is you don't have enough >> memory available for allocation without having to sleep, things will >> start falling apart and will eventually hang or crash your box. > > That was the problem. Thanks a lot! > > Is there any place or documentation about how to properly tune the VM? None > of the sysctls you mentioned have description or appear to be in any man > page. They probably should be mentioned in tuning(7). Thanks, -Garrett