Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Solaris 7 stdio-limit 256 file descriptors ?

7 views
Skip to first unread message

Birgit Donner

unread,
Oct 6, 1999, 3:00:00 AM10/6/99
to
Hi,

recently we made a call to SUN and ORACLE about the max. number of
usable filedescriptors.
They told us that we have to live with the old stdio-limit of 256 even
in Solaris 7.
So I'm a little bit confused about the FAQ contents - is the limit fixed
or not ?


--------------
3.45) How can I increase the number of file descriptors per process?

...

Solaris 7 allows upto 65536 fds passed to select; this does require
recompiling with a larger value for FD_SETSIZE.

Programs using stdio or even library calls that use stdio may break when
they have more than 256 files open as that is the stdio limit. Programs
using many filedescriptors should try and reserve a number of low
numbered file descriptors for use by stdio.

The stdio limit is fixed for 64 bit applications in Solaris 7; if you
really need more than 256 FILE * in and you can't use Solaris 7+ or need
to run in
32 bits, you can use SFIO from AT&T.
---------------

Any info would be appreciated.

TIA,

Birgit

Martin Hepworth

unread,
Oct 6, 1999, 3:00:00 AM10/6/99
to
HI
you can set the limit of number of open fd (per user soft limit) by
using 'ulimit -n number'. this will take effect after each each
invokation of the command - ie you need to have it executed each time
you login/start up something/have a cron job etc. This works up to 1024
(the default hard limit).

You can change the default soft and hard limits by putting the following
in /etc/system and rebooting....

set rlim_fd_cur=2048
set rlim_fd_max=8192

Here the soft limit is set at 2048 and the hard limit at 8192.

Here's a more detailed explanation..
http://www.sunworld.com/sunworldonline/swol-02-1998/swol-02-insidesolaris_p.html

Hope this helps

Martin

Casper H.S. Dik - Network Security Engineer

unread,
Oct 6, 1999, 3:00:00 AM10/6/99
to
[[ PLEASE DON'T SEND ME EMAIL COPIES OF POSTINGS ]]

Birgit Donner <bdo...@gema.de> writes:

>recently we made a call to SUN and ORACLE about the max. number of
>usable filedescriptors.
>They told us that we have to live with the old stdio-limit of 256 even
>in Solaris 7.
>So I'm a little bit confused about the FAQ contents - is the limit fixed
>or not ?

>

>The stdio limit is fixed for 64 bit applications in Solaris 7; if you

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


(Ok, perhaps I shoudl have written "the stdio limit is removed for ....".


32 bit binaries still have the stdio limit
64 bit binaries do not.

Casper
--
Expressed in this posting are my opinions. They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.

Drazen Kacar

unread,
Oct 7, 1999, 3:00:00 AM10/7/99
to
Martin Hepworth wrote:
> HI
> you can set the limit of number of open fd (per user soft limit) by
> using 'ulimit -n number'. this will take effect after each each
> invokation of the command - ie you need to have it executed each time
> you login/start up something/have a cron job etc. This works up to 1024
> (the default hard limit).
>
> You can change the default soft and hard limits by putting the following
> in /etc/system and rebooting....
>
> set rlim_fd_cur=2048
> set rlim_fd_max=8192
>
> Here the soft limit is set at 2048 and the hard limit at 8192.

Yes, but 32-bit stdio is still limitted to 256 file descriptors, because
the memeber of FILE structure which holds the file descriptor is single byte.
So you can have additional descriptors which can be used by open(), read(),
write() etc., but they still can't be used by stdio functions.

To make things worse, I think that gethostbyname() will use stdio stuff,
so if you happen to call that function after you have used the first 256
file descriptors, bad juju happens. I'm not sure if this happens in all
Solaris versions, though.

--
.-. .-. Life is a sexually transmitted disease.
(_ \ / _)
| da...@srce.hr
| da...@fly.srk.fer.hr

0 new messages