Operating System - HP-UX
1855132 Members
5320 Online
104109 Solutions
New Discussion

differences betwenn sar -v and bdf -i ( inode )

 
Herren Marc
Occasional Contributor

differences betwenn sar -v and bdf -i ( inode )

Hi all,

I was wondering what exactly is the differences between sar -v and bdf -i concerning the inodes.

As far as I've understood sar -v shows up the value for the inode-cache in the memory and bdf shows the actual number of the HFS.

Does the inode-cache limit the number of simultanious opened files ?

Example :
I've got on one workstation 100% usage of the inode-cache but bdf -i shows up 90% of free inodes. Is this a problem ?

Marc
4 REPLIES 4
Massimo Bianchi
Honored Contributor

Re: differences betwenn sar -v and bdf -i ( inode )

Hi,
as far as i know the output from
sar -v
for the inode is, as you stated, a cache.
So if it is 100% it's only a good, thing, inode are cached dinamically.

This does not prevent the system from opening new files.

The problem can arise if you kernel parameter nfile gets to the maximum.

Also: bdf -i show every kind of inode, not only HFS.

HTH,
Massimo


Michael Steele_2
Honored Contributor

Re: differences betwenn sar -v and bdf -i ( inode )

HFS is a mostly obsolete file system used only with the kernel in /stand for current release of HP-UX.

Regarding "...bdf shows the actual number of the HFS...

'bdf -i' option reports the number of used and free inodes in file system space available on the specified file system.

Regarding "...As far as I've understood sar -v shows up the value for the inode-cache in the memory..."

sar reports on total or cumulative system wide activity and sar -v displays the inode table usage. The size of the inode table can be increased with the kernel parameter 'ninode'.

Regarding "...Does the inode-cache limit the number of simultaneous opened files..."

Yes, it is a factor. Inodes are hard links to both directories and files and when the max is reached no more open files or new directories will be allowed.

Regarding "...I've got on one workstation 100% usage of the inode-cache but bdf -i shows up 90% of free inodes. Is this a problem...

Probably increase the kernel parameter 'ninode' but attached the 'sar -v' report for review.
Support Fatherhood - Stop Family Law
Bill Hassell
Honored Contributor

Re: differences betwenn sar -v and bdf -i ( inode )

This is a common misunderstanding because the same name is used for very different functions. In bdf, the -i is meaningful only for HFS filesystems where the number of inodes is fixed when the filesystem is first created and cannot be changed. An inode in a filesystem is a pointer to a chunk of disk. These inodes are created and destroyed by the filesystem code.

For sar, the ninode parameter is the size of a cache in the kernel's memory area which holds shortcuts to currently opened and recently opened files. It could be better described as a file-location cache. As mentioned, the ninode cache applies to HFS filesystems only (/stand is usually the only HFS filesystem) and keeps a cache of where current and old files are located. When a file is first opened, the ninode cache is searched and if the file location is there, no directory search needs to be done, saving a *lot* of potential disk activity.

However, sar -v (and Glance) cannot measure the re-useability of the entries, that is, which entries are closed files and can be reassigned. So, sar -v reports 100% (or almost 100%) occupancy after a few hours (or days). It's best to ignore sar's report and base the size of ninode on the number of HFS filesystems. (hint: mount -p) If there is only one (/stand) then tell SAM to dump it's (very obsolete) formula and fix the value at 1000, then ignore the sar -v report for ninode.


Bill Hassell, sysadmin
Sanjiv Sharma_1
Honored Contributor

Re: differences betwenn sar -v and bdf -i ( inode )

Hi Marc,

sar -v shows the The current-size and maximum-size of the inode table (inode cache. This can be changed by changing the ninode kernel parameter.

bdf -i reports the number of used and free inodes for hfs and vxfs filesystem. The total number of inodes allocated to the hfs filesytem is fixed and cannot be changed. We need to recreate the filesystem to change the inodes. But the vxfs filesystem allocated the inodes dynamically.

The kernel parameter which affects the number of simultaneous files open is nfile.

Thanks,
Everything is possible