ulimit -n in Solaris 10

ulimit -n behaves differently in Solaris 10. In Linux, I can modify the ulimit -n (open file descriptor limit) to any value as long as not exceeding the hard limit (ulimit -Hn). In Solaris, the default open file descriptor limits are:

rlim_fd_max= 65536 // hard limit
rlim_fd_cur= 256 // soft limit

After logging into Solaris, you can issue ulimit -n XXXX, then, the highest limit for your login session is set to XXXX. You can issue subsequent ulimit -n yyyy to lower the limit. Any attempt to increase the limit will be hit with an error.

Last login: Thu Apr 29 09:39:47 2010 from xx.xx.xx.xx
Sun Microsystems Inc. SunOS 5.10 Generic January 2005
user@server:~$ ulimit -n
256
user@server:~$ ulimit -n 8192
user@server:~$ ulimit -n
8192
user@server:~$ ulimit -n 8191
user@server:~$ ulimit -n
8191
user@server:~$ ulimit -n 8192
-bash: ulimit: open files: cannot modify limit: Not owner
user@server:~$

About these ads

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: