Number of open file descriptors

In Solaris 10 we have the following two kernel parameters:

rlim_fd_max - which has a default value of 65536

rlim_fd_cur - which has a default value of 256

However to see what these values are, you run the following command:

kstat -n file_cache

and look at the buf_total or buf_max - but they don't match the 65536 number.

On my system I have rlim_fd_cur set to 576 and the max at the default, which I confirmed with a 'sysdef' but when I run a kstat -n it comes back as 1740.

Can anyone explain the difference?

Thanks,

Kevin D.

[593 byte] By [dedke01a] at [2007-11-27 6:04:04]
# 1

> In Solaris 10 we have the following two kernel

> parameters:

> rlim_fd_max - which has a default value of 65536

> rlim_fd_cur - which has a default value of 256

>

> However to see what these values are, you run the

> following command:

>

> kstat -n file_cache

What leads you to believe that?

> and look at the buf_total or buf_max - but they don't

> match the 65536 number.

No. The fd limits are per-process limits on file descriptors. file_cache appears to hold details about how the system-wide file cache is in use. They are not the same thing.

> On my system I have rlim_fd_cur set to 576 and the

> max at the default, which I confirmed with a 'sysdef'

> but when I run a kstat -n it comes back as 1740.

>

> Can anyone explain the difference?

I don't think they're related.

--

Darren

Darren_Dunhama at 2007-7-12 16:47:46 > top of Java-index,Solaris Operating System,Solaris 10 Features...
# 2

Hi Darren,

I did some more research and I have confirmed that the following command:

kstat -n file_cache | grep buf_max or buf_inuse

Will show the "system wide" usage of every processes file descriptor usage. Now Solaris kernel dynamically increases this value when the buf_inuse is exceeded.

Thanks for your help.

Regards,

Kevin

dedke01a at 2007-7-12 16:47:46 > top of Java-index,Solaris Operating System,Solaris 10 Features...