Re: "Leaking" disk space on FreeBSD servers

From: Vick Khera <vivek(at)khera(dot)org>
To: Dan Thomas <godders(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: "Leaking" disk space on FreeBSD servers
Date: 2013-03-20 14:11:58
Message-ID: CALd+dccaig0A9htvApoGYKHQ7TF9vr26d7qPaULRpPegvaFnZQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Mar 20, 2013 at 7:49 AM, Dan Thomas <godders(at)gmail(dot)com> wrote:

> Not all of our servers are leaking space, it's only the more
> recently-installed systems. Here's a quick breakdown of versions:
>

FWIW, I do not observe this behavior. My database has very heavy write
load, and old data is purged after it is aged about 7 months, so I do get
lots of fragmentation. However, I do not have any disk space "phantom" loss.

How long does it take for you to accumulate this "leak"? My first instinct
is that you have unlinked files still referenced by some application. That
is really the only way you get these discrepancies. lsof *should* have
showed them to you. Try fstat in case there's some bug in lsof.

Also, your tunefs output seems to be not from FreeBSD 9.1. Specifically, it
is not emitting this line:

tunefs: soft update journaling: (-j) disabled

It is a very useful option to turn on for large file systems. I can recover
a 6TB file system in about 5 seconds on a crash reboot with that on.

[root(at)d04]# ps axuw34214
USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND
pgsql 34214 0.0 0.5 5426964 154484 0- S 28Feb13 1:30.66
/usr/local/bin/postgres -D /u/data/postgres
[root(at)d04]# df -h /u/data
Filesystem Size Used Avail Capacity Mounted on
/dev/ufs/ramdisk 707G 137G 513G 21% /u/data
[root(at)d04]# du -sh /u/data
137G /u/data
[root(at)d04]# uname -a
FreeBSD d04.m1e.net 9.1-RELEASE FreeBSD 9.1-RELEASE #1 r243808: Mon Dec 3
09:56:27 EST 2012
vivek(at)lorax(dot)kcilink(dot)com:/usr/obj/u/lorax1/usr9/src/sys/KCI64
amd64
[root(at)d04]# uptime
9:50AM up 74 days, 17:36, 1 user, load averages: 0.21, 0.18, 0.17
[root(at)d04]# psql --version
psql (PostgreSQL) 9.2.3
[root(at)d04]#

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Vick Khera 2013-03-20 14:14:46 Re: File Fragmentation
Previous Message jg 2013-03-20 13:53:39 Re: File Fragmentation