yzb3@wp.pl
2013-Nov-08 19:37 UTC
Odp: Re: Odp: 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 -- 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
Hugo Mills
2013-Nov-08 19:46 UTC
Re: Odp: Re: Odp: Btrfs might be gradually slowing the boot process
On Fri, Nov 08, 2013 at 08:37:37PM +0100, yzb3@wp.pl wrote:> Sure; > > the kernel line from grub.cfg: > linux /boot/vmlinuz-linux root=UUID=c26e6d9a-0bbb-436a-a217-95c738b5b9c6 rootflags=noatime,space_cache rw quietOK, 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.> 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 > >-- === 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. ---
cwillu
2013-Nov-08 20:05 UTC
Re: Odp: Re: Odp: Btrfs might be gradually slowing the boot process
On Fri, Nov 8, 2013 at 1:46 PM, Hugo Mills <hugo@carfax.org.uk> wrote:> On Fri, Nov 08, 2013 at 08:37:37PM +0100, yzb3@wp.pl wrote: >> Sure; >> >> the kernel line from grub.cfg: >> linux /boot/vmlinuz-linux root=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.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; ... } -- 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