Btrfs might be gradually slowing the boot process
Sure;
the kernel line from grub.cfg:
linux /boot/vmlinuz-linux root=UUID=c26e6d9a-0bbb-436a-a217-95c738b5b9c6 rootflags=noatime,space_cache rw quiet
proc/mounts:
rootfs / rootfs rw 0 0
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
sys /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
dev /dev devtmpfs rw,nosuid,relatime,size=4028896k,nr_inodes=1007224,mode=755 0 0
run /run tmpfs rw,nosuid,nodev,relatime,mode=755 0 0/dev/sda2 / btrfs rw,noatime,space_cache 0 0
securityfs /sys/kernel/security securityfs rw,nosuid,nodev,noexec,relatime 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
tmpfs /sys/fs/cgroup tmpfs rw,nosuid,nodev,noexec,mode=755 0 0
cgroup /sys/fs/cgroup/systemd cgroup rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd 0 0 pstore /sys/fs/pstore pstore rw,nosuid,nodev,noexec,relatime 0 0
cgroup /sys/fs/cgroup/cpuset cgroup rw,nosuid,nodev,noexec,relatime,cpuset 0 0
cgroup /sys/fs/cgroup/cpu,cpuacct cgroup rw,nosuid,nodev,noexec,relatime,cpuacct,cpu 0 0
cgroup /sys/fs/cgroup/memory cgroup rw,nosuid,nodev,noexec,relatime,memory 0 0
cgroup /sys/fs/cgroup/devices cgroup rw,nosuid,nodev,noexec,relatime,devices 0 0
cgroup /sys/fs/cgroup/freezer cgroup rw,nosuid,nodev,noexec,relatime,freezer 0 0
cgroup /sys/fs/cgroup/net_cls cgroup rw,nosuid,nodev,noexec,relatime,net_cls 0 0
cgroup /sys/fs/cgroup/blkio cgroup rw,nosuid,nodev,noexec,relatime,blkio 0 0
systemd-1 /proc/sys/fs/binfmt_misc autofs rw,relatime,fd=33,pgrp=1,timeout=300,minproto=5,maxproto=5,direct 0 0
debugfs /sys/kernel/debug debugfs rw,relatime 0 0
configfs /sys/kernel/config configfs rw,relatime 0 0
mqueue /dev/mqueue mqueue rw,relatime 0 0
hugetlbfs /dev/hugepages hugetlbfs rw,relatime 0 0
tmpfs /tmp tmpfs rw 0 0/dev/sda2 /home btrfs rw,relatime,space_cache 0 0
Quoted 4 lines · On Fri, Nov 08, 2013 at 08:37:37PM +0100, [email protected] wrote:
Sure;
the kernel line from grub.cfg:
linux/boot/vmlinuz-linuxroot=UUID=c26e6d9a-0bbb-436a-a217-95c738b5b9c6 rootflags=noatime,space_cache rw quiet
OK, this may be your problem. You're generating the space cache
every time you boot. You only need it once; let the disk activity on boot finish (it may take a while, depending on how big your filesystem is, and how much data it has, and how fragmented it is), and remove the space_cache option from your rootflags. When you next boot, it will use the existing cache rather than generating it again from scratch.
Hugo.
Quoted 29 lines
proc/mounts:
rootfs / rootfs rw 0 0
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
sys /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
dev /dev devtmpfs rw,nosuid,relatime,size=4028896k,nr_inodes=1007224,mode=755 0 0
run /run tmpfs rw,nosuid,nodev,relatime,mode=755 0 0/dev/sda2/ btrfs rw,noatime,space_cache 0 0
securityfs/sys/kernel/securitysecurityfs rw,nosuid,nodev,noexec,relatime 0 0
tmpfs/dev/shmtmpfs rw,nosuid,nodev 0 0
devpts/dev/ptsdevpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
tmpfs/sys/fs/cgrouptmpfs rw,nosuid,nodev,noexec,mode=755 0 0
cgroup/sys/fs/cgroup/systemdcgroup rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd 0 0 pstore/sys/fs/pstorepstore rw,nosuid,nodev,noexec,relatime 0 0
cgroup/sys/fs/cgroup/cpusetcgroup rw,nosuid,nodev,noexec,relatime,cpuset 0 0
cgroup/sys/fs/cgroup/cpu,cpuacctcgroup rw,nosuid,nodev,noexec,relatime,cpuacct,cpu 0 0
cgroup/sys/fs/cgroup/memorycgroup rw,nosuid,nodev,noexec,relatime,memory 0 0
cgroup/sys/fs/cgroup/devicescgroup rw,nosuid,nodev,noexec,relatime,devices 0 0
cgroup/sys/fs/cgroup/freezercgroup rw,nosuid,nodev,noexec,relatime,freezer 0 0
cgroup/sys/fs/cgroup/net_clscgroup rw,nosuid,nodev,noexec,relatime,net_cls 0 0
cgroup/sys/fs/cgroup/blkiocgroup rw,nosuid,nodev,noexec,relatime,blkio 0 0
systemd-1/proc/sys/fs/binfmt_miscautofs rw,relatime,fd=33,pgrp=1,timeout=300,minproto=5,maxproto=5,direct 0 0
debugfs/sys/kernel/debugdebugfs rw,relatime 0 0
configfs/sys/kernel/configconfigfs rw,relatime 0 0
mqueue/dev/mqueuemqueue rw,relatime 0 0
hugetlbfs/dev/hugepageshugetlbfs rw,relatime 0 0
tmpfs /tmp tmpfs rw 0 0/dev/sda2/home btrfs rw,relatime,space_cache 0 0
Signature · 3 lines
=== Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk ===
PGP key: 65E74AC0 from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
--- People are too unreliable to be replaced by machines. --- Quoted 6 lines · Hugo Mills
Quoted 4 lines · On Fri, Nov 08, 2013 at 08:37:37PM +0100, [email protected] wrote:
Sure;
the kernel line from grub.cfg:
linux/boot/vmlinuz-linuxroot=UUID=c26e6d9a-0bbb-436a-a217-95c738b5b9c6 rootflags=noatime,space_cache rw quiet
Quoted 7 lines
OK, this may be your problem. You're generating the space cache
every time you boot. You only need it once; let the disk activity on boot finish (it may take a while, depending on how big your filesystem is, and how much data it has, and how fragmented it is), and remove thespace_cacheoption from your rootflags. When you next boot, it will use the existing cache rather than generating it again from scratch.
While it's true you only need to mount with it once, mounting with space_cache will only generate it if it doesn't already exist. The existence of a valid space cache generation in the super actually enables exactly the same flag that space_cache/no_space_cache toggles, in the very same function as the mount option is checked (this is basically how the "you only need to mount with it once" magic is implemented).
super.c:
int btrfs_parse_options(struct btrfs_root *root, char *options)
{
...
cache_gen = btrfs_super_cache_generation(root->fs_info->super_copy);
if (cache_gen)
btrfs_set_opt(info->mount_opt, SPACE_CACHE);
...
case Opt_space_cache:
btrfs_set_opt(info->mount_opt, SPACE_CACHE);
break;
...
}