From: Matthias Schniedermeyer <ms@citd.de>
To: Bernhard Schrader <bernhard.schrader@innogames.de>
Cc: xfs@oss.sgi.com
Subject: Re: Problems with filesizes on different Kernels
Date: Fri, 17 Feb 2012 13:33:35 +0100 [thread overview]
Message-ID: <20120217123335.GA9671@citd.de> (raw)
In-Reply-To: <4F3E3F5A.9000202@innogames.de>
On 17.02.2012 12:51, Bernhard Schrader wrote:
> Hi all,
>
> we just discovered a problem, which I think is related to XFS. Well,
> I will try to explain.
>
> The environment i am working with are around 300 Postgres databases
> in separated VM's. All are running with XFS. Differences are just in
> kernel versions.
> - 2.6.18
> - 2.6.39
> - 3.1.4
>
> Some days ago i discovered that the file nodes of my postgresql
> tables have strange sizes. They are located in
> /var/lib/postgresql/9.0/main/base/[databaseid]/
> If I execute the following commands i get results like this:
>
> Command: du -sh | tr "\n" " "; du --apparent-size -h
> Result: 6.6G . 5.7G .
Since a few kernel-version XFS does speculative preallocations, which is
primarily a measure to prevent fragmentation.
The preallocations should go away when you drop the caches.
sync
echo 3 > /proc/sys/vm/drop_caches
XFS can be prevented to do that with the mount-option "allocsize".
Personally i use "allocsize=64k", since i first encountered that
behaviour, my workload primarily consists of single-thread writing which
doesn't benefit from this preallocation.
Your workload OTOH may benefit as it should prevent/lower the
fragmentation of the database files.
Bis denn
--
Real Programmers consider "what you see is what you get" to be just as
bad a concept in Text Editors as it is in women. No, the Real Programmer
wants a "you asked for it, you got it" text editor -- complicated,
cryptic, powerful, unforgiving, dangerous.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2012-02-17 12:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-17 11:51 Problems with filesizes on different Kernels Bernhard Schrader
2012-02-17 12:33 ` Matthias Schniedermeyer [this message]
2012-02-20 8:41 ` Bernhard Schrader
2012-02-20 11:06 ` Matthias Schniedermeyer
2012-02-20 12:06 ` Bernhard Schrader
2012-02-27 8:23 ` Bernhard Schrader
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120217123335.GA9671@citd.de \
--to=ms@citd.de \
--cc=bernhard.schrader@innogames.de \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox