Re: "Leaking" disk space on FreeBSD servers

From: Shaun Thomas <sthomas(at)optionshouse(dot)com>
To: Kevin Grittner <kgrittn(at)ymail(dot)com>
Cc: Dan Thomas <godders(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: "Leaking" disk space on FreeBSD servers
Date: 2013-03-20 18:49:58
Message-ID: 514A04D6.1020600@optionshouse.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 03/20/2013 01:25 PM, Kevin Grittner wrote:

> I saw something once which *might* be related. I don't recall the
> OS of FS involved, but in an attempt to reduce the fragmentation of
> files which started small and eventually grew large, a large
> allocation of contiguous space was made on file creation, and that
> space was not release as long as any page for the file remained in
> the OS cache.

That was an optimization decision made for XFS in recent kernels, and
the chunks it grabs are very, very large. We had to reduce the default
allocation size to 1MB to disable the elastic allocation system. In the
end, we regained about 50GB of "phantom" space after a re-mount, and
it's stayed that way since.

But that's what du --apparent-size is for. :)

--
Shaun Thomas
OptionsHouse | 141 W. Jackson Blvd. | Suite 500 | Chicago IL, 60604
312-676-8870
sthomas(at)optionshouse(dot)com

______________________________________________

See http://www.peak6.com/email_disclaimer/ for terms and conditions related to this email

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David Rees 2013-03-20 19:37:37 Can't terminate hung COPY
Previous Message Kevin Grittner 2013-03-20 18:25:46 Re: "Leaking" disk space on FreeBSD servers