public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: "Carlos R. Mafra" <crmafra2@gmail.com>
To: Ravi Pinjala <ravi@p-static.net>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: btrfs write behavior on idle system
Date: Mon, 18 Jan 2010 20:36:37 +0100	[thread overview]
Message-ID: <20100118193637.GB5367@Pilar.aei.mpg.de> (raw)
In-Reply-To: <4B54A513.7060902@p-static.net>

On Mo 18.Jan'10 at 12:14:43 -0600, Ravi Pinjala wrote:
> On 01/18/10 11:17, Carlos R. Mafra wrote:
> >Hi everyone,
> >
> >I am using btrfs for my /home partition since I upgraded my slow
> >laptop hdd for an ssd 3 weeks ago. I am always in sync with Linus'
> >tree of the day (plus a btrfs patch which is not in there yet) and
> >so far I haven't lost any data, so all is good.
> >
> >I have a question about the write behavior of the various [btrfs- ]
> >kernel threads, as I've been monitoring what is writing to the ssd
> >just in case.
> >
> >So what I've been observing with 'iostat', 'iotop' and 'blktrace'
> >is the following. If my laptop is almost absolutely idle (just
> >a plain Window Maker and a few xterms and a couple dockapps open)
> >there is nothing writing to the disk (which is OK).
> >
> >But as soon as I leave an open tab in chrome (or firefox) the various
> >[btrfs- ] threads start writing in my /home, and I don't know what.
> >For testing purposes, I mounted the config dir of chrome (~/.config/google-chrome)
> >in my SD card (at /dev/mmcblk0p1) to exclude the possibility of maybe chrome
> >trying to update its history or something, so that it does not write
> >anything in my /home partition with btrfs.
> >
> >But I see this in the output of 'iotop' from a 60 sec interval, showing
> >only the processes which wrote something:
> >
> >Total DISK READ: 0 B/s | Total DISK WRITE: 10.26 K/s
> >   PID USER      DISK READ  DISK WRITE   SWAPIN    IO    COMMAND
> >   485 root           0 B/s    5.19 K/s  0.00 %  0.02 % [btrfs-transacti]
> >  3792 root           0 B/s       0 B/s  0.00 %  0.01 % [flush-btrfs-1]
> >   476 root           0 B/s    0.13 K/s  0.00 %  0.00 % [btrfs-delalloc-]
> >   481 root           0 B/s    4.93 K/s  0.00 %  0.00 % [btrfs-endio-wri]
> >
> >and there are more instances like this. Is there a way to avoid (or reduce)
> >the writings of these threads?
> >
> >And when I start opening some pages in chrome and use it some more I
> >get many many writes on my /home partition from these threads (and swapper,
> >see below) even though I mounted the .config/google-chrome dir under
> >/dev/mmcblk0p1 which uses ext4.
> >
> >>From another experiment where chrome was showing a blank tab a ~7 minutes
> >run of 'blktrace -a write /dev/sda3' (sda3 is my /home) ends like this
> >(from 'blkparse -s sda3.blktrace.0'):
> >
> - snip -
> 
> Don't forget cache - should be under ~/.cache/google-chrome. That
> would probably explain the disk activity you're seeing.

Oh my... what a shame! That was it; I moved it to the SD card and
now my ssd is not suffering anymore.

Thanks a lot Ravi!


  reply	other threads:[~2010-01-18 19:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-18 17:17 btrfs write behavior on idle system Carlos R. Mafra
2010-01-18 17:35 ` Carlos R. Mafra
2010-01-18 18:14 ` Ravi Pinjala
2010-01-18 19:36   ` Carlos R. Mafra [this message]
2010-01-20 21:29     ` Chris Mason

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=20100118193637.GB5367@Pilar.aei.mpg.de \
    --to=crmafra2@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=ravi@p-static.net \
    /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