All of lore.kernel.org
 help / color / mirror / Atom feed
* curious writes on mounted, not used btrfs filesystem
@ 2011-05-21 12:58 Tomasz Chmielewski
  2011-05-22  9:34 ` Stephane Chazelas
  0 siblings, 1 reply; 5+ messages in thread
From: Tomasz Chmielewski @ 2011-05-21 12:58 UTC (permalink / raw)
  To: linux-btrfs

I have a btrfs filesystem (2.6.39) which is mounted, but otherwise, not used:

# lsof -n|grep /mnt/btrfs
#


I noticed that whenever I do "sync", btrfs will write for around 6.5s and write 13 MB (see below).


If I do a "while true; do sync; done", there will be constant writes to btrfs filesystem (again - with no userspace program accessing btrfs).

When it happens, "btrfs-submit-0" is in "D" state.

What are these writes? I didn't notice anything like this with other filesystems.


$ iostat -t -k 1 sdb4|grep sdb4
Device:            tps    kB_read/s    kB_wrtn/s    kB_read    kB_wrtn

sdb4            320.00         0.00      1660.00          0       1660
sdb4            419.00         0.00      1720.00          0       1720
sdb4            291.00         0.00      1224.00          0       1224
sdb4            417.00         0.00      1736.00          0       1736
sdb4            609.00         0.00      2628.00          0       2628
sdb4            350.00         0.00      1452.00          0       1452
sdb4            606.00         0.00      2620.00          0       2620
sdb4            281.00         0.00      1516.00          0       1516
sdb4            352.00         0.00      1472.00          0       1472
sdb4            384.00         0.00      1584.00          0       1584
sdb4            533.00         0.00      2232.00          0       2232
sdb4            640.00         0.00      2660.00          0       2660


When btrfs is mounted with "compress" flag, there will be also reads when doing a similar operation.



See MB_wrtn before/after the sync:


$ iostat -t -m  sdb4
Linux 2.6.39-020639-generic (dom) 	05/21/2011 	_x86_64_	(8 CPU)

05/21/2011 02:45:46 PM
avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           2.47    0.01    1.25    8.01    0.00   88.26

Device:            tps    MB_read/s    MB_wrtn/s    MB_read    MB_wrtn
sdb4            127.39         0.92         1.94      94207     199343

$ time sync

real	0m6.808s
user	0m0.000s
sys	0m0.110s


$ iostat -t -m  sdb4
Linux 2.6.39-020639-generic (dom) 	05/21/2011 	_x86_64_	(8 CPU)

05/21/2011 02:46:02 PM
avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           2.47    0.01    1.25    8.01    0.00   88.26

Device:            tps    MB_read/s    MB_wrtn/s    MB_read    MB_wrtn
sdb4            127.40         0.92         1.94      94207     199356

$ time sync

real	0m6.628s
user	0m0.000s
sys	0m0.110s

$ iostat -t -m  sdb4
Linux 2.6.39-020639-generic (dom) 	05/21/2011 	_x86_64_	(8 CPU)

05/21/2011 02:46:55 PM
avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           2.47    0.01    1.25    8.01    0.00   88.27

Device:            tps    MB_read/s    MB_wrtn/s    MB_read    MB_wrtn
sdb4            127.37         0.92         1.94      94207     199369



-- 
Tomasz Chmielewski
http://wpkg.org

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: curious writes on mounted, not used btrfs filesystem
  2011-05-21 12:58 curious writes on mounted, not used btrfs filesystem Tomasz Chmielewski
@ 2011-05-22  9:34 ` Stephane Chazelas
  2011-05-22  9:52   ` Tomasz Chmielewski
  2011-05-22 15:21   ` Swâmi Petaramesh
  0 siblings, 2 replies; 5+ messages in thread
From: Stephane Chazelas @ 2011-05-22  9:34 UTC (permalink / raw)
  To: Tomasz Chmielewski; +Cc: linux-btrfs

2011-05-21 14:58:21 +0200, Tomasz Chmielewski:
> I have a btrfs filesystem (2.6.39) which is mounted, but otherwise, not used:
> 
> # lsof -n|grep /mnt/btrfs

processes with open fds are one thing. You could also have loop
devices setup on it for instance.

> #
> 
> 
> I noticed that whenever I do "sync", btrfs will write for around 6.5s and write 13 MB (see below).
[...]

You could try and play with /proc/sys/vm/block_dump to see what
is being written (remember to disable logging of kernel messages
by syslog).

-- 
Stephane

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: curious writes on mounted, not used btrfs filesystem
  2011-05-22  9:34 ` Stephane Chazelas
@ 2011-05-22  9:52   ` Tomasz Chmielewski
  2011-05-22 18:26     ` Stephane Chazelas
  2011-05-22 15:21   ` Swâmi Petaramesh
  1 sibling, 1 reply; 5+ messages in thread
From: Tomasz Chmielewski @ 2011-05-22  9:52 UTC (permalink / raw)
  To: Stephane Chazelas; +Cc: linux-btrfs

On 22.05.2011 11:34, Stephane Chazelas wrote:
> 2011-05-21 14:58:21 +0200, Tomasz Chmielewski:
>> I have a btrfs filesystem (2.6.39) which is mounted, but otherwise, not used:
>>
>> # lsof -n|grep /mnt/btrfs
>
> processes with open fds are one thing. You could also have loop
> devices setup on it for instance.

I know.
It's _not_ used by anything.


>> #
>>
>>
>> I noticed that whenever I do "sync", btrfs will write for around 6.5s and write 13 MB (see below).
> [...]
>
> You could try and play with /proc/sys/vm/block_dump to see what
> is being written (remember to disable logging of kernel messages
> by syslog).

It doesn't give me any hints, really.


Can you try running these commands yourself:

iostat -k 1 </your/btrfs/device>


And in a second terminal:

while true; do sync ; done


To see if your btrfs makes writes on sync each time?


-- 
Tomasz Chmielewski
http://wpkg.org

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: curious writes on mounted, not used btrfs filesystem
  2011-05-22  9:34 ` Stephane Chazelas
  2011-05-22  9:52   ` Tomasz Chmielewski
@ 2011-05-22 15:21   ` Swâmi Petaramesh
  1 sibling, 0 replies; 5+ messages in thread
From: Swâmi Petaramesh @ 2011-05-22 15:21 UTC (permalink / raw)
  To: Stephane Chazelas; +Cc: Tomasz Chmielewski, linux-btrfs

Le dimanche 22 mai 2011 =C3=A0 10:34 +0100, Stephane Chazelas a =C3=A9c=
rit :
> >=20
> > I noticed that whenever I do "sync", btrfs will write for around 6.=
5s and write 13 MB (see below).
> [...]

I had also noticed here, without really paying further attention, that
external USB HDs with a BTRFS mounted, but without any open files (and
no possibly open files, these disks being only used for files backups
and no direct work, no libraries, no spools, no progs, etc...), show
some activity (LED flashing) when executing a "sync" when I would expec=
t
there's nothing to be synced on them...

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" =
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: curious writes on mounted, not used btrfs filesystem
  2011-05-22  9:52   ` Tomasz Chmielewski
@ 2011-05-22 18:26     ` Stephane Chazelas
  0 siblings, 0 replies; 5+ messages in thread
From: Stephane Chazelas @ 2011-05-22 18:26 UTC (permalink / raw)
  To: Tomasz Chmielewski; +Cc: linux-btrfs

2011-05-22 11:52:37 +0200, Tomasz Chmielewski:
[...]
> Can you try running these commands yourself:
> 
> iostat -k 1 </your/btrfs/device>
> 
> 
> And in a second terminal:
> 
> while true; do sync ; done
> 
> 
> To see if your btrfs makes writes on sync each time?
[...]

Yes it does. And I see:

<7>[38554.244219] sync(3354): dirtied inode 1 (?) on dm-11
<7>[38554.244740] btrfs-submit-0(29134): WRITE block 301128 on dm-11 (56 sectors)
<7>[38554.244774] btrfs-submit-0(29134): WRITE block 741832 on dm-11 (56 sectors)
<7>[38554.249963] sync(3354): WRITE block 128 on dm-11 (8 sectors)
<7>[38554.250010] sync(3354): WRITE block 131072 on dm-11 (8 sectors)

<7>[38567.312908] sync(3356): dirtied inode 1 (?) on dm-11
<7>[38567.313330] btrfs-submit-0(29134): WRITE block 301256 on dm-11 (24 sectors)
<7>[38567.313350] btrfs-submit-0(29134): WRITE block 741960 on dm-11 (24 sectors)
<7>[38567.313358] btrfs-submit-0(29134): WRITE block 301288 on dm-11 (24 sectors)
<7>[38567.313366] btrfs-submit-0(29134): WRITE block 741992 on dm-11 (24 sectors)
<7>[38567.313393] btrfs-submit-0(29134): WRITE block 301312 on dm-11 (8 sectors)
<7>[38567.313403] btrfs-submit-0(29134): WRITE block 742016 on dm-11 (8 sectors)
<7>[38567.325194] sync(3356): WRITE block 128 on dm-11 (8 sectors)
<7>[38567.325244] sync(3356): WRITE block 131072 on dm-11 (8 sectors)

<7>[38570.374449] sync(3358): dirtied inode 1 (?) on dm-11
<7>[38570.374976] btrfs-submit-0(29134): WRITE block 301128 on dm-11 (56 sectors)
<7>[38570.375011] btrfs-submit-0(29134): WRITE block 741832 on dm-11 (56 sectors)
<7>[38570.379221] sync(3358): WRITE block 128 on dm-11 (8 sectors)
<7>[38570.379272] sync(3358): WRITE block 131072 on dm-11 (8 sectors)

<7>[38572.170816] sync(3359): dirtied inode 1 (?) on dm-11
<7>[38572.171289] btrfs-submit-0(29134): WRITE block 301256 on dm-11 (24 sectors)
<7>[38572.171300] btrfs-submit-0(29134): WRITE block 741960 on dm-11 (24 sectors)
<7>[38572.171304] btrfs-submit-0(29134): WRITE block 301288 on dm-11 (24 sectors)
<7>[38572.171308] btrfs-submit-0(29134): WRITE block 741992 on dm-11 (24 sectors)
<7>[38572.171320] btrfs-submit-0(29134): WRITE block 301312 on dm-11 (8 sectors)
<7>[38572.171325] btrfs-submit-0(29134): WRITE block 742016 on dm-11 (8 sectors)
<7>[38572.180338] sync(3359): WRITE block 128 on dm-11 (8 sectors)
<7>[38572.180386] sync(3359): WRITE block 131072 on dm-11 (8 sectors)

<7>[38574.186559] sync(3360): dirtied inode 1 (?) on dm-11
<7>[38574.187090] btrfs-submit-0(29134): WRITE block 301128 on dm-11 (56 sectors)
<7>[38574.187125] btrfs-submit-0(29134): WRITE block 741832 on dm-11 (56 sectors)
<7>[38574.191602] sync(3360): WRITE block 128 on dm-11 (8 sectors)
<7>[38574.191654] sync(3360): WRITE block 131072 on dm-11 (8 sectors)

<7>[38576.370003] sync(3361): dirtied inode 1 (?) on dm-11
<7>[38576.370452] btrfs-submit-0(29134): WRITE block 301256 on dm-11 (24 sectors)
<7>[38576.370470] btrfs-submit-0(29134): WRITE block 741960 on dm-11 (24 sectors)
<7>[38576.370478] btrfs-submit-0(29134): WRITE block 301288 on dm-11 (24 sectors)
<7>[38576.370485] btrfs-submit-0(29134): WRITE block 741992 on dm-11 (24 sectors)
<7>[38576.370513] btrfs-submit-0(29134): WRITE block 301312 on dm-11 (8 sectors)
<7>[38576.370523] btrfs-submit-0(29134): WRITE block 742016 on dm-11 (8 sectors)
<7>[38576.379718] sync(3361): WRITE block 128 on dm-11 (8 sectors)
<7>[38576.379766] sync(3361): WRITE block 131072 on dm-11 (8 sectors)

Every other sync the same.

-- 
Stephane

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-05-22 18:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-21 12:58 curious writes on mounted, not used btrfs filesystem Tomasz Chmielewski
2011-05-22  9:34 ` Stephane Chazelas
2011-05-22  9:52   ` Tomasz Chmielewski
2011-05-22 18:26     ` Stephane Chazelas
2011-05-22 15:21   ` Swâmi Petaramesh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.