Skip to contentSkip to conversation

btrfs-ino-cache is running on each reboot

DISCUSSION dima 3 participants 5 messages Aug 13, 2013 – Aug 14, 2013 Btrfs file system

lore
Share & tools
lore

dima

author
#0 lore raw

Hello all,

About a week or so ago I noticed that [btrfs-ino-cache] process was appearing in the 'top' on each reboot and disk is spinning like crazy for about five minutes or so. Quite so often this caused X failing to start because all I/O was busy with caching. Even after letting it to calm down and seeing [btrfs-ino-cache] disappearing from the process list, on next reboot it starts all over again.

Here is the fstab entry that I have

UUID=430dca92-9541-4201-0f62-373e30beadac / btrfs subvol=root_subvolume,defaults,noatime,noacl,compress=lzo,inode_cache,space_cache,autodefrag 0 0

inode_cache was always enabled since the FS was created about a year or so ago, and actually I have never had any problems with it up until recently.

Removing inode_cache option from fstab solves the problem, but I am not sure if it is the right choice. I can observe the problem at least in the vanilla kernel 3.10.4 ~ 6 (did not try older versions)

What could be the reason for such behavior and how to avoid it?

thanks

#1 lore raw

dima posted on Tue, 13 Aug 2013 10:28:59 +0900 as excerpted:

Quoted 8 lines

About a week or so ago I noticed that [btrfs-ino-cache] process was appearing in the 'top' on each reboot and disk is spinning like crazy for about five minutes or so. Quite so often this caused X failing to start because all I/O was busy with caching.
Even after letting it to calm down and seeing [btrfs-ino-cache] disappearing from the process list, on next reboot it starts all over again.

Quoted 6 lines

inode_cache was always enabled since the FS was created about a year or so ago, and actually I have never had any problems with it up until recently.

Removing inode_cache option from fstab solves the problem, but I am not sure if it is the right choice.

A number of people have reported problems with inode_cache enabled, and the recommendation has always been to turn it off "unless you need it". Easy enough problem to fix, I guess. =:^)

Of course that immediately invites the question of why have the option at all if all it does is cause trouble, and (as a user not a dev) I don't have the answer to that. I don't know the use case when "unless you need it" would actually apply, but apparently, it does in some cases.

I guess the wiki[1] should really have a warning on that option, but without a more solid reason than "just don't turn it on, causes more trouble than it's worth", I'd feel kind of goofy adding it.

Anyway, yes, the general recommendation on the list at this point seems to be to simply leave inode_cache off and not worry about it.

---
[1] https://btrfs.wiki.kernel.org/

Signature · 3 lines
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman
author
#2 lore raw
Quoted 26 lines · Duncan

dima posted on Tue, 13 Aug 2013 10:28:59 +0900 as excerpted:

Quoted 8 lines

About a week or so ago I noticed that [btrfs-ino-cache] process was appearing in the 'top' on each reboot and disk is spinning like crazy for about five minutes or so. Quite so often this caused X failing to start because all I/O was busy with caching.
Even after letting it to calm down and seeing [btrfs-ino-cache] disappearing from the process list, on next reboot it starts all over again.

Quoted 6 lines

inode_cache was always enabled since the FS was created about a year or so ago, and actually I have never had any problems with it up until recently.

Removing inode_cache option from fstab solves the problem, but I am not sure if it is the right choice.

A number of people have reported problems with inode_cache enabled, and the recommendation has always been to turn it off "unless you need it". Easy enough problem to fix, I guess. =:^)

Of course that immediately invites the question of why have the option at all if all it does is cause trouble, and (as a user not a dev) I don't have the answer to that. I don't know the use case when "unless you need it" would actually apply, but apparently, it does in some cases.

Quoted 6 lines

I guess the wiki[1] should really have a warning on that option, but without a more solid reason than "just don't turn it on, causes more trouble than it's worth", I'd feel kind of goofy adding it.

Anyway, yes, the general recommendation on the list at this point seems to be to simply leave inode_cache off and not worry about it.

Thanks Duncan. So I did.
I was just wondering why it stopped behaving all of a sudden.

Quoted 3 lines

---
[1] https://btrfs.wiki.kernel.org/

#3 lore raw
In reply to dima
Quoted 17 lines · dima

Hello all,

About a week or so ago I noticed that [btrfs-ino-cache] process was appearing in the 'top' on each reboot and disk is spinning like crazy for about five minutes or so. Quite so often this caused X failing to start because all I/O was busy with caching.
Even after letting it to calm down and seeing [btrfs-ino-cache] disappearing from the process list, on next reboot it starts all over again.

Here is the fstab entry that I have

UUID=430dca92-9541-4201-0f62-373e30beadac / btrfs subvol=root_subvolume,defaults,noatime,noacl,compress=lzo,inode_cache,space_cache,autodefrag 0 0

inode_cache was always enabled since the FS was created about a year or so ago, and actually I have never had any problems with it up until recently.

Quoted 7 lines

Removing inode_cache option from fstab solves the problem, but I am not sure if it is the right choice.
I can observe the problem at least in the vanilla kernel 3.10.4 ~ 6 (did not try older versions)

What could be the reason for such behavior and how to avoid it?

That's odd. Can you apply patches and build kernels so I can try and narrow down what is happening? Thanks,

Josef

author
#4 lore raw
Quoted 23 lines · Josef Bacik
Quoted 22 lines · dima

Hello all,

About a week or so ago I noticed that [btrfs-ino-cache] process was appearing in the 'top' on each reboot and disk is spinning like crazy for about five minutes or so. Quite so often this caused X failing to start because all I/O was busy with caching.
Even after letting it to calm down and seeing [btrfs-ino-cache] disappearing from the process list, on next reboot it starts all over again.

Here is the fstab entry that I have

UUID=430dca92-9541-4201-0f62-373e30beadac / btrfs subvol=root_subvolume,defaults,noatime,noacl,compress=lzo,inode_cache,space_cache,autodefrag 0 0

inode_cache was always enabled since the FS was created about a year or so ago, and actually I have never had any problems with it up until recently.

Removing inode_cache option from fstab solves the problem, but I am not sure if it is the right choice.
I can observe the problem at least in the vanilla kernel 3.10.4 ~ 6 (did not try older versions)

Quoted 8 lines
Quoted 2 lines

What could be the reason for such behavior and how to avoid it?

That's odd. Can you apply patches and build kernels so I can try and narrow down what is happening? Thanks,

Josef

Hi Josef,
Sure, I can do that. I am running archlinux with a vanilla kernel that I build myself. Thanks