All of lore.kernel.org
 help / color / mirror / Atom feed
* Odp: Re: Odp: Btrfs might be gradually slowing the boot process
@ 2013-11-08 19:37 yzb3
  2013-11-08 19:46 ` Hugo Mills
  0 siblings, 1 reply; 3+ messages in thread
From: yzb3 @ 2013-11-08 19:37 UTC (permalink / raw)
  To: Hugo Mills; +Cc: linux-btrfs

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



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

* Re: Odp: Re: Odp: Btrfs might be gradually slowing the boot process
  2013-11-08 19:37 Odp: Re: Odp: Btrfs might be gradually slowing the boot process yzb3
@ 2013-11-08 19:46 ` Hugo Mills
  2013-11-08 20:05   ` cwillu
  0 siblings, 1 reply; 3+ messages in thread
From: Hugo Mills @ 2013-11-08 19:46 UTC (permalink / raw)
  To: yzb3; +Cc: linux-btrfs

[-- Attachment #1: Type: text/plain, Size: 2675 bytes --]

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.

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

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

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

* Re: Odp: Re: Odp: Btrfs might be gradually slowing the boot process
  2013-11-08 19:46 ` Hugo Mills
@ 2013-11-08 20:05   ` cwillu
  0 siblings, 0 replies; 3+ messages in thread
From: cwillu @ 2013-11-08 20:05 UTC (permalink / raw)
  To: Hugo Mills, yzb3, linux-btrfs

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;
    ...
}

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

end of thread, other threads:[~2013-11-08 20:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-08 19:37 Odp: Re: Odp: Btrfs might be gradually slowing the boot process yzb3
2013-11-08 19:46 ` Hugo Mills
2013-11-08 20:05   ` cwillu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.