linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Question about btrfs snapshot delay and rm -rf delay
@ 2012-12-06  4:56 Sylvain Alain
  2012-12-06  5:14 ` Rock Lee
  2012-12-06  6:31 ` Marc MERLIN
  0 siblings, 2 replies; 11+ messages in thread
From: Sylvain Alain @ 2012-12-06  4:56 UTC (permalink / raw)
  To: linux-btrfs

Hi everyone, I'm running btrfs since octobre 2012 and I would like to
understand 2 behavior that I noticed.

1. When I delete a big directory, sometimes it can hang my box for 1
minutes or so, it seems that's the btrfs lock my SSD.

2. Sometimes when I run btrfs subvolume snapshot @root @backup, it can
run the command in a split seconde, and sometimes the command can last
for about 3 minutes.

My SSD installation is about 3.1 gigs of data.

My main question is this : Is there any log about the btrfs filesystem
that I can look at to see why and what is going on.

I'm running the vanilla-souces 3.6.9. with btrfs-prog 0.20-rc1

For more detail about my box  :
https://gentooquebec.org/gwiki/index.php/Utilisateur:D2_racing

Thanks :P

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

* Re: Question about btrfs snapshot delay and rm -rf delay
  2012-12-06  4:56 Question about btrfs snapshot delay and rm -rf delay Sylvain Alain
@ 2012-12-06  5:14 ` Rock Lee
  2012-12-06  6:31 ` Marc MERLIN
  1 sibling, 0 replies; 11+ messages in thread
From: Rock Lee @ 2012-12-06  5:14 UTC (permalink / raw)
  To: Sylvain Alain; +Cc: linux-btrfs

Maybe you can use systemtap to track what's going on.

2012/12/6 Sylvain Alain <d2racing911@gmail.com>:
> Hi everyone, I'm running btrfs since octobre 2012 and I would like to
> understand 2 behavior that I noticed.
>
> 1. When I delete a big directory, sometimes it can hang my box for 1
> minutes or so, it seems that's the btrfs lock my SSD.
>
> 2. Sometimes when I run btrfs subvolume snapshot @root @backup, it can
> run the command in a split seconde, and sometimes the command can last
> for about 3 minutes.
>
> My SSD installation is about 3.1 gigs of data.
>
> My main question is this : Is there any log about the btrfs filesystem
> that I can look at to see why and what is going on.
>
> I'm running the vanilla-souces 3.6.9. with btrfs-prog 0.20-rc1
>
> For more detail about my box  :
> https://gentooquebec.org/gwiki/index.php/Utilisateur:D2_racing
>
> Thanks :P
> --
> 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] 11+ messages in thread

* Re: Question about btrfs snapshot delay and rm -rf delay
  2012-12-06  4:56 Question about btrfs snapshot delay and rm -rf delay Sylvain Alain
  2012-12-06  5:14 ` Rock Lee
@ 2012-12-06  6:31 ` Marc MERLIN
  2012-12-06 12:52   ` Sylvain Alain
  2012-12-06 18:54   ` Martin Steigerwald
  1 sibling, 2 replies; 11+ messages in thread
From: Marc MERLIN @ 2012-12-06  6:31 UTC (permalink / raw)
  To: Sylvain Alain; +Cc: linux-btrfs

On Wed, Dec 05, 2012 at 11:56:27PM -0500, Sylvain Alain wrote:
> Hi everyone, I'm running btrfs since octobre 2012 and I would like to
> understand 2 behavior that I noticed.
> 
> 1. When I delete a big directory, sometimes it can hang my box for 1
> minutes or so, it seems that's the btrfs lock my SSD.

Doesn't directly answer your question, but if you don't have discard as a
mount option, you should try that.

Which SSD do you have? Do normal big file writes succeed or hang too?

My guess right now is that you don't have discard, and your drive is doing
very slow garbage collection. I had a Crucial C300 that did just that before
it ate itself and my data a month later.
Also check that your drive does not have a firmware update to remove those
hangs.

Marc
-- 
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems ....
                                      .... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/  

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

* Re: Question about btrfs snapshot delay and rm -rf delay
  2012-12-06  6:31 ` Marc MERLIN
@ 2012-12-06 12:52   ` Sylvain Alain
  2012-12-06 12:59     ` Sander
  2012-12-06 18:54   ` Martin Steigerwald
  1 sibling, 1 reply; 11+ messages in thread
From: Sylvain Alain @ 2012-12-06 12:52 UTC (permalink / raw)
  Cc: linux-btrfs

Hi, right now I own this SSD :

Intel SSD 520 Series MLC 120 Gigs

I'm using the latest firmware from Intel.

Also, this is my /etc/fstab

/dev/sda3      /boot            ext2       noauto,noatime,defaults
          1 2
/dev/sda1      /boot/efi        vfat        noauto,defaults
                 0 0
/dev/sda4      /                  btrfs
defaults,noatime,ssd,discard,compress=lzo,subvol=@racine 0 1
tmpfs          /var/tmp/portage tmpfs      size=12G
                0 0
none           /dev/shm         tmpfs      nodev,nosuid,noexec
                0 0

I discovered that when it hangs, it can be small or big files.

My latest hang was when I removed the vanilla-sources-3.6.8 last night.

I don't see any errors inside dmesg or /var/log/messages.

Sylvain



2012/12/6 Marc MERLIN <marc@merlins.org>:
> On Wed, Dec 05, 2012 at 11:56:27PM -0500, Sylvain Alain wrote:
>> Hi everyone, I'm running btrfs since octobre 2012 and I would like to
>> understand 2 behavior that I noticed.
>>
>> 1. When I delete a big directory, sometimes it can hang my box for 1
>> minutes or so, it seems that's the btrfs lock my SSD.
>
> Doesn't directly answer your question, but if you don't have discard as a
> mount option, you should try that.
>
> Which SSD do you have? Do normal big file writes succeed or hang too?
>
> My guess right now is that you don't have discard, and your drive is doing
> very slow garbage collection. I had a Crucial C300 that did just that before
> it ate itself and my data a month later.
> Also check that your drive does not have a firmware update to remove those
> hangs.
>
> Marc
> --
> "A mouse is a device used to point at the xterm you want to type in" - A.S.R.
> Microsoft is to operating systems ....
>                                       .... what McDonalds is to gourmet cooking
> Home page: http://marc.merlins.org/



--
Salut
alp
Sylvain

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

* Re: Question about btrfs snapshot delay and rm -rf delay
  2012-12-06 12:52   ` Sylvain Alain
@ 2012-12-06 12:59     ` Sander
  2012-12-06 18:52       ` Martin Steigerwald
  0 siblings, 1 reply; 11+ messages in thread
From: Sander @ 2012-12-06 12:59 UTC (permalink / raw)
  To: Sylvain Alain; +Cc: linux-btrfs

Sylvain Alain wrote (ao):
> Hi, right now I own this SSD :
> 
> Intel SSD 520 Series MLC 120 Gigs

> Also, this is my /etc/fstab
> /dev/sda3      /boot            ext2       noauto,noatime,defaults
> /dev/sda1      /boot/efi        vfat        noauto,defaults
> /dev/sda4      /                  btrfs

SSDs are sensitive to partitioning. Easiest is not to partition at all.

	Sander

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

* Re: Question about btrfs snapshot delay and rm -rf delay
  2012-12-06 12:59     ` Sander
@ 2012-12-06 18:52       ` Martin Steigerwald
  2012-12-06 18:55         ` Martin Steigerwald
  0 siblings, 1 reply; 11+ messages in thread
From: Martin Steigerwald @ 2012-12-06 18:52 UTC (permalink / raw)
  To: linux-btrfs, sander; +Cc: Sylvain Alain

Am Donnerstag, 6. Dezember 2012 schrieb Sander:
> Sylvain Alain wrote (ao):
> > Hi, right now I own this SSD :
> > 
> > Intel SSD 520 Series MLC 120 Gigs
> 
> > Also, this is my /etc/fstab
> > /dev/sda3      /boot            ext2       noauto,noatime,defaults
> > /dev/sda1      /boot/efi        vfat        noauto,defaults
> > /dev/sda4      /                  btrfs
> 
> SSDs are sensitive to partitioning. Easiest is not to partition at all.

Huh? How so?

My Intel SSD 320 is partitioned and uses LVM in the biggest partition
and is still just fine after 19 month. Media wearout indicator still at 100
(of 100).

Thanks,
-- 
Martin 'Helios' Steigerwald - http://www.Lichtvoll.de
GPG: 03B0 0D6C 0040 0710 4AFA  B82F 991B EAAC A599 84C7

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

* Re: Question about btrfs snapshot delay and rm -rf delay
  2012-12-06  6:31 ` Marc MERLIN
  2012-12-06 12:52   ` Sylvain Alain
@ 2012-12-06 18:54   ` Martin Steigerwald
  1 sibling, 0 replies; 11+ messages in thread
From: Martin Steigerwald @ 2012-12-06 18:54 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Marc MERLIN, Sylvain Alain

Am Donnerstag, 6. Dezember 2012 schrieb Marc MERLIN:
> On Wed, Dec 05, 2012 at 11:56:27PM -0500, Sylvain Alain wrote:
> > Hi everyone, I'm running btrfs since octobre 2012 and I would like to
> > understand 2 behavior that I noticed.
> > 
> > 1. When I delete a big directory, sometimes it can hang my box for 1
> > minutes or so, it seems that's the btrfs lock my SSD.
> 
> Doesn't directly answer your question, but if you don't have discard as a
> mount option, you should try that.
> 
> Which SSD do you have? Do normal big file writes succeed or hang too?
> 
> My guess right now is that you don't have discard, and your drive is doing
> very slow garbage collection. I had a Crucial C300 that did just that before
> it ate itself and my data a month later.
> Also check that your drive does not have a firmware update to remove those
> hangs.

Maybe also the drive does slow trims, but I doubt an Intel SSD 520 would
fall into that category.

In case you want to try out Sylvain, mount *without* discard option, and
run fstrim manually or by cron job from time to time.

Ciao,
-- 
Martin 'Helios' Steigerwald - http://www.Lichtvoll.de
GPG: 03B0 0D6C 0040 0710 4AFA  B82F 991B EAAC A599 84C7

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

* Re: Question about btrfs snapshot delay and rm -rf delay
  2012-12-06 18:52       ` Martin Steigerwald
@ 2012-12-06 18:55         ` Martin Steigerwald
  2012-12-06 19:37           ` Sander
  0 siblings, 1 reply; 11+ messages in thread
From: Martin Steigerwald @ 2012-12-06 18:55 UTC (permalink / raw)
  To: linux-btrfs; +Cc: sander, Sylvain Alain

Am Donnerstag, 6. Dezember 2012 schrieb Martin Steigerwald:
> Am Donnerstag, 6. Dezember 2012 schrieb Sander:
> > Sylvain Alain wrote (ao):
> > > Hi, right now I own this SSD :
> > > 
> > > Intel SSD 520 Series MLC 120 Gigs
> > 
> > > Also, this is my /etc/fstab
> > > /dev/sda3      /boot            ext2       noauto,noatime,defaults
> > > /dev/sda1      /boot/efi        vfat        noauto,defaults
> > > /dev/sda4      /                  btrfs
> > 
> > SSDs are sensitive to partitioning. Easiest is not to partition at all.
> 
> Huh? How so?
> 
> My Intel SSD 320 is partitioned and uses LVM in the biggest partition
> and is still just fine after 19 month. Media wearout indicator still at 100
> (of 100).

Or did you indirectly refer to partition alignment?

-- 
Martin 'Helios' Steigerwald - http://www.Lichtvoll.de
GPG: 03B0 0D6C 0040 0710 4AFA  B82F 991B EAAC A599 84C7

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

* Re: Question about btrfs snapshot delay and rm -rf delay
  2012-12-06 18:55         ` Martin Steigerwald
@ 2012-12-06 19:37           ` Sander
  0 siblings, 0 replies; 11+ messages in thread
From: Sander @ 2012-12-06 19:37 UTC (permalink / raw)
  To: Martin Steigerwald; +Cc: linux-btrfs, sander, Sylvain Alain

Martin Steigerwald wrote (ao):
> Am Donnerstag, 6. Dezember 2012 schrieb Martin Steigerwald:
> > Am Donnerstag, 6. Dezember 2012 schrieb Sander:
> > > Sylvain Alain wrote (ao):
> > > > Hi, right now I own this SSD :
> > > > 
> > > > Intel SSD 520 Series MLC 120 Gigs
> > > 
> > > > Also, this is my /etc/fstab
> > > > /dev/sda3      /boot            ext2       noauto,noatime,defaults
> > > > /dev/sda1      /boot/efi        vfat        noauto,defaults
> > > > /dev/sda4      /                  btrfs
> > > 
> > > SSDs are sensitive to partitioning. Easiest is not to partition at all.
> > 
> > Huh? How so?
> > 
> > My Intel SSD 320 is partitioned and uses LVM in the biggest partition
> > and is still just fine after 19 month. Media wearout indicator still at 100
> > (of 100).
> 
> Or did you indirectly refer to partition alignment?

Yes I did, I meant sensitive performance wise. I think your Intel 320
will survive just fine, but partition missalignment gives the controller
quite a bit more work to do.

	Sander

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

* Re: Question about btrfs snapshot delay and rm -rf delay
@ 2012-12-07 13:48 Sylvain Alain
  2012-12-08 11:41 ` Martin Steigerwald
  0 siblings, 1 reply; 11+ messages in thread
From: Sylvain Alain @ 2012-12-07 13:48 UTC (permalink / raw)
  To: linux-btrfs

Hi, I tested the fstrim

root@sysresccd /root % time fstrim -v /mnt/gentoo
/mnt/gentoo: 8148938752 bytes were trimmed

I noticed that my btrfs hang my SSD only with small files.

I tested with removing the /usr/src/linux directory(kernel sources)
with emerge -C vanilla-sources from Gentoo and I noticed this
behaviour.

So, should I remove the discard option or not from my /etc/fstab ?

--
Salut
alp
Sylvain

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

* Re: Question about btrfs snapshot delay and rm -rf delay
  2012-12-07 13:48 Sylvain Alain
@ 2012-12-08 11:41 ` Martin Steigerwald
  0 siblings, 0 replies; 11+ messages in thread
From: Martin Steigerwald @ 2012-12-08 11:41 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Sylvain Alain

Am Freitag, 7. Dezember 2012 schrieb Sylvain Alain:
> Hi, I tested the fstrim
> 
> root@sysresccd /root % time fstrim -v /mnt/gentoo
> /mnt/gentoo: 8148938752 bytes were trimmed
> 
> I noticed that my btrfs hang my SSD only with small files.
> 
> I tested with removing the /usr/src/linux directory(kernel sources)
> with emerge -C vanilla-sources from Gentoo and I noticed this
> behaviour.
> 
> So, should I remove the discard option or not from my /etc/fstab ?

Did you test whether removing it fixes the delays?

If not, I think there is no need to remove it.

If yes, remove it and use fstrim instead.

Thats my suggestion.

Thanks,
-- 
Martin 'Helios' Steigerwald - http://www.Lichtvoll.de
GPG: 03B0 0D6C 0040 0710 4AFA  B82F 991B EAAC A599 84C7

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

end of thread, other threads:[~2012-12-08 11:41 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-06  4:56 Question about btrfs snapshot delay and rm -rf delay Sylvain Alain
2012-12-06  5:14 ` Rock Lee
2012-12-06  6:31 ` Marc MERLIN
2012-12-06 12:52   ` Sylvain Alain
2012-12-06 12:59     ` Sander
2012-12-06 18:52       ` Martin Steigerwald
2012-12-06 18:55         ` Martin Steigerwald
2012-12-06 19:37           ` Sander
2012-12-06 18:54   ` Martin Steigerwald
  -- strict thread matches above, loose matches on Subject: below --
2012-12-07 13:48 Sylvain Alain
2012-12-08 11:41 ` Martin Steigerwald

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).