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
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-- 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
Marc MERLIN
2012-Dec-06 06:31 UTC
Re: Question about btrfs snapshot delay and rm -rf delay
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/ -- 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
Sylvain Alain
2012-Dec-06 12:52 UTC
Re: Question about btrfs snapshot delay and rm -rf delay
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 -- 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
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 / btrfsSSDs are sensitive to partitioning. Easiest is not to partition at all. Sander -- 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
Martin Steigerwald
2012-Dec-06 18:52 UTC
Re: Question about btrfs snapshot delay and rm -rf delay
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 -- 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
Martin Steigerwald
2012-Dec-06 18:54 UTC
Re: Question about btrfs snapshot delay and rm -rf delay
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 -- 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
Martin Steigerwald
2012-Dec-06 18:55 UTC
Re: Question about btrfs snapshot delay and rm -rf delay
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 -- 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
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 -- 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
Sylvain Alain
2012-Dec-07 13:48 UTC
Re: Question about btrfs snapshot delay and rm -rf delay
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 -- 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
Martin Steigerwald
2012-Dec-08 11:41 UTC
Re: Question about btrfs snapshot delay and rm -rf delay
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 -- 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