From owner-freebsd-stable@FreeBSD.ORG Thu Nov 23 10:02:15 2006 Return-Path: X-Original-To: stable@freebsd.org Delivered-To: freebsd-stable@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4826116A403 for ; Thu, 23 Nov 2006 10:02:15 +0000 (UTC) (envelope-from uspoerlein@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.170]) by mx1.FreeBSD.org (Postfix) with ESMTP id 94F6343D58 for ; Thu, 23 Nov 2006 10:01:40 +0000 (GMT) (envelope-from uspoerlein@gmail.com) Received: by ug-out-1314.google.com with SMTP id o2so340116uge for ; Thu, 23 Nov 2006 02:02:12 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=cmP1hlZ+5WUWUFE8BzBhZbLKE7AwVDaCEPBph1EMpxZ1zb26S5mWWQriuoGLRwSjK53XDOXr2ymwOJx+BVU1guWyBRop5o6O3QuDT13Gy0HvIaek4CF4wRuqOcfOiVwa/0SCjS3D+OlNE92pfmT0Zo0ObzE9WMVjTBm9zD/gp4c= Received: by 10.78.185.15 with SMTP id i15mr4928109huf.1164276132616; Thu, 23 Nov 2006 02:02:12 -0800 (PST) Received: by 10.78.155.3 with HTTP; Thu, 23 Nov 2006 02:02:12 -0800 (PST) Message-ID: <7ad7ddd90611230202kea1d4e8s697702c9843f6c91@mail.gmail.com> Date: Thu, 23 Nov 2006 11:02:12 +0100 From: "Ulrich Spoerlein" To: stable@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Cc: Subject: geom/gstat diplay bug? 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: Thu, 23 Nov 2006 10:02:15 -0000 Hi all, one of our servers running FreeBSD 5.5 was seriously swapping (1.9GB of 2GB swap used) and to see the performance of the ad0s1b device, I fired up gstat. This is the current output (it has stopped swapping) dT: 0.510 flag_I 500000us sizeof 240 i -1 L(q) ops/s r/s kBps ms/r w/s kBps ms/w %busy Name 0 31 0 0 0.0 31 255 0.4 1.3| ad0 0 31 0 0 0.0 31 255 0.4 1.3| ad0s1 1 49 0 0 0.0 49 6274 4.5 22.7| ad2 0 0 0 0 0.0 0 0 0.0 0.0| ad0s1a 4294967287 0 0 0 0.0 0 0 0.0 0.0| ad0s1b 0 0 0 0 0.0 0 0 0.0 0.0| ad0s1c 0 0 0 0 0.0 0 0 0.0 0.0| ad0s1d 0 31 0 0 0.0 31 255 0.5 1.4| ad0s1e ... There are two possible explanations, AFAICT: a) This is a dual CPU machine, so the L(q)++ and L(q)-- operations were not strictly atomic, causing the counter to go -1. b) or, the L(q) is computed by some addition/multiplication (doubtful) and since the queue length was very, very long we got a integer overflow. Interesting thing is, that gstate decodes the queue length as an uint64_t value. Ah, I see now, that L(q) is computed by end_count - start_count of struct devstat. Of course, I had lots of "swap_pager_getswapspace(9): failed" errors on the console, as the system was running out of swap space. Are these transactions somehow counted wrong? Uli