linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pete <pete@petezilla.co.uk>
To: linux-btrfs@vger.kernel.org
Subject: Re: unclean shutdown and space cache rebuild
Date: Sun, 30 Jun 2013 20:58:58 +0100	[thread overview]
Message-ID: <51D08E02.3030406@petezilla.co.uk> (raw)
In-Reply-To: <4774295.3Q3X7zsTmb@vfr>

On 06/30/2013 06:53 PM, Garry T. Williams wrote:
> On 6-30-13 19:26:16 Shridhar Daithankar wrote:
>> Whenever there is a unclean shutdown(which happens a lot in my
>> case), the next reboot, system comes up relatively at the same speed
>> but as systemd is starting up daemons, the disk is continuously (and
>> unusally long) grinding.
>

>> I am running archlinux/systemd/kde
>
> I suspect this is, at least in part, related to severe fragmentation
> in /home.
>

I'm wondering if this is affecting myself.  I have a big issue with my 
data drive slowing down and there being near long periods of high disk 
IO that prevent me doing anything else.  I've noticed from iotop various 
btrfs processes hogging the IO for long periods, e.g. 
btrfs-transacti... & btrfs-submit

I've been running kde which has got unusable (not from reboot, but in 
general).  xfce is less hampered but IO still seems like an issue at 
times.  Of course, xfce hits different files.  I've been using this file 
system a couple of months and not defragged before.  I started 
defragging the various subvolumes a week or two ago - but I did not 
realise this was not recursive until this weekend.  I've got a python 
script running defrag on various files and folders - I can better track 
what it is defragging.  But it is _slow_ many many minutes for a rarely 
accessed folder with little content.  Is this normal?

I too had an issue with unclean shutdowns.  I, relatively infrequently, 
get lockups.  However, I had a spate last week which I have yet to 
resolve.  I wonder if that is related.

I wonder, if I defrag everything on say a weekly basis then will these 
performance issues go away?  Running a 3.9.3 kernel.

Pete



> There are large files in these directories that are updated frequently
> by various components of KDE and the Chrome browser.  (Firefox has its
> own databases that are frequently updated, too.)
>
>      ~/.local/share/akonadi
>      ~/.kde/share/apps/nepomuk/repository/main/data/virtuosobackend
>      ~/.cache/chromium/Default/Cache
>      ~/.cache/chromium/Default/Media\ Cache
>
> I improved performance dramatically (orders of magnitude) by copying
> the database files into an empty file that was modified with:
>
>      chattr -C
>
> and renaming to make the files no COW.  (Note that this is the only
> way to change an existing file to no COW.)  I also set the same
> attribute on the owning directories so that all new files inherit the
> no COW attribute.
>
> I suspect there are other files that fragment badly since I see
> periods of high disk activity coming back slowly over a few weeks of
> use after making the modifications above.  I intend to track them down
> and do the same.
>
> Also, see these:
>
>      https://btrfs.wiki.kernel.org/index.php/Problem_FAQ#Defragmenting_a_directory_doesn.27t_work
>      https://btrfs.wiki.kernel.org/index.php/UseCases#How_do_I_defragment_many_files.3F
>
>      $ uname -r
>      3.9.6-200.fc18.x86_64
>      $
>


  reply	other threads:[~2013-06-30 20:04 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-30 13:56 unclean shutdown and space cache rebuild Shridhar Daithankar
2013-06-30 17:53 ` Garry T. Williams
2013-06-30 19:58   ` Pete [this message]
2013-06-30 20:10   ` Clemens Eisserer
2013-06-30 21:20   ` Duncan
2013-06-30 23:12   ` Roger Binns
2013-07-01  2:50   ` Shridhar Daithankar
2013-07-01  9:10     ` Duncan
2013-07-01 16:19       ` Shridhar Daithankar
2013-07-02 13:00         ` Duncan
2013-07-02 15:49           ` Shridhar Daithankar
2013-07-05  3:45             ` Shridhar Daithankar

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=51D08E02.3030406@petezilla.co.uk \
    --to=pete@petezilla.co.uk \
    --cc=linux-btrfs@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).