From owner-freebsd-fs@FreeBSD.ORG Thu May 30 11:00:16 2013 Return-Path: Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 60BC6863 for ; Thu, 30 May 2013 11:00:16 +0000 (UTC) (envelope-from girgen@FreeBSD.org) Received: from melon.pingpong.net (melon.pingpong.net [79.136.116.200]) by mx1.freebsd.org (Postfix) with ESMTP id D9BD3391 for ; Thu, 30 May 2013 11:00:15 +0000 (UTC) Received: from girgBook.local (citron2.pingpong.net [195.178.173.68]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by melon.pingpong.net (Postfix) with ESMTPSA id F36F02C71C; Thu, 30 May 2013 13:00:13 +0200 (CEST) Message-ID: <51A73141.8070908@FreeBSD.org> Date: Thu, 30 May 2013 13:00:17 +0200 From: Palle Girgensohn User-Agent: Postbox 3.0.8 (Macintosh/20130427) MIME-Version: 1.0 To: Kirk McKusick Subject: Re: leaking lots of unreferenced inodes (pg_xlog files?), maybe after moving tables and indexes to tablespace on different volume References: <201303160401.r2G41Um7026132@chez.mckusick.com> <51850E69.5080508@FreeBSD.org> In-Reply-To: <51850E69.5080508@FreeBSD.org> X-Enigmail-Version: 1.2.3 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Cc: freebsd-fs@FreeBSD.org, Dan Thomas , Jeff Roberson , Julian Akehurst X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 May 2013 11:00:16 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, I forward this message from postgresql hackers. Apparently I am not alone. Dan Thomas is experiencing the same problem: - -------- Ursprungligt meddelande -------- Ämne: Re: [HACKERS] leaking lots of unreferenced inodes (pg_xlog files?), maybe after moving tables and indexes to tablespace on different volume Datum: Wed, 13 Mar 2013 15:09:07 +0000 Från: Dan Thomas Till: Magnus Hagander Kopia: PostgreSQL Hackers We're seeing similar behaviour on several of our FreeBSD servers too. It doesn't look like open files, or filesystem snapshots. Rebooting does reset it, but restarting PG makes no difference. We've got an assortment of different versions of both FreeBSD and PostgreSQL, some of which are demonstrating this behaviour, some aren't. Here's a quick breakdown of versions and what we've got running: FreeBSD PostgreSQL Leaking? 8.0 8.4.4 no 8.2 9.0.4 no 8.3 9.1.4 yes 8.3 9.2.3 yes 9.1 9.2.3 yes All of these machines are under similar load patterns and (apart from the version differences), are set up essentially the same and are doing the same job. They all have hot standbys yet this problem doesn't exist on any of the standby servers. We haven't done anything with tablespaces, the database has its own dedicated partition (although pg_log/pg_xlog are both symlinked out to /usr). However (just to throw a spanner in the works) we do have another server running fbsd8.3/pg9.1.4 which ISN'T showing this behaviour - although its load patterns are quite different. I'm not sure if this is going to help, but here's a graph of this disk space disparity over the last few days (Y axis is in gigabytes). The flat-ish part in the middle is the weekend where we have little traffic, so we can at least say it's not constant: http://i.imgur.com/jlbgzNI.png Up until now we've been upgrading things in the hope that the problem will go away, but since we've got one server up to fbsd9.1/pg9.2.3 and still seeing the problem we're a little stumped. Any ideas about how we can go about debugging this would be appreciated. Thanks, Dan On 13 March 2013 07:39, Magnus Hagander wrote: > > On Mar 13, 2013 3:04 AM, "Tom Lane" wrote: >> >> Palle Girgensohn writes: >>> ... I got lots of space freed up, but it seems that after that >>> the disk usage grows linearly (it seems >>> to leave many inodes unreferenced). >> >> Hm. We've seen issues in the past with PG processes failing to >> close no-longer-useful files promptly, but ... >> >>> Strange thing is I cannot find any open files. >> >> ... that suggests there's something else going on. >> >>> The unreferenced inodes are almost exclusively around 16 MB in >>> size, so i.e. they would most probably all be pg_xlog files. >> >> Have you got any sort of WAL archiving active, and if so maybe >> that's holding onto WAL files? Not that it's clear how come lsof >> wouldn't tattle on an archiving process either. >> >>> Stopping postgresql briefly did not help, I tried that. >> >> That seems to point the finger at some non-postgres cause. I >> confess I can't guess what. >> > > Yeah, unreferenced inodes with no open files, and only discoverable > with fsck sounds like a filsystem bug to me. Particularly since it > showed up just > after a operating system upgrade, and doesn't go away with a > postgres restart... > > /Magnus - -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJRpzFBAAoJEIhV+7FrxBJDNyoH/R88rxJbkzhcmuUOKrRE5EJb XJ17PiJZELKp9A3lWklT6tDPRmWqTGNkslMKToT2Rlic7ErzpozVmob4hJaMuzbl Ak2+PDFhS/B3FbyJ4l+33vfVHKkWy7q4mv/nKNO6fjpsdBdWlY38zqVLTU0CDlLl lyv+KEXNbAaGKjcI5bvKjAmjV3jy5Kg3UlOPmyZHAT1Ce9OsxBETlEeSmjD9v9eg wy/o686r2qBuGSvW1hLhrnmNn3TLyKdTPs3Yo91ebhgeX7ecfjEvT1iHszSdKMls nLjX8eYt3JGaYQjxUguwox2qGuOqcc4s4D24ktNFKnvqcbjCRjljTnSiFz7+yRU= =9Gc1 -----END PGP SIGNATURE-----