Skip to contentSkip to conversation

inode cache rebuild problem

DISCUSSION Shridhar Daithankar 2 participants 2 messages Apr 23, 2014 – Apr 24, 2014 Btrfs file system

lore
Share & tools
lore
#0 lore raw

Hello,

I have a desktop system with 2 disks, all btrfs, single partition. All of these partitions had
space_cache,inode_cache enabled.

Linux 3.14 has broken resume on my desktop, hence I need to shutdown and restart the
machine every time.

But even on clean reboot, inode_cache was constantly being rebuilt on each boot. It
caused kdm/X to timeout, even getty weren't spawned. I had to reboot it with ctrl-alt-delete,
just to make it usable again. 2 out of 3 times, I had to reboot more than once, to make it
usable.

While the disk was constantly grinding in the boot process, I ssh'ed into it from another
machine and observed the inode cache overhead.

Hence I disabled both the caches on all the partition(yes, I know, space_cache will stick
around), and the machine is lot more snappier and responsive than ever before.

I am running archlinux with 3.14.1 kernel.

Thanks,

Signature · 2 lines
Regards
 Shridhar
#1 lore raw

Shridhar Daithankar posted on Wed, 23 Apr 2014 23:07:13 +0630 as excerpted:

Quoted 8 lines

I have a desktop system with 2 disks, all btrfs, single partition. All of these partitions had space_cache,inode_cache enabled.

But even on clean reboot, inode_cache was constantly being rebuilt on each boot. While the disk was constantly grinding in the boot process, I ssh'ed into it from another machine and observed the inode cache overhead.

Quoted 5 lines

Hence I disabled both the caches on all the partition(yes, I know, space_cache will stick around), and the machine is lot more snappier and responsive than ever before.

I am running archlinux with 3.14.1 kernel.

The recommendation on this list has always (well, for as long as I've been around anyway) been to disable the inode cache, unless you know what you're doing and am sure you need it. I've not seen a lot of detail on why, but apparently it simply isn't appropriate for normal users.

You've basically proved the point...

Actually, I wouldn't mind a bit more information on exactly what the option does and under what circumstances one might wish to enable it, myself.

But based on the few hints I've seen, an example of where it may be useful is for relatively high volume mail servers with a large churn of relatively small files, writing and deleting them pretty much constantly as new mail comes in and then is forwarded and deleted. In that context, an inode cache might make some sense even if it's reinitialized at every reboot, because such machines are seldom rebooted.

OTOH, space_cache *IS* supposed to be useful for ordinary users, the reason it's enabled by default, these days. And if it's having to be reinitialized at every boot, you have a bug. (There has been at least one report of such happening, but IIRC it was fixed tho I don't recall the details.)

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