Slow boot cause of btrfs

Bug #791020 reported by Daniel Sandman
82
This bug affects 18 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Incomplete
Undecided
Unassigned

Bug Description

There are a large jump in my dmesg log for /dev/sda6 partition. It is formated to btrfs which could be the cause. For the record.. my root-system sda1 is ext4 and sda6 is my /home partition.

[ 11.123122] usbcore: registered new interface driver rtl8187
[ 49.483959] device fsid e74baf7e16f29ede-ae5b384561dad3af devid 1 transid 100267 /dev/sda6

Revision history for this message
Daniel Sandman (almehdi-deactivatedaccount) wrote :
Revision history for this message
NoahY (noahy) wrote :

Same here... even worse:

[ 26.537104] fb0: VESA VGA frame buffer device
[ 94.836524] device fsid 624d94e2c7c52ab2-27891407376a8981 devid 1 transid 33210 /dev/sda3
 68 seconds lost...

Revision history for this message
NoahY (noahy) wrote : apport information

AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.23.
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: noah 1496 F.... pulseaudio
 /dev/snd/controlC1: noah 1496 F.... pulseaudio
Card0.Amixer.info:
 Card hw:0 'Intel'/'HDA Intel at 0xfbff4000 irq 54'
   Mixer name : 'Realtek ALC889'
   Components : 'HDA:10ec0889,1458a022,00100004'
   Controls : 38
   Simple ctrls : 21
Card1.Amixer.info:
 Card hw:1 'U0x46d0x821'/'USB Device 0x46d:0x821 at usb-0000:00:1a.7-4, high speed'
   Mixer name : 'USB Mixer'
   Components : 'USB046d:0821'
   Controls : 2
   Simple ctrls : 1
Card1.Amixer.values:
 Simple mixer control 'Mic',0
   Capabilities: cvolume cvolume-joined cswitch cswitch-joined penum
   Capture channels: Mono
   Limits: Capture 0 - 52
   Mono: Capture 44 [85%] [-27.00dB] [on]
CurrentDmesg: Error: command ['sh', '-c', 'dmesg | comm -13 --nocheck-order /var/log/dmesg -'] failed with exit code 1: comm: /var/log/dmesg: Permission denied
DistroRelease: Ubuntu 11.04
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release amd64 (20110427.1)
MachineType: Gigabyte Technology Co., Ltd. X58A-UD3R
NonfreeKernelModules: nvidia
Package: linux (not installed)
ProcEnviron:
 LANGUAGE=en_US:en
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/@/boot/vmlinuz-2.6.38-10-generic root=UUID=b22ac5c7-e294-4d62-8189-6a3707148927 ro rootflags=subvol=@ quiet splash vt.handoff=7
ProcVersionSignature: Ubuntu 2.6.38-10.46-generic 2.6.38.7
Tags: natty running-unity
Uname: Linux 2.6.38-10-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: admin
dmi.bios.date: 05/21/2010
dmi.bios.vendor: Award Software International, Inc.
dmi.bios.version: Fb5
dmi.board.name: X58A-UD3R
dmi.board.vendor: Gigabyte Technology Co., Ltd.
dmi.board.version: x.x
dmi.chassis.type: 3
dmi.chassis.vendor: Gigabyte Technology Co., Ltd.
dmi.modalias: dmi:bvnAwardSoftwareInternational,Inc.:bvrFb5:bd05/21/2010:svnGigabyteTechnologyCo.,Ltd.:pnX58A-UD3R:pvr:rvnGigabyteTechnologyCo.,Ltd.:rnX58A-UD3R:rvrx.x:cvnGigabyteTechnologyCo.,Ltd.:ct3:cvr:
dmi.product.name: X58A-UD3R
dmi.sys.vendor: Gigabyte Technology Co., Ltd.

tags: added: apport-collected natty running-unity
Revision history for this message
NoahY (noahy) wrote : AlsaDevices.txt

apport information

Revision history for this message
NoahY (noahy) wrote : AplayDevices.txt

apport information

Revision history for this message
NoahY (noahy) wrote : ArecordDevices.txt

apport information

Revision history for this message
NoahY (noahy) wrote : Card0.Amixer.values.txt

apport information

Revision history for this message
NoahY (noahy) wrote : Card0.Codecs.codec.2.txt

apport information

Revision history for this message
NoahY (noahy) wrote : Lspci.txt

apport information

Revision history for this message
NoahY (noahy) wrote : Lsusb.txt

apport information

Revision history for this message
NoahY (noahy) wrote : PciMultimedia.txt

apport information

Revision history for this message
NoahY (noahy) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
NoahY (noahy) wrote : ProcCpuinfo_.txt

apport information

Revision history for this message
NoahY (noahy) wrote : ProcInterrupts.txt

apport information

Revision history for this message
NoahY (noahy) wrote : ProcModules.txt

apport information

Revision history for this message
NoahY (noahy) wrote : UdevDb.txt

apport information

Revision history for this message
NoahY (noahy) wrote : UdevLog.txt

apport information

Revision history for this message
Brad Figg (brad-figg) wrote : Missing required logs.

This bug is missing log files that will aid in dianosing the problem. From a terminal window please run:

apport-collect 791020

and then change the status of the bug back to 'New'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
NoahY (noahy) wrote :

@brad-figg that is exactly what I did... did you not see the information I included above?

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
NoahY (noahy) wrote :

Ah, sorry, that was an automated comment... well, I've included the information required.

Revision history for this message
dmuir (dmuir) wrote :

68 seconds? You're lucky. Look at my log:

[ 38.028519] EXT3-fs (sdc1): mounted filesystem with ordered data mode
[ 286.011637] device fsid bf4d97dc60fc7fe5-41707a4f7bd38bf devid 1 transid 11822 /dev/sdc6

4 minutes!

What can we do to help get this problem fixed? I don't want to have to wait 5 minutes for my machine to boot/restart.

Revision history for this message
Юрий Чудновский (fqc) wrote :

Same sh*t:

[ 12.010623] intel ips 0000:00:1f.6: i915 driver attached, reenabling gpu turbo
[ 69.254894] btrfs: use ssd allocation scheme
[ 70.105917] device fsid c345332a782fbd46-d1adbb332628deb4 devid 1 transid 92997 /dev/sda1

KINGSTON SNV425S264GB (64 GB SSD disk SATA2). Time not depending on CPU speed.

Revision history for this message
10111 (joachim-neu) wrote :

I guess it's the same here:

[ 37.173366] input: TPPS/2 IBM TrackPoint as /devices/platform/i8042/serio1/serio2/input/input8
[ 296.824532] btrfs: unlinked 8 orphans
[ 296.873903] device fsid *** devid 1 transid 37997 /dev/mapper/sda3_crypt
[ 297.734999] device fsid *** devid 1 transid 77 /dev/sda1

Is there anything more (logs, config files, hardware information, ...) you need to know?

Revision history for this message
Mikko Rönkkö (mikko-ronkko) wrote :

[ 26.112023] eth0: no IPv6 routers present
[ 2812.118652] init: bootchart main process (102) terminated with status 1
[ 2812.792951] init: bootchart post-stop process (1003) terminated with status 1
[ 5207.543628] device fsid 00fe3ac4-fc01-4809-a413-afd2200ee9cb devid 1 transid 5106 /dev/sdb1

Almost an hour an a half.

I tried to do "apport-collect 791020", but apparently it does not work with Lynx.

Revision history for this message
Mikko Rönkkö (mikko-ronkko) wrote :

If I add 'noauto' as an option to the btrfs partition and mount it in a separate upstart job after mounting the other partitions, it mounts in a few seconds or less.

Revision history for this message
Ken Takusagawa (ken-takusagawa-2) wrote :

A workaround is to edit the "pass" field in /etc/fstab to be 0 for the btrfs partitions, which will skip file system checking on boot.

However, why file system checking is even done at all on btrfs (the manpage of btrfsck says "not suitable for any uses other than benchmarking and review") is another question.

Revision history for this message
Marco Menardi (mmenaz) wrote :

I had a slow startup too. I installed Kubuntu 11.10 choosing btrfs as file system, and noticed was booting far slower than ext4. I asked in IRC channel and Chris Mason (wow!) troubleshooted it (how incredible is FOSS world?).
[20:33] <cmason> ok, start with the fstab
[20:33] <cmason> UUID=d5acc217-d524-4a2d-a937-bad945a047b2 / btrfs defaults,noatime,nodiratime,subvol=@ 0 1
[20:33] <cmason> last number should be a zero, should just change fsck.btrfs to a noop
fsck is slow, because it's not intended as a boot-time check

In fact after this change my atom single core boot time dropped from 111 sec to 80 sec
Marco

Revision history for this message
Juliano Ravasi (jravasi) wrote :

Another "me too".

In my case, I have a quite complex setup (dual boot with Windows, Linux with a small /boot partition and the rest in an encrypted LVM, Btrfs on top of all this). It takes more than one minute during boot, after I enter the encryption passphrase, to check and mount the Btrfs subvolumes. Also, it almost always dumps a lot of messages like "root 256 inode 181537 errors 400", which seems to be some filesystem corruption.

There is something very broken here. I'm reverting to ext4 for now.

Revision history for this message
Keng-Yu Lin (lexical) wrote :

The bug still exists in Precise Alpha-2:

Feb 8 16:29:05 keelung kernel: [ 27.323009] kjournald starting. Commit interval 5 seconds
Feb 8 16:29:05 keelung kernel: [ 27.323319] EXT3-fs (sda1): using internal journal
Feb 8 16:29:05 keelung kernel: [ 27.323322] EXT3-fs (sda1): mounted filesystem with ordered data mode
Feb 8 16:29:05 keelung kernel: [ 386.136820] device fsid 16a26540-92c0-42e9-8dfc-679b70b2316e devid 1 transid 349071 /dev/sda5

After modifying fstab as comment #2, the boot time is much faster:

Feb 8 16:39:06 keelung kernel: [ 30.647964] kjournald starting. Commit interval 5 seconds
Feb 8 16:39:06 keelung kernel: [ 30.648315] EXT3-fs (sda1): using internal journal
Feb 8 16:39:06 keelung kernel: [ 30.648321] EXT3-fs (sda1): mounted filesystem with ordered data mode
Feb 8 16:39:06 keelung kernel: [ 30.832447] device fsid 16a26540-92c0-42e9-8dfc-679b70b2316e devid 1 transid 349088 /dev/sda5

tags: added: precise
Revision history for this message
Brad Figg (brad-figg) wrote : Test with newer development kernel (3.2.0-15.24)

Thank you for taking the time to file a bug report on this issue.

However, given the number of bugs that the Kernel Team receives during any development cycle it is impossible for us to review them all. Therefore, we occasionally resort to using automated bots to request further testing. This is such a request.

We have noted that there is a newer version of the development kernel than the one you last tested when this issue was found. Please test again with the newer kernel and indicate in the bug if this issue still exists or not.

You can update to the latest development kernel by simply running the following commands in a terminal window:

    sudo apt-get update
    sudo apt-get upgrade

If the bug still exists, change the bug status from Incomplete to Confirmed. If the bug no longer exists, change the bug status from Incomplete to Fix Released.

If you want this bot to quit automatically requesting kernel tests, add a tag named: bot-stop-nagging.

 Thank you for your help, we really do appreciate it.

Changed in linux (Ubuntu):
status: Confirmed → Incomplete
tags: added: kernel-request-3.2.0-15.24
Revision history for this message
EricDHH (ericdhh) wrote :

Just updating a 11.10 to 12.04b, machine is a thinkpad x41 with solidata ssd 120MB/s r/w speed and noatime, nodirtime. Started at 00:00 AM and now at 10:30 AM the unpacking of the update is 2/3 ready. Maybe the job will be finished within next 8 hours. This is somewhat ugly slow that noone will ever believe it. But i can see it live before my eyes.

What's the problem with btrfs in ubuntu?

Revision history for this message
pulq (pulq-ustc) wrote :

I met similair issue with Ubuntu 12.04 (kernel 3.5.0-25). it is deadly slow to boot to Gnome.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.