Operating System - HP-UX
1827197 Members
2625 Online
109716 Solutions
New Discussion

[hfs/vxfs] why ninodes can be so big?

 
Eric Guerizec
Frequent Advisor

[hfs/vxfs] why ninodes can be so big?

Hello,
sar -v reports the value of kernel table of inodes for HFS filesystem. The only HFS fs is /stand. ninodes size is set to 15000. Ok, I know it's too big but I have believed that vxfs used this cache. It is not the case because vxfs use his own dynamic cache. So why sar -v shows high values for inod-sz?
Exemple: 11:00am sar -v says ninodes is > 11000 !
So I don't understand why inod-sz could be so big with only /stand hfs.
3 REPLIES 3
Pete Randall
Outstanding Contributor

Re: [hfs/vxfs] why ninodes can be so big?

Eric,

What is your kernel's ninode value set to?

"ninode defines the number of slots in the inode table, and thus the
maximum number of open inodes that can be in memory. The inode
table is used as a cache memory. For efficiency reasons, the most
recent Ninode (number of) open inodes is kept in main memory. The
table is hashed.

Each unique open file has an open inode associated with it. Therefore,
the larger the number of unique open files, the larger ninode should
be. "

I think that's what sar is reporting, the high water mark in the table (though 11000 sounds very high).

Pete

Pete
Bill Hassell
Honored Contributor

Re: [hfs/vxfs] why ninodes can be so big?

Clarification: ninode = HFS filesystems only. IF you have a standard installation, there is only one HFS filesystem: /stand and it has only a handful of files. ninode does not need to be bigger than 500 to 1000.

The reason that ninode is so high is that the formula has been wrong for many years. When VxFS became the standard filesystems, the formula should have been replaced but wasn't. So tell SAM to not use the formula and use a hardcoded number instead (1000). sar and Glance have never been able to properly report on the ninode table usage due to kernel problems in returning used versus reusable pointers. This cache is used to save disk I/O looking for recently opened files (inodes). Unless your system has a large number of HFS filesystems, change ninode to a fixed value.


Bill Hassell, sysadmin
Eric Guerizec
Frequent Advisor

Re: [hfs/vxfs] why ninodes can be so big?

Thanks Pete & Bill!
Bill, you said "sar and Glance have never been able to properly report on the ninode table usage due to kernel problems in returning used versus reusable pointers"

So it means that when sar -v reports me the current inode cache size of 11000 (the max is set to 15000), this is a bad value. OK ?