mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33...

183
Solaris Tunable Parameters Reference Manual Sun Microsystems, Inc. 901 San Antonio Road Palo Alto, CA 94303-4900 U.S.A. Part Number 806-4015 July 2000

Upload: others

Post on 25-Sep-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Solaris Tunable ParametersReference Manual

Sun Microsystems, Inc.901 San Antonio RoadPalo Alto, CA 94303-4900U.S.A.

Part Number 806-4015July 2000

Page 2: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Copyright 2000 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California 94303-4900 U.S.A. All rights reserved.This product or document is protected by copyright and distributed under licenses restricting its use, copying, distribution, anddecompilation. No part of this product or document may be reproduced in any form by any means without prior written authorization ofSun and its licensors, if any. Third-party software, including font technology, is copyrighted and licensed from Sun suppliers.Parts of the product may be derived from Berkeley BSD systems, licensed from the University of California. UNIX is a registeredtrademark in the U.S. and other countries, exclusively licensed through X/Open Company, Ltd.Sun, Sun Microsystems, the Sun logo, docs.sun.com, AnswerBook, AnswerBook2, NFS, Solaris, SunOS, UNIX, Ultra, UltraSPARC andSolaris are trademarks, registered trademarks, or service marks of Sun Microsystems, Inc. in the U.S. and other countries. All SPARCtrademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. in the U.S. and othercountries. Products bearing SPARC trademarks are based upon an architecture developed by Sun Microsystems, Inc.The OPEN LOOK and SunTM Graphical User Interface was developed by Sun Microsystems, Inc. for its users and licensees. Sunacknowledges the pioneering efforts of Xerox in researching and developing the concept of visual or graphical user interfaces for thecomputer industry. Sun holds a non-exclusive license from Xerox to the Xerox Graphical User Interface, which license also covers Sun’slicensees who implement OPEN LOOK GUIs and otherwise comply with Sun’s written license agreements.Federal Acquisitions: Commercial Software–Government Users Subject to Standard License Terms and Conditions.DOCUMENTATION IS PROVIDED “AS IS” AND ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE ORNON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD TO BE LEGALLYINVALID.

Copyright 2000 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, Californie 94303-4900 Etats-Unis. Tous droits réservés.

Ce produit ou document est protégé par un copyright et distribué avec des licences qui en restreignent l’utilisation, la copie, ladistribution, et la décompilation. Aucune partie de ce produit ou document ne peut être reproduite sous aucune forme, par quelquemoyen que ce soit, sans l’autorisation préalable et écrite de Sun et de ses bailleurs de licence, s’il y en a. Le logiciel détenu par des tiers, etqui comprend la technologie relative aux polices de caractères, est protégé par un copyright et licencié par des fournisseurs de Sun.Des parties de ce produit pourront être dérivées du système Berkeley BSD licenciés par l’Université de Californie. UNIX est une marquedéposée aux Etats-Unis et dans d’autres pays et licenciée exclusivement par X/Open Company, Ltd.Sun, Sun Microsystems, le logo Sun, docs.sun.com, AnswerBook, AnswerBook2, NFS, Solaris, SunOS, UNIX et Solaris sont des marques defabrique ou des marques déposées, ou marques de service, de Sun Microsystems, Inc. aux Etats-Unis et dans d’autres pays. Toutes lesmarques SPARC sont utilisées sous licence et sont des marques de fabrique ou des marques déposées de SPARC International, Inc. auxEtats-Unis et dans d’autres pays. Les produits portant les marques SPARC sont basés sur une architecture développée par SunMicrosystems, Inc.L’interface d’utilisation graphique OPEN LOOK et SunTM a été développée par Sun Microsystems, Inc. pour ses utilisateurs et licenciés.Sun reconnaît les efforts de pionniers de Xerox pour la recherche et le développement du concept des interfaces d’utilisation visuelle ougraphique pour l’industrie de l’informatique. Sun détient une licence non exclusive de Xerox sur l’interface d’utilisation graphique Xerox,cette licence couvrant également les licenciés de Sun qui mettent en place l’interface d’utilisation graphique OPEN LOOK et qui en outrese conforment aux licences écrites de Sun.CETTE PUBLICATION EST FOURNIE “EN L’ETAT” ET AUCUNE GARANTIE, EXPRESSE OU IMPLICITE, N’EST ACCORDEE, YCOMPRIS DES GARANTIES CONCERNANT LA VALEUR MARCHANDE, L’APTITUDE DE LA PUBLICATION A REPONDRE A UNEUTILISATION PARTICULIERE, OU LE FAIT QU’ELLE NE SOIT PAS CONTREFAISANTE DE PRODUIT DE TIERS. CE DENI DEGARANTIE NE S’APPLIQUERAIT PAS, DANS LA MESURE OU IL SERAIT TENU JURIDIQUEMENT NUL ET NON AVENU.

PleaseRecycle

Page 3: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Contents

Preface 13

1. Overview of Solaris System Tuning 19

Tuning a Solaris System 19

Tuning Format 20

Tuning the Solaris Kernel 22

/etc/system File 22

adb 24

kadb 24

mdb 24

Special Structures 25

Viewing System Configuration Information 26

sysdef 26

kstat s 27

2. Solaris Kernel Tunables 29

General Parameters 30

physmem 30

lwp_default_stksize 31

fsflush and Related Tunables 32

fsflush 32

3

Page 4: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

tune_t_fsflushr 33

autoup 33

dopageflush 35

doiflush 35

Process Sizing Tunables 36

maxusers 36

reserved_procs 38

pidmax 39

max_nprocs 39

maxuprc 41

Paging-Related Tunables 41

lotsfree 42

desfree 44

minfree 45

throttlefree 46

pageout_reserve 47

cachefree 48

priority_paging 49

pages_pp_maximum 49

tune_t_minarmem 50

fastscan 51

slowscan 52

min_percent_cpu 53

handspreadpages 53

pages_before_pager 54

maxpgio 55

Swapping-Related Variables 56

swapfs_reserve 56

4 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 5: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

swapfs_minfree 57

General Kernel Variables 57

noexec_user_stack 57

Kernel Memory Allocator 58

kmem_flags 59

General Driver 62

moddebug 62

General I/O 63

maxphys 63

rlim_fd_max 64

rlim_fd_cur 65

General File System 66

ncsize 66

rstchown 68

segkpsize 68

dnlc_dir_enable 69

dnlc_dir_min_size 70

dnlc_dir_max_size 71

UFS 71

bufhwm 71

ndquot 73

ufs_ninode 74

ufs:ufs_WRITES 76

ufs:ufs_LW and ufs:ufs_HW 77

TMPFS 78

tmpfs:tmpfs_maxkmem 78

tmpfs:tmpfs_minfree 79

Pseudo Terminals 79

Contents 5

Page 6: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

pt_cnt 80

pt_pctofmem 81

pt_max_pty 82

Streams 82

nstrpush 82

strmsgsz 83

strctlsz 84

System V Message Queues 84

msgsys:msginfo_msgmax 85

msgsys:msginfo_msgmnb 86

msgsys:msginfo_msgmni 86

msgsys:msginfo_msgtql 87

System V Semaphores 87

semsys:seminfo_semmni 88

semsys:seminfo_semmns 88

semsys:seminfo_semvmx 89

semsys:seminfo_semmsl 89

semsys:seminfo_semopm 90

semsys:seminfo_semume 91

semsys:seminfo_semaem 92

System V Shared Memory 92

shmsys:shminfo_shmmax 93

shmsys:shminfo_shmmin 93

shmsys:shminfo_shmmni 94

shmsys:shminfo_shmseg 94

segspt_minfree 95

Scheduling 96

rechoose_interval 96

6 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 7: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Timers 96

hires_tick 96

timer_max 97

Sun4u Specific 98

consistent_coloring 98

3. NFS Tunable Parameters 101

Tuning the NFS Environment 101

NFS Module Parameters 101

nfs:nfs3_pathconf_disable_cache 102

nfs:nfs_allow_preepoch_time 102

nfs:nfs_cots_timeo 103

nfs:nfs3_cots_timeo 104

nfs:nfs_do_symlink_cache 105

nfs:nfs3_do_symlink_cache 106

nfs:nfs_dynamic 106

nfs:nfs3_dynamic 107

nfs:nfs_lookup_neg_cache 108

nfs:nfs3_lookup_neg_cache 109

nfs:nfs_max_threads 110

nfs:nfs3_max_threads 111

nfs:nfs_nra 112

nfs:nfs3_nra 113

nfs:nrnode 113

nfs:nfs_shrinkreaddir 115

nfs:nfs_write_error_interval 116

nfs:nfs_write_error_to_cons_only 116

nfs:nfs_disable_rddir_cache 117

nfs:nfs3_bsize 118

Contents 7

Page 8: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

nfs:nfs_async_clusters 119

nfs:nfs3_async_clusters 120

nfs:nfs_async_timeout 121

nfs:nacache 122

nfs:nfs3_jukebox_delay 123

nfs:nfs3_max_transfer_size 124

nfssrv Module Parameters 125

nfssrv:nfs_portmon 125

nfssrv:rfs_write_async 126

nfssrv:nfsauth_ch_cache_max 127

nfssrv:exi_cache_time 128

rpcmod Module Parameters 129

rpcmod:clnt_max_conns 129

rpcmod:clnt_idle_timeout 130

rpcmod:svc_idle_timeout 130

rpcmod:svc_default_stksize 131

rpcmod:svc_default_max_same_xprt 132

rpcmod:maxdupreqs 132

rpcmod:cotsmaxdupreqs 134

4. TCP/IP Tunable Parameters 137

Overview of Tuning TCP/IP Parameters 137

TCP/IP Parameter Validation 138

Internet Request for Comments (RFCs) 138

IP Tunable Parameters 138

ip_icmp_err_interval and ip_icmp_err_burst 139

ip_forwarding and ip6_forwarding 139

xxx:ip_forwarding 140

8 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 9: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

ip_respond_to_echo_broadcast andip6_respond_to_echo_multicast 140

ip_send_redirects and ip6_send_redirects 141

ip_forward_src_routed and ip6_forward_src_routed 141

ip_addrs_per_if 142

ip_strict_dst_multihoming andip6_strict_dst_multihoming 142

TCP Tunable Parameters 144

tcp_deferred_ack_interval 144

tcp_deferred_acks_max 144

tcp_wscale_always 145

tcp_tstamp_always 145

tcp_xmit_hiwat 146

tcp_recv_hiwat 146

tcp_max_buf 147

tcp_cwnd_max 147

tcp_slow_start_initial 148

tcp_slow_start_after_idle 149

tcp_sack_permitted 149

tcp_rev_src_routes 150

tcp_time_wait_interval 150

tcp_conn_req_max_q 151

tcp_conn_req_max_q0 152

tcp_conn_req_min 152

TCP Parameters Set in the /etc/system File 153

TCP Parameters With Additional Cautions 154

UDP Tunable Parameters 159

udp_xmit_hiwat 159

udp_recv_hiwat 159

Contents 9

Page 10: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

UDP Parameters with Additional Cautions 160

Per-Route Metrics 160

5. System Facility Parameters 163

System Default Parameters 163

cron 164

devfsadm 164

dhcpagent 164

fs 164

inetinit 164

init 164

kbd 165

login 165

nfslogd 165

passwd 165

power 165

su 165

sys-suspend 165

tar 166

utmpd 166

A. Tunable Parameter Change History 167

Kernel Parameters 167

Process Sizing Tunables 167

Paging Related Tunables 169

General Kernel Variables 171

General I/O 172

Pseudo Terminals 174

Sun4u Specific 174

Parameters With No Functionality 175

10 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 11: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Paging-Related Tunables 175

System V Message Parameters 176

System V Semaphore Parameters 178

NFS Module Parameters 178

B. Revision History for this Manual 179

First and Current Version—Solaris 8 10/00 179

Index 181

Contents 11

Page 12: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

12 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 13: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Preface

Solaris Tunable Parameter Reference Manual provides reference information aboutSolaris kernel and network tunable parameters. This manual does not providetunable parameter information about the CDE or Java environments.

It contains information for both SPARCTM based and IA based systems.

Note - The SolarisTM operating environment is supported on two types of hardware,or platforms—SPARC and IA. The Solaris operating environment supports 64-bit and32-bit address spaces. The information in this document pertains to both platformsand address spaces unless specified in a special chapter, section, note, bullet, figure,table, example, or code example.

Who Should Use This BookThis book is intended for experienced Solaris system administrators who might needto change kernel tunable parameters in certain situations. Refer to “Tuning a SolarisSystem” on page 19 for guidelines on changing Solaris tunable parameters.

How This Book Is OrganizedThe following table describes the chapters in this book.

13

Page 14: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Chapter ... Provides ...

Chapter 1 An overview of tuning a Solaris system and a descriptionof the format used in the book to describe the kerneltunables

Chapter 2 A description of Solaris kernel tunables such as kernelmemory, the file system, process size, and pagingparameters

Chapter 3 A description of NFS tunables such as caching symboliclinks, dynamic retransmission, and RPC securityparameters

Chapter 4 A description of TCP/IP tunables such as IP forwarding,source routing, and buffer sizing parameters

Chapter 5 A description of parameters for changing default valuesof certain system facilities by modifying files in the/etc/default directory

Appendix A A history of parameters that have changed or are nowobsolete

Appendix B A history of this manual’s revisions that includes thecurrent Solaris release version

Related BooksThe following books provide background material that might be useful when tuningSolaris systems.

� Configuration and Capacity Planning for Solaris Servers by Brian L. Wong, SunMicrosystems Press, ISBN 0-13-349952–9.

� NFS Illustrated by Brent Callaghan, Addison Wesley, ISBN 0-201-32570-5.

� Resource Management by Richard McDougall, Adrian Cockcroft, EvertHoogendoorn, Enrique Vargas, Tom Bialaski, Sun Microsystems Press, ISBN0-13-025855-5.

� Sun Performance and Tuning: SPARC and Solaris by Adrian Cockcroft, SunMicrosystems Press/PRT Prentice Hall, ISBN 0-13-149642-3.

14 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 15: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Other Resources for Solaris TuningInformationThis table describes other resources for Solaris tuning information.

For ... Go To ...

Performance tuning classes http://suned.sun.com

Online performance tuning information http://www.sun.com/sun-on-net/performance

Ordering performance tuning documentationby Sun Microsystems Press

http://www.sun.com/books/blueprints.series.html

Ordering Sun DocumentsFatbrain.com, an Internet professional bookstore, stocks select productdocumentation from Sun Microsystems, Inc.

For a list of documents and how to order them, visit the Sun Documentation Centeron Fatbrain.com at http://www1.fatbrain.com/documentation/sun .

Accessing Sun Documentation OnlineThe docs.sun.comSM Web site enables you to access Sun technical documentationonline. You can browse the docs.sun.com archive or search for a specific book title orsubject. The URL is http://docs.sun.com .

Preface 15

Page 16: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Typographic ConventionsThe following table describes the typographic changes used in this book.

TABLE P–1 Typographic Conventions

Typeface orSymbol Meaning Example

AaBbCc123 The names of commands, files, anddirectories; on-screen computer output

Edit your .login file.

Use ls −a to list all files.

machine_name% you havemail.

AaBbCc123 What you type, contrasted withon-screen computer output

machine_name% su

Password:

AaBbCc123 Command-line placeholder: replacewith a real name or value

To delete a file, type rmfilename.

AaBbCc123 Book titles, new words, or terms, orwords to be emphasized.

Read Chapter 6 in User’sGuide.

These are called class options.

You must be root to do this.

Shell Prompts in Command ExamplesThe following table shows the default system prompt and superuser prompt for theC shell, Bourne shell, and Korn shell.

16 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 17: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

TABLE P–2 Shell Prompts

Shell Prompt

C shell prompt machine_name%

C shell superuser prompt machine_name#

Bourne shell and Korn shell prompt $

Bourne shell and Korn shell superuserprompt

#

Preface 17

Page 18: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

18 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 19: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

CHAPTER 1

Overview of Solaris System Tuning

This section provides overview information about the format of the tuninginformation in this manual. It also describes the different ways to tune a Solarissystem.

� “Tuning a Solaris System” on page 19

� “Tuning Format” on page 20

� “Tuning the Solaris Kernel” on page 22

Tuning a Solaris SystemSolaris is a multi-threaded, scalable UNIXTM operating environment running onSPARC and Intel processors. It is self-adjusting to system load and demands minimaltuning. In some cases, however, tuning is necessary. This guide provides details aboutthe officially supported kernel tuning options available for the Solaris environment.

The Solaris kernel is composed of a core portion, which is always loaded, and anumber of loadable modules that are loaded as references are made to them. Manyof the variables referred to in the kernel portion of this guide are in the core portion,but a few are located in loadable modules.

A key consideration in system tuning is that setting various system variables is oftenthe least effective thing that can be done to improve performance. Changing thebehavior of the application is generally the most effective tuning aid available.Adding more physical memory and balancing disk I/O patterns are also useful. In afew rare cases, changing one of the variables described in this guide will have asubstantial effect on system performance.

Another thing to remember is that one system’s /etc/system settings might not beapplicable, either wholly or in part, to another environment. Carefully consider the

19

Page 20: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

values in the file with respect to the environment in which they will be applied.Make sure that you understand the behavior of a system before attempting to applychanges to the system variables described here.

Caution - The variables described here and their meanings can and do change fromrelease to release. A release is either a Solaris Update release or a new version suchas Solaris 8. Publication of these variables and their description does not precludechanges to the variables and descriptions without notice.

Tuning FormatThe format for the description of each variable follows:

� Variable-Name

� Description

� Data Type

� Default

� Units

� Range

� Dynamic?

� Validation

� Implicit

� When to Change

� Commitment Level

� Change History

Variable-Name Variable-Name is the exact name that would betyped in the /etc/system file, or found in the/etc/default/ facility file.

Most names are of the form variable where thevariable name does not contain a colon (: ). Thesenames refer to variables in the core portion of thekernel. If the name does contain a colon, thecharacters to the left of the colon reference thename of a loadable module. The name of thevariable within the module consists of thecharacters to the right of the colon. For example:

module_name: variable

20 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 21: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Description This section briefly describes what the variabledoes or controls.

Data Type Signed or unsigned short or long integer with thefollowing distinctions:

� On a system running a 32-bit kernel, a long isthe same size as an integer.

� On a system running a 64-bit kernel, a long istwice the width in bits as an integer. Forexample, an unsigned integer = 32 bits, anunsigned long = 64 bits.

Default What the system uses as the default value.

Units (Optional) Description of unit type.

Range Possible range allowed by system validation orthe bounds of the data type.

� MAXINT — A shorthand description for themaximum value of a signed integer(2,147,483,647).

� MAXUINT — A shorthand description for themaximum value of an unsigned integer(4,294,967,295).

Dynamic? Yes, if it can be changed on a running systemwith the adb , mdb, or kadb debuggers. No, if itis a boot time initialization only.

Validation Identifies checks the system applies to the valueof the variable either as entered from the/etc/system file or the default value, as well aswhen the validation is applied.

Implicit (Optional) Unstated constraints that might existon the variable, especially in relation to othervariables.

When to Change Why someone might want to change this valueincluding error messages or return codes.

Commitment Level Identifies the stability of the interface. Many ofthe parameters in this manual are still evolving

Overview of Solaris System Tuning 21

Page 22: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

and are classified as unstable. Seeattributes (5) for more information.

Change History (Optional) Contains a link to Change Historyappendix, if applicable.

Tuning the Solaris KernelThe table below describes the different ways tuning parameters can be applied.

Tuning Parameters Can Be Applied inThese Ways ... For More Information, See ...

Modifying the /etc/system file “/etc/system File” on page 22

Using the debugger (adb ) “adb” on page 24

Using the kernel debugger (kadb ) “kadb ” on page 24

Using the modular debugger (mdb) “mdb” on page 24

Using the ndd command to set TCP/IPparameters Chapter 4

Modifying the /etc/default files “System Default Parameters” on page 163

/etc/system FileThe /etc/system file provides a static mechanism for adjusting the values ofkernel variables. Values specified in this file are read at boot time and are applied.Any changes made to the file are not applied to the operating system until thesystem is rebooted.

Prior to the Solaris 8 release, /etc/system entries that set the values of systemvariables were applied in two phases:

� The first phase obtains various bootstrap variables (for example, maxusers ) toinitialize key system parameters.

� The second phase calculates the base configuration by using the bootstrapvariables, and all values entered in the /etc/system file are applied. In the case

22 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 23: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

of the bootstrap variables, reapplied values replace the values calculated or resetin the initialization phase.

The second phase sometimes caused confusion to users and administrators by settingvariables to values that seem to be impermissible or assigning values to variables (forexample, max_nprocs ) that have a value overridden during the initial configuration.

In the Solaris 8 release, one pass is made to set all the values before the configurationparameters are calculated.

Example—Setting a Parameter in /etc/system

The following /etc/system entry sets the number of read-ahead blocks that areread for file systems mounted using NFS version 2 software.

set nfs:nfs_nra=4

Recovering From an Incorrect ValueMake a copy of /etc/system before modifying it so you can easily recover fromincorrect value:

# cp /etc/system /etc/system.good

If a value entered in /etc/system causes the system to become unbootable, youcan recover with the following command:

ok boot -a

This command causes the system to ask for the name of various files used in theboot process. Press the carriage return to accept the default values until the name ofthe /etc/system file is requested. When theName of system file [/etc/system]: prompt is displayed, enter the name ofthe good /etc/system file or /dev/null :

Name of system file [/etc/system]: /etc/system.good

If /dev/null is entered, this path causes the system to attempt to read from/dev/null for its configuration information and because it is empty, the system usesthe default values. After the system is booted, the /etc/system file can be corrected.

For more information on system recovery, see System Administration Guide, Volume1.

Overview of Solaris System Tuning 23

Page 24: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

adbadb is a runtime debugger. Superuser can run adb with the −k option to seevariables in the running kernel. If −w is specified with the −k option, superuser canchange the in-memory values of the running kernel. Any changes made in thismanner are lost when the system reboots.

Example—Using adb to Change a ValueTo change the value of the integer variable maxusers from its current value to0x200 , do the following:

# adb -kwphysmem f7c6maxusers/Dmaxusers:maxusers: 495maxusers/W 200maxusers: 0x1ef = 0x200$q

Replace maxusers with the actual address of the item to be changed as well as thevalue the variable is to be set to.

See adb (1) for information on using the adb command.

kadbkadb is a bootable kernel debugger with the same general syntax as adb . Seekadb (1M) for the exceptions. One advantage of kadb is that the user can setbreakpoints and when the breakpoint is reached, examine data or step through theexecution of kernel code.

If the system is booted with kadb -d , values for variables in the core kernel can beset, but values for loadable modules would have to be set when the module wasactually loaded.

See “Debugging” in Writing Device Drivers for a brief tutorial on using the kadbcommand.

mdbNew to the Solaris 8 release is the modular debugger, mdb(1), which is uniqueamong available Solaris debuggers because it is easily extensible. Those who have

24 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 25: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

attempted to create adb macros are aware of the pain involved in that task. Aprogramming API is available that allows compilation of modules to perform desiredtasks within the context of the debugger. mdb provides backward compatibility withboth adb (1) and crash (1M).

mdb(1) also includes a number of desirable usability features includingcommand-line editing, command history, built-in output pager, syntax checking, andcommand pipelining. This is the recommended post-mortem debugger for the kernel.

Example—Using mdb to Change a ValueTo change the value of the integer variable maxusers from 5 to 6, do the following:

# mdb -kwLoading modules: [ unix krtld genunix ip logindmux ptm nfs ipc lofs ]> maxusers/Dmaxusers:maxusers: 495> maxusers/W 200maxusers: 0x1ef = 0x200> $q

Replace maxusers with the actual address of the item to be changed as well as thevalue the variable is to be set to.

See the Solaris Modular Debugger Guide for more information on using the modulardebugger.

When using adb , kadb , and mdb, the module name prefix is not required becauseafter a module is loaded, its symbols form a common name space with the corekernel symbols and any other previously loaded module symbols.

For example, ufs:ufs_WRITES would be accessed as ufs_WRITES in each of thedebuggers (assuming the UFS module is loaded), but would require the ufs: prefixwhen set in the /etc/system file. Including the module name prefix using adb orkadb results in an undefined symbol message.

Special StructuresSolaris tuning variables come in a variety of forms. The tune structure defined in/usr/include/sys/tuneable.h is the runtime representation oftune_t_gpgslo , tune_t_fsflushr , tune_t_minarmem , tune_t_minasmem ,and tune_t_flkrec . After the kernel is initialized, all references to values of thesevariables are found in the appropriate field of the tune structure.

Overview of Solaris System Tuning 25

Page 26: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Various documents (for example, previous versions of Solaris System AdministrationGuide, Volume 2) have stated that the proper way to set variables in the tunestructure is to use the syntax, tune: field-name where field name is replaced by theactual variable name listed above. This process silently fails. The proper way to setvariables for this structure at boot time is to initialize the special variablecorresponding to the desired field name. The system initialization process then loadsthese values into the tune structure.

A second structure into which various tuning parameters are placed is the varstructure named v . You can find the definition of a var struct in/usr/include/sys/var.h . The runtime representation of variables such asautoup and bufhwm is stored here.

Do not change either the tune or v structure on a running system. Changing any ofthe fields of these structures on a running system might cause the system to panic.

Viewing System ConfigurationInformationSeveral tools are available to examine system configuration. Some require rootprivilege, others can be run by a non-privileged user. Every structure and data itemcan be examined with the kernel debugger (adb on a running system, booting underkadb , or mdb).

sysdefThe sysdef (1M) command provides the values of System V IPC settings,STREAMS tunables, process resource limits, and portions of the tune and vstructures. For example, the sysdef "Tunable Parameters" section from on a 512Mbyte UltraTM 80 system is:

10387456 maximum memory allowed in buffer cache (bufhwm)7930 maximum number of processes (v.v_proc)

99 maximum global priority in sys class (MAXCLSYSPRI)7925 maximum processes per user id (v.v_maxup)

30 auto update time limit in seconds (NAUTOUP)25 page stealing low water mark (GPGSLO)

5 fsflush run rate (FSFLUSHR)25 minimum resident memory for avoiding deadlock (MINARMEM)

(continued)

26 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 27: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

(Continuation)

25 minimum swapable memory for avoiding deadlock (MINASMEM)

kstat skstat s are data structures maintained by various kernel subsystems and drivers.They provide a mechanism for exporting data from the kernel to user programswithout requiring that the program read kernel memory or have root privilege. Seekstat (3KSTAT) for more information.

In the Solaris 8 release, a new command, kstat (1M), is available that enablesselection and display of kstat s with a command-line interface. A Perl module,kstat (3EXT), is also available to process kstat information.

Overview of Solaris System Tuning 27

Page 28: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

28 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 29: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

CHAPTER 2

Solaris Kernel Tunables

This section describes most of the Solaris kernel tunables. For information on NFStunables, see Chapter 4. For information on TCP/IP tunables, see Chapter 3.

� “General Parameters” on page 30

� “fsflush and Related Tunables” on page 32

� “Process Sizing Tunables” on page 36

� “Paging-Related Tunables” on page 41

� “Swapping-Related Variables” on page 56

� “General Kernel Variables” on page 57

� “Kernel Memory Allocator” on page 58

� “General Driver” on page 62

� “General I/O” on page 63

� “General File System” on page 66

� “UFS” on page 71

� “TMPFS” on page 78

� “Pseudo Terminals” on page 79

� “Streams” on page 82

� “System V Message Queues” on page 84

� “System V Semaphores” on page 87

� “System V Shared Memory” on page 92

� “Scheduling” on page 96

� “Timers” on page 96

� “Sun4u Specific” on page 98

29

Page 30: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

General ParametersThis section describes general kernel parameters relating to physical memory andstack size.

physmem

Description Modifies the system’s idea of the number ofphysical pages of memory after the OS andfirmware are accounted for.

Data Type Unsigned long

Default Number of usable pages of physical memoryavailable on the system—not counting thememory where the core kernel and data arestored.

Range 1 to amount of physical memory on system

Units Pages

Dynamic? No

Validation None

When to Change Whenever you want to test the effect of runningwith less physical memory. Note that because thisparameter does not take into account the memoryused by the core kernel and data as well asvarious other data structures allocated early inthe startup process, the value of physmem shouldbe less than the actual number of pages thatrepresent the smaller amount of memory.

Commitment Level Unstable

30 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 31: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

lwp_default_stksize

Description Default value of size of stack to be used when akernel thread is created, and the calling routinedoes not provide an explicit size to be used.

Data Type Integer

Default 8192 for all 32-bit SPARC and IA based platforms

16,384 for 64-bit sun4u platforms

Range 0 to 262,144

Units Bytes in multiples of the value returned bygetpagesize (3C).

Dynamic? Yes. Affects threads created after the variable ischanged.

Validation Must be greater than or equal to 8192 and lessthan or equal to 262,144 (256 x 1024) and must bea multiple of the system page size. If theseconditions are not met, the following message isdisplayed:

Illegal stack size, Using N

The value of N is the default described above.

When to Change When the system panics because it has run out ofstack space. The best solution for this problem isto determine why the system is running out ofspace and make a correction. Increasing thedefault stack size means that almost every kernelthread will have a larger stack, resulting inincreased kernel memory consumption for nogood reason, because that space will generally beunused. The increased consumption means thatother resources competing for the same pool ofmemory will have the amount of space availableto them reduced, possibly decreasing thesystem’s ability to perform work. Among the sideeffects will be a reduction in the number ofthreads which the kernel can create. This solutionshould be treated as no more than an interimworkaround until the root cause is remedied.

Solaris Kernel Tunables 31

Page 32: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Commitment Level Unstable

fsflush and Related TunablesThis section describes fsflush and related tunables.

fsflushThe system daemon, fsflush , runs periodically to do three main tasks:

� On every invocation, fsflush ...

1. Flushes dirty file system pages over a certain age to disk.

2. Examines a portion of memory and causes modified pages to be written totheir backing store. Pages are written if they are modified and do not meet oneof the following conditions:

� Kernel page� Free� Locked� Associated with a swap device� Currently involved in an I/O operation

The net effect is to flush pages from files which are mmap(ed) with writepermission and which have actually been changed.

Pages are flushed to backing store but left attached to the process using them.This will simplify page reclamation when the system runs low on memory byavoiding delay for writing the page to backing store before claiming it, if thepage has not been modified since the flush.

3. Writes file system metadata to disk. This write is done every nth invocation,where n is computed from various configuration variables. See“tune_t_fsflushr ” on page 33 and “autoup ” on page 33 for details.

Frequency of invocation, whether the memory scanning is executed, whether the filesystem data flushing occurs, and the frequency with which it will occur areconfigurable.

For most systems, memory scanning and file system metadata syncing are thedominant activities for fsflush . Depending on system usage, memory scanning canbe of little use or consume too much CPU time.

32 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 33: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

tune_t_fsflushr

Description Specifies the number of seconds betweenfsflush invocations.

Data Type Signed integer

Default 5

Range 1 to MAXINT

Units Seconds

Dynamic? No

Validation If the value is less than or equal to zero, thevalue is reset to 5 and a warning message isdisplayed. This check is only done at boot time.

When to Change See autoup below.

Commitment Level Unstable

autoup

Description Along with tune_t_flushr , autoup controlsthe amount of memory examined for dirty pagesin each invocation and frequency of file systemsync operations.

The value of autoup is also used to controlwhether a buffer is written out from the free list.Buffers marked with the B_DELWRIflag (filecontent pages that have changed) are written outwhenever the buffer has been on the list forlonger than autoup seconds. Increasing the valueof autoup keeps the buffers around for a longertime in memory.

Data Type Signed integer

Default 30

Range 1 to MAXINT

Solaris Kernel Tunables 33

Page 34: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Units Seconds

Dynamic? No

Validation If autoup is less than or equal to zero, it is resetto 30 and a warning message is displayed. Thischeck is only done at boot time.

Implicit autoup should be an integer multiple oftune_t_fsflushr . At a minimum, autoupshould be at least 6 times tune_t_fsflushr . Ifnot, excessive amounts of memory will bescanned each time fsflush is invoked.

(total system pages x tune_t_fsflushr )should be greater than or equal to autoup tocause memory to be checked if dopageflush isnon-zero.

When to Change There are several potential situations forchanging autoup and or tune_t_fsflushr :

� Systems with large amounts of memory—Inthis case, increasing autoup reduces theamount of memory scanned in each invocationof fsflush .

� Systems with minimal memorydemand—Increasing both autoup andtune_t_fsflushr reduces the number ofscans made. autoup should be increased alsoto maintain the current ratio of autoup /tune_t_fsflushr .

� Systems with large numbers of transient files(for example, mail servers or software buildmachines)—If large numbers of files arecreated and then deleted, fsflush mightunnecessarily write data pages for those filesto disk.

Commitment Level Unstable

34 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 35: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

dopageflush

Description Controls whether memory is examined formodified pages during fsflush invocations. Ineach invocation of fsflush , the number ofmemory pages in the system is determined (itmight have changed because of a dynamicreconfiguration operation). Each invocation scans(total number of pages x tune_t_fsflushr ) /autoup pages.

Data Type Signed integer

Default 1 (enabled)

Range 0 (disabled) or 1 (enabled)

Units Toggle (on/off)

Dynamic? Yes

Validation None

When to Change If the system page scanner rarely runs, indicatedby a value of 0 in the sr column of vmstatoutput.

Commitment Level Unstable

doiflush

Description Controls whether file system metadata syncs willbe executed during fsflush invocations. Syncsare done every Nth invocation of fsflush whereN= (autoup / tune_t_fsflushr ). Becausethis is an integer division, if tune_t_fsflushris greater than autoup , a sync will be done onevery invocation of fsflush because the codechecks to see if its iteration counter is greaterthan or equal to N. Note that N is computed onceon invocation of fsflush . Later changes totune_t_fsflushr or autoup will have noeffect on the frequency of sync operations.

Data Type Signed integer

Solaris Kernel Tunables 35

Page 36: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Default 1 (enabled)

Range 0 (disabled) or 1 (enabled)

Units Toggle (on/off)

Dynamic? Yes

Validation None

When to Change When files are frequently modified over a periodof time and the load caused by the flushingperturbs system behavior. Files whose existence,and therefore consistency of state does not matterif the system reboots, are better kept in a TMPFSfile system (for example, /tmp ). Inode traffic canbe reduced on systems running the Solaris 7 and8 releases by using the mount −noatime option.This option eliminates inode updates when thefile is accessed.

A system engaged in realtime processing mightwant to disable this option and use explicitapplication file syncing to achieve consistency.

Commitment Level Unstable

Process Sizing TunablesSeveral variables are used to control the number of processes that are available onthe system and the number of processes that an individual user can create. Thefoundation variable is maxusers , which drives the values assigned to max_nprocsand maxuprc .

maxusers

Description Originally, maxusers defined the number oflogged in users the system could support.Various tables were sized based on this settingwhen a kernel was generated. Now, the Solarisrelease does much of its sizing based on theamount of memory on the system, so much of

36 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 37: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

the past use of maxusers has changed. There arestill a number of subsystems that are derivedfrom maxusers :

� The maximum number of processes on thesystem

� The number of quota structures held in thesystem

� The size of the directory name lookup cache(DNLC)

Data Type Signed integer

Default Lesser of the amount of memory in Mbytes and2048

Range 1 to 2048

Note - Values greater than 1024 must bespecified in /etc/system . If a value greaterthan 4096 is provided, it is set to 4096.

Units Users

Dynamic? No. After computation of dependent variables isdone, maxusers is never referenced again.

Validation None

When to Change When the default number of user processesderived by the system is too low. This situation isseen by the following message that displays onthe system console:

out of processes

When the default number of processes is toohigh:

� Database servers that have a lot of memoryand relatively few running processes, can savesystem memory by reducing the default valueof maxusers .

� File servers that have a lot of memory and fewrunning processes can reduce this value, but

Solaris Kernel Tunables 37

Page 38: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

should explicitly set the size of the DNLC.(See “ncsize ” on page 66.)

� Compute servers that have a lot of memoryand few running processes can reduce thisvalue.

Commitment Level Unstable

Change History See “maxusers (Solaris 7 Release)” on page 167for more information.

reserved_procs

Description Specifies number of system process slots to bereserved in the process table for processes with aUID of root (0). For example, fsflush .

Data Type Signed integer

Default 5

Range 5 to MAXINT

Units Processes

Dynamic? No. Not used after the initial parametercomputation.

Validation In the Solaris 8 release, any /etc/systemsetting is honored.

Commitment Level Unstable

When to Change Consider increasing to 10 + normal number ofUID 0 (root) processes on system. This settingprovides some cushion should it be necessary toobtain a root shell during a time when the systemis otherwise unable to create user-level processes.

38 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 39: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

pidmax

Description This parameter specifies value of largest possibleprocess ID. Valid for Solaris 8 and later releases.

pidmax sets the value for the maxpid variable.Once maxpid is set, pidmax is ignored. maxpidis used elsewhere in the kernel to determine themaximum process ID and for constraint checking.

Attempts to set maxpid by adding an entry tothe /etc/system file have no effect.

Data Type Signed integer

Default 30,000

Range 266 to 999,999

Units Processes

Dynamic? No. Used only at boot time to set the value ofpidmax .

Validation Value is compared to that of reserved_procsand 999,999. If less than reserved_procs orgreater than 999,999, the value is set to 999,999.

Implicit max_nprocs range checking ensures thatmax_nprocs is always less than or equal to thisvalue.

When to Change Changing this parameter is one of the stepsnecessary to enable support for more than 30,000processes on a system.

Commitment Level Unstable

max_nprocs

Description Maximum number of processes that can becreated on a system. Includes system and userprocesses. Any value entered in /etc/system isused in the computation of maxuprc .

Solaris Kernel Tunables 39

Page 40: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

This value is also used in determining the size ofseveral other system data structures. Other datastructures where this variable plays a role are:

� Determining the size of the directory namelookup cache (if ncsize is not specified)

� Allocating disk quota structures for UFS (ifndquot is not specified)

� Verifying that the amount of memory used byconfigured system V semaphores does notexceed system limits

� Configuring Hardware Address Translationresources for the sun4d, sun4m, and Intelplatforms

Data Type Signed integer

Default 10 + (16 x maxusers )

Range 266 to value of maxpid

Dynamic? No

Validation Compared to maxpid and set to maxpid if larger.On the sun4d and Intel platforms an additionalcheck is made against a platform-specific value.max_nprocs is set to the smallest value in thetriplet (max_nprocs , maxpid , platform value).Both platforms use 65,534 as the platform value.

When to Change Changing this parameter is one of the stepsnecessary to enable support for more than 30,000processes on a system.

Commitment Level Unstable

Change History See “max_nprocs (Pre-Solaris 8 Releases)” onpage 168 for more information.

40 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 41: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

maxuprc

Description Maximum number of processes that can becreated on a system by any one user.

Data Type Signed integer

Default max_nprocs - reserved_procs

Range 1 to max_nprocs - reserved_procs

Units Processes

Dynamic? No

Validation Compared to max_nprocs - reserved_procsand set to the smaller of the two.

When to Change When you want to specify a hard limit for thenumber of processes a user can create that is lessthan the default value of however manyprocesses the system can create. Attempting toexceed this limit generates the following warningmessages on the console or in the messages file:

out of per-user processes for uid N

Commitment Level Unstable

Paging-Related TunablesThe Solaris environment is a demand paged virtual memory system. As the systemruns, pages are brought into memory as needed. When memory becomes occupiedabove a certain threshold and demand for memory continues, paging begins. Paginggoes through several levels that are controlled by certain variables.

The general paging algorithm is as follows:

� A memory deficit is noticed. The page scanner thread runs and begins to walkthrough memory. A two-step algorithm is employed:

1. A page is marked as unused.

2. If still unused after a time interval, the page is viewed as a subject for reclaim.

If the page has been modified, a request is made to the pageout thread to schedulethe page for I/O and the scanner continues looking at memory. Pageout causes the

Solaris Kernel Tunables 41

Page 42: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

page to be written to the page’s backing store and placed on the free list. Whenscanning memory, no distinction is made as to the origin of the page. It may havecome from a data file, or it might represent a page from an executable’s text, data,or stack.

� As memory pressure on the system increases, the algorithm becomes moreaggressive in the pages it will consider as candidates for reclamation and in howfrequently the paging algorithm runs. (See “fastscan ” on page 51 and“slowscan ” on page 52 for more information.) As available memory fallsbetween the range lotsfree and minfree , the system will linearly increase theamount of memory scanned in each invocation of the pageout thread from thevalue specified by slowscan to the value specified by fastscan . The systemuses the desfree variable to control a number of decisions about resource usageand behavior.

The system also attempts to constrain itself to use not more than 4% of one CPU forpageout operations. The algorithm is to look through some amount of memorybetween slowscan and fastscan , and stop when one of the following occurs:

� Enough pages have been found to satisfy the memory shortfall.

� The planned number of pages have been looked at.

� Too much time has elapsed.

If a memory shortfall is still present when pageout finishes its scan, another scan isscheduled for 1/4 second in the future.

Caution - We recommend that all tuning of the VM system be removed from /etc/system . Run with the default settings and determine if it is necessary to adjust anyof these parameters. Do not enable priority_paging or adjust cachefree . Theseare no longer needed, although still present in the kernel. Manipulating them willalmost certainly result in performance degradation when the page scanner runs.

Beginning in the Solaris 7 5/99 release, dynamic reconfiguration (DR) for CPU andmemory is supported. The behavior of the system in a DR operation involving theaddition or deletion of memory is to recalculate values for the relevant parametersunless the parameter has been explicitly set in /etc/system . In that case, the valuespecified in /etc/system is used unless a constraint on the value of the variablehas been violated, in which case the value is reset.

lotsfree

Description Initial trigger for system paging to begin. Whenthis threshold is crossed, the page scanner wakesup to begin looking for memory pages to reclaim.

Data Type Unsigned long

42 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 43: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Default The greater of 1/64th of physical memory or 512Kbytes

Range The minimum value is 512 Kbytes or 1/64th ofphysical memory, whichever is greater, expressedas pages using the page size returned bygetpagesize (3C).

The maximum is the number of physical memorypages. The maximum value should be no morethan 30% of physical memory. The system doesno enforcement of this range other than thatdescribed in the Validation section.

Units Pages

Dynamic? Yes, but dynamic changes are lost if a memorybased DR operation occurs.

Validation If lotsfree is greater than the amount ofphysical memory, the value is reset to the default.

Implicit The relationship of cachefree is greater than orequal to lotsfree , which is greater thandesfree , which is greater than minfree , mustbe maintained at all times.

When to Change When demand for pages is subject to suddensharp spikes, the memory algorithm might not beable to keep up with demand. One way to workaround this problem is to start reclaimingmemory at an earlier time. This solution gives thepaging system some additional margin.

A rule of thumb is to set this parameter to 2times what the system needs to allocate in a fewseconds. This parameter is workload dependent:a DBMS server can probably work fine with thedefault settings, but a system doing heavy filesystem I/O might need to adjust this parameter.

For systems with relatively static workloads andlarge amounts of memory, adjust this valuedownwards. The minimum acceptable value is512 Kbytes expressed as pages using the pagesize returned by getpagesize (3C).

Commitment Level Unstable

Solaris Kernel Tunables 43

Page 44: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

desfree

Description Amount of memory desired to be free at all timeson the system.

Data Type Unsigned integer

Default lotsfree / 2

Range The minimum value is 256 Kbytes or 1/128th ofphysical memory, whichever is greater, expressedas pages using the page size returned bygetpagesize(3C) .

The maximum is the number of physical memorypages. The maximum value should be no morethan 15% of physical memory. The system doesno enforcement of this range other than thatdescribed in the Validation section.

Units Pages

Dynamic? Yes, unless dynamic reconfiguration operationsthat add or delete memory occur. At that point,the value is reset to whatever was provided inthe /etc/system file or was calculated from thenew physical memory value.

Validation If desfree is greater than lotsfree , desfreeis set to lotsfree / 2. No message is displayed.

Implicit The relationship of cachefree is greater than orequal to lotsfree , which is greater thandesfree , which is greater than minfree , shouldbe maintained at all times.

Side Effects Several side effects can arise from increasing thevalue of this variable. When the new value nearsor exceeds the amount of available memory onthe system:

� Asynchronous I/O requests are not processedunless available memory exceeds desfree .Increasing the value of desfree can result inrejection of requests that otherwise wouldsucceed.

44 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 45: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

� NFS Version 3 asynchronous writes areexecuted as synchronous writes.

� The swapper is awakened earlier, and thebehavior of the swapper is biased towardsmore aggressive actions.

� The system might not prefault as manyexecutable pages into the system. This sideeffect results in applications potentiallyrunning slower than they otherwise would.

When to Change For systems with relatively static workloads andlarge amounts of memory, adjust this valuedownwards. The minimum acceptable value is256 Kbytes expressed as pages using the pagesize returned by getpagesize(3C) .

Commitment Level Unstable

minfree

Description Minimum acceptable memory level. Whenmemory drops below this number, the systembiases allocations toward those necessary tosuccessfully complete pageout operations or toswap processes completely out of memory, andeither denies or blocks other allocation requests.

Data Type Unsigned integer

Default desfree / 2

Range The minimum value is 128 kbytes or 1/256th ofphysical memory, whichever is greater, expressedas pages using the page size returned bygetpagesize(3C) .

The maximum is the number of physical memorypages. The maximum value should be no morethan 7.5% of physical memory. The system doesno enforcement of this range other than thatdescribed in the Validation section.

Units Pages

Solaris Kernel Tunables 45

Page 46: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Dynamic? Yes, unless dynamic reconfiguration operationsthat add or delete memory occur. At that point,the value is reset to whatever was provided inthe /etc/system file or was calculated from thenew physical memory value.

Validation If minfree is greater than desfree , minfree isset to desfree / 2. No message is displayed.

Implicit The relationship of cachefree is greater than orequal to lotsfree , which is greater thandesfree , which is greater than minfree shouldbe maintained at all times.

When to Change The default value is generally adequate. Forsystems with relatively static workloads andlarge amounts of memory, adjust this valuedownwards. The minimum acceptable value is128 Kbytes expressed as pages using the pagesize returned by getpagesize(3C) .

Commitment Level Unstable

throttlefree

Description Memory level at which blocking memoryallocation requests are put to sleep, even if thememory is sufficient to satisfy the request.

Data Type Unsigned integer

Default minfree

Range The minimum value is 128 Kbytes or 1/256th ofphysical memory, whichever is greater, expressedas pages using the page size returned bygetpagesize(3C) .

The maximum is the number of physical memorypages. The maximum value should be no morethan 4% of physical memory. The system does noenforcement of this range other than thatdescribed in the Validation section.

Units Pages

46 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 47: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Dynamic? Yes, unless dynamic reconfiguration operationsthat add or delete memory occur. At that point,the value is reset to whatever was provided inthe /etc/system file or was calculated from thenew physical memory value.

Validation If throttlefree is greater than desfree ,throttlefree is set to minfree . No messageis displayed.

Implicit The relationship of cachefree is greater than orequal to lotsfree , which is greater thandesfree , which is greater than minfree , shouldbe maintained at all times.

When to Change The default value is generally adequate. Forsystems with relatively static workloads andlarge amounts of memory, adjust this valuedownwards. The minimum acceptable value is128 Kbytes expressed as pages using the pagesize returned by getpagesize(3C) .

Commitment Level Unstable

pageout_reserve

Description Number of pages reserved for the exclusive useof the pageout or scheduler threads. Whenavailable memory is less than this value,non-blocking allocations are denied for anyprocesses other than pageout or the scheduler.Pageout needs to have a small pool of memoryfor its use so it can allocate the data structuresnecessary to do the I/O for writing a page to itsbacking store. This variable was introduced inthe Solaris 2.6 release to ensure that the systemwould be able to perform a pageout operation inthe face of the most severe memory shortage.

Data Type Unsigned integer

Default throttlefree / 2

Range The minimum value is 64 Kbytes or 1/512th ofphysical memory, whichever is greater, expressed

Solaris Kernel Tunables 47

Page 48: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

as pages using the page size returned bygetpagesize(3C) .

The maximum is the number of physical memorypages. The maximum value should be no morethan 2% of physical memory. The system does noenforcement of this range other than thatdescribed in the Validation section.

Units Pages

Dynamic? Yes, unless dynamic reconfiguration operationsthat add or delete memory occur. At that point,the value is reset to whatever was provided inthe /etc/system file or was calculated from thenew physical memory value.

Validation If pageout_reserve is greater thanthrottlefree / 2, pageout_reserve is set tothrottlefree / 2. No message is displayed.

Implicit The relationship of cachefree is greater than orequal to lotsfree , which is greater thandesfree , which is greater than minfree , whichis greater than or equal to throttlefree ,should be maintained at all times.

When to Change The default value is generally adequate. Forsystems with relatively static workloads andlarge amounts of memory, adjust this valuedownwards. The minimum acceptable value is 64Kbytes expressed as pages using the page sizereturned by getpagesize(3C) .

Commitment Level Unstable

cachefree

Description The Solaris 8 release changes the way file systempages are cached. These changes subsume thepriority paging capability.

Note - Remove both cachefree andpriority_paging settings in the /etc/system file.

48 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 49: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

The caching changes remove most of the pressureon the virtual memory system resulting from filesystem activity. Several statistics exhibit newbehavior:

� Page reclaims are higher because pages arenow explicitly added to the free list after I/Ocompletes.

� Free memory is now higher because the freememory count now includes a largecomponent of the file cache.

� Scan rates are drastically reduced.

Commitment Level Obsolete

Change History See “cachefree (Solaris 2.6 and Solaris 7Releases)” on page 170 for more information.

priority_paging

Description This variable sets cachefree to 2 timeslotsfree .

The Solaris 8 release changes the way file systempages are cached. These changes subsume thepriority paging capability.

Note - Remove both cachefree andpriority_paging settings in the /etc/system file.

Commitment Level Obsolete

Change History See “priority_paging (Solaris 2.6 and 7Releases)” on page 170 for more information.

pages_pp_maximum

Description Defines the number of pages that the systemrequires be unlocked. If a request to lock pages

Solaris Kernel Tunables 49

Page 50: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

would force available memory below this value,that request is refused.

Data Type Unsigned long

Default Maximum of the triplet (200, tune_t_minarmem+ 100, [10% of memory available at boot time])

Range Default value to no more than 20% of physicalmemory. The systems does no enforcement ofthis range other than that described in theValidation section.

Units Pages

Dynamic? Yes, unless dynamic reconfiguration operationsthat add or delete memory occur. At that point,the value is reset to whatever was provided inthe /etc/system file or was calculated.

Validation Maximum of the quadruplet (200,tune_t_minarmem + 100, [10% of memoryavailable], and the value from /etc/system ).No message is displayed if the value from/etc/system is increased. Done only at boottime.

When to Change When memory locking requests or attaching to ashared memory segment with the SHARE_MMUflag fails, yet the amount of memory availableseems to be sufficient. Keeping 10% of memoryfree on a 32–Gbyte system might be excessive.

Excessively large values can cause memorylocking requests to fail unnecessarily.

Commitment Level Unstable

tune_t_minarmem

Description The minimum available resident (not swappable)memory to maintain in order to avoid deadlock.Used to reserve a portion of memory for use bythe core of the operating system. Pages restricted

50 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 51: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

in this way are not seen when the OS determinesthe maximum amount of memory available.

Data Type Signed integer

Default 25

Range 1 to physical memory

Units Pages

Dynamic? No

Validation None. Large values result in wasted physicalmemory.

When to Change The default value is generally adequate. Considerincreasing it if the system locks up anddebugging information indicates the problemwas because no memory was available.

Commitment Level Unstable

fastscan

Description Maximum number of pages per second that thesystem looks at when memory pressure ishighest.

Data Type Signed integer

Default The lesser of 64 Mbytes and 1/2 of physicalmemory.

Range 1 to one-half of physical memory

Units Pages

Dynamic? Yes, unless dynamic reconfiguration operationsthat add or delete memory occur. At that point,the value is reset to whatever was provided by/etc/system or was calculated from the newphysical memory value.

Solaris Kernel Tunables 51

Page 52: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Validation Maximum value is the lesser of 64 Mbytes and 1/2 of physical memory.

When to Change When more aggressive scanning of memory isdesired during periods of memory shortfall,especially if the system is subject to periods ofintense memory demand or when performingheavy file I/O.

Commitment Level Unstable

slowscan

Description Minimum number of pages per second that thesystem looks at when attempting to reclaimmemory.

Data Type Signed integer

Default The smaller of 1/20th of physical memory inpages and 100.

Range 1 to fastscan / 2

Units Pages

Dynamic? Yes, unless dynamic reconfiguration operationsthat add or delete memory occur. At that point,the value is reset to whatever was provided inthe /etc/system file or was calculated from thenew physical memory value.

Validation If slowscan is larger than fastscan / 2,slowscan is reset to fastscan / 2. No messageis displayed.

When to Change When more aggressive scanning of memory isdesired during periods of memory shortfallespecially if the system is subject to periods ofintense memory demand.

Commitment Level Unstable

52 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 53: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

min_percent_cpu

Description Minimum percentage of CPU that pageout canconsume. This variable is used as the startingpoint for determining the maximum amount oftime that can be consumed by the page scanner.

Data Type Signed integer

Default 4

Range 1 to 80

Units Percentage

Dynamic? Yes

Validation None

When to Change Increasing this value on systems with multipleCPUs and lots of memory, which are subject tointense periods of memory demand, enables thepager to spend more time attempting to findmemory.

Commitment Level Unstable

handspreadpages

Description The Solaris environment uses a two-handed clockalgorithm to look for pages that are candidatesfor reclaiming when memory is low. The firsthand of the clock walks through memorymarking pages as unused. The second handwalks through memory some distance after thefirst hand, checking to see if the page is stillmarked as unused. If so, the page is subject toreclaim. The distance between the front hand andthe back hand is handspreadpages .

Data Type Unsigned long

Default fastscan

Solaris Kernel Tunables 53

Page 54: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Range 1 to maximum number of physical memorypages on the system

Units Pages

Dynamic? Yes. This parameter requires that the kernelvariable reset_hands also be set to a non-zerovalue. Once the new value of handspreadpageshas been recognized, reset_hands is set to zero.

Validation Set to lesser of the amount of physical memoryand the handspreadpages value

When to Change When you want the amount of time that pagesare potentially resident before reclaim isincreased. Increasing this value increases theseparation between the hands, and therefore, theamount of time before a page can be reclaimed.

Commitment Level Unstable

pages_before_pager

Description Part of a system threshold that immediately freespages after an I/O completes instead of storingthe pages for possible reuse. The threshold islotsfree + pages_before_pager . The NFSenvironment also uses this threshold to curtail itsasynchronous activities as memory pressuremounts.

Data Type Signed integer

Default 200

Range 1 to amount of physical memory

Units Pages

Dynamic? No

Validation None

When to Change When the majority of I/O is done for pages thatare truly read or written once and never

54 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 55: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

referenced again. Setting this variable to a largeramount of memory keeps adding pages to thefree list.

When the system is subject to bursts of severememory pressure. A larger value here helps tokeep a bigger cushion against the pressure.

Commitment Level Unstable

maxpgio

Description Maximum number of page I/O requests that canbe queued by the paging system. This number isdivided by 4 to get the actual maximum used bythe paging system. It is used to throttle thenumber of requests as well as to control processswapping.

Data Type Signed integer

Default 40

Range 1 to 1024

Units I/0s

Dynamic? No

Validation None

Implicit The maximum number of I/O requests from thepager is limited by the size of a list of requestbuffers, which is currently sized at 256.

When to Change When the system is subject to bursts of severememory pressure. A larger value here helps torecover faster from the pressure if more than oneswap device is configured or the swap device is astriped device.

Commitment Level Unstable

Solaris Kernel Tunables 55

Page 56: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Swapping-Related VariablesSwapping in the Solaris environment is accomplished by the swapfs pseudo filesystem. The combination of space on swap devices and physical memory is treatedas the pool of space available to support the system for maintaining backing store foranonymous memory. The system attempts to allocate space from disk devices first,and then uses physical memory as backing store. When swapfs is forced to usesystem memory for backing store, limits are enforced to ensure that the system doesnot deadlock because of excessive consumption by swapfs.

swapfs_reserve

Description Amount of system memory that is reserved foruse by system (UID = 0) processes.

Data Type Unsigned long

Default The smaller of 4 Mbytes and 1/16th of physicalmemory

Range The minimum value is 4 Mbytes or 1/16th ofphysical memory, whichever is smaller, expressedas pages using the page size returned bygetpagesize(3C) .

The maximum is the number of physical memorypages. The maximum value should be no morethan 10% of physical memory. The system doesno enforcement of this range other than thatdescribed in the Validation section.

Units Pages

Dynamic? No

Validation None

When to Change Generally not necessary. Only change onrecommendation of a software provider, or whensystem processes are terminating because of aninability to obtain swap space. A much bettersolution is to add physical memory or additionalswap devices to the system.

56 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 57: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Commitment Level Unstable

swapfs_minfree

Description Amount of physical memory that is desired bekept free for the rest of the system. Attempts toreserve memory for use as swap space by anyprocess that causes the system’s perception ofavailable memory to fall below this value arerejected. Pages reserved in this manner can onlybe used for locked-down allocations by thekernel or by user-level processes.

Data Type Unsigned long

Default The larger of 2 Mbytes and 1/8th of physicalmemory

Range 1 to amount of physical memory

Units Pages

Dynamic? No

Validation None

When to Change When processes are failing because of an inabilityto obtain swap space, yet the system has memoryavailable.

Commitment Level Unstable

General Kernel Variablesnoexec_user_stack

Description Enables the stack to be marked asnon-executable. This helps in makingbuffer-overflow attacks more difficult.

Solaris Kernel Tunables 57

Page 58: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

A Solaris system running a 64-bit kernel makesthe stacks of all 64-bit applicationsnon-executable by default. Setting this variable isnecessary to make 32-bit applicationsnon-executable on systems running 64-bit or32-bit kernels.

Note - This variable exists on all systemsrunning Solaris 2.6 or later, but it is only effectiveon sun4u, sun4m, and sun4d architectures.

Data Type Signed integer

Default 0 (disabled)

Range 0 (disabled), 1 (enabled)

Units Toggle (on/off)

Dynamic? Yes. Does not affect currently runningprocesses—only those created after the value isset.

Validation None

When to Change Should be enabled at all times unless applicationsare deliberately placing executable code on thestack without using mprotect (2) to make thestack executable.

Commitment Level Unstable

Change History See “noexec_user_stack (Solaris 2.6 andSolaris 7 Releases)” on page 171 for moreinformation.

Kernel Memory AllocatorThe Solaris kernel memory allocator distributes chunks of memory for use by entitiesinside the kernel. The allocator creates a number of caches of varying size for use byits clients. Clients can also request the allocator to create a cache for use by that client(for example, to allocate structures of a particular size). Statistics about each of thecaches that the allocator manages can be seen with the kstat -c kmem_cache

58 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 59: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

command. Specialized caches can be viewed with the crash (1M) command, usingthe kmastat operator.

Occasionally, systems might panic because of memory corruption. The kernelmemory allocator supports a debugging interface that performs various integritychecks on the buffers as well as collecting information on the allocators. The integritychecks provide the opportunity to detect errors closer to where they actuallyoccurred, and the collected information provides additional data for support peoplewhen they try to ascertain the reason for the panic.

Use of the flags incurs additional overhead and memory usage during systemoperations. The flags should only be used when a memory corruption problem issuspected.

kmem_flags

Description The Solaris kernel memory allocator has variousdebugging and test options that were extensivelyused during the internal development cycle ofthe Solaris environment. Prior to the Solaris 2.5release, these options were not usable in releasedSolaris versions. Starting with the Solaris 2.5release, a subset of these options are availableand they are controlled by the kmem_flagsvariable, which was set by booting kadb , andthen setting the variable before starting thekernel. Because of issues with the timing of theinstantiation of the kernel memory allocator andthe parsing of /etc/system , it was not possibleto set these flags in the /etc/system file untilthe Solaris 8 release.

Five supported flag settings are described here.

Solaris Kernel Tunables 59

Page 60: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

TABLE 2–1 kmem_flags Settings

Flag Setting Description

AUDIT 0x1 The allocator maintains a logthat contains recent history ofits activity. The number ofitems logged depends onwhether CONTENTSis also set.The log is a fixed size andwhen space is exhausted,earlier records are reclaimed.

TEST 0x2 The allocator writes a patterninto freed memory and checksthat the pattern is unchangedwhen the buffer is nextallocated. If some portion ofthe buffer is changed, thisindicates that the memory wasprobably used by an entity thathad previously allocated andfreed the buffer. If an overwriteis seen, the system panics.

REDZONE 0x4 The allocator provides extramemory at the end of therequested buffer and inserts aspecial pattern into thatmemory. When the buffer isfreed, the pattern is checked tosee if data was written past theend of the buffer. If anoverwrite is seen, the kernelpanics.

60 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 61: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

TABLE 2–1 kmem_flags Settings (continued)

Flag Setting Description

CONTENTS 0x8 The allocator logs up to 256bytes of buffer contents whenthe buffer is freed. Requiresthat AUDIT also be set.

The numeric value of theseflags can be logically added(OR’ed) together and set by the/etc/system file in theSolaris 8 release, or forprevious releases, by bootingkadb and setting the flagsbefore starting the kernel.

LITE 0x100 Does minimal sanity checkingwhen a buffer is allocated andfreed. When enabled, theallocator checks that theredzone has not been writteninto, that a freed buffer is notbeing freed again, and that thebuffer being freed is the sizethat was allocated. This flag isavailable as of theSolaris 7 3/99 release. Do notcombine this flag with anyother flags.

Data Type Signed integer

Default 0 (disabled)

Range 0 (disabled) or 1 - 15 or 256 (0x100)

Dynamic? Yes. Changes made during runtime only affectnew kernel memory caches. After systeminitialization, the creation of new caches is rare.

Validation None

When to Change When memory corruption is suspected.

Commitment Level Unstable

Solaris Kernel Tunables 61

Page 62: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

General Drivermoddebug

Description Variable that you can set to values that causemessages about various steps in the moduleloading process to be displayed.

Data Type Signed integer

Default 0 (messages off)

Range The most useful values are:

� 0x80000000 - Prints [un] loading...message. For every module loaded, messagessuch as the following would appear on theconsole and in the /var/adm/messages file:

Nov 5 16:12:28 sys genunix: [ID 943528 kern.notice] load ’sched/TS_DPTBL’id 9 loaded @ 0x10126438/0x10438dd8 size 132/2064Nov 5 16:12:28 sys genunix: [ID 131579 kern.notice] installing TS_DPTBL,module id 9.

� 0x40000000 - Prints detailed error messages.For every module loaded, messages such asthe following would appear on the consoleand in the /var/adm/messages file:

Nov 5 16:16:50 sys krtld: [ID 284770 kern.notice] kobj_open: can’t open/platform/SUNW,Ultra-1/kernel/sched/TS_DPTBLNov 5 16:16:50 sys krtld: [ID 284770 kern.notice] kobj_open: can’t open/platform/sun4u/kernel/sched/TS_DPTBLNov 5 16:16:50 sys krtld: [ID 797908 kern.notice] kobj_open: ’/kernel/sch...Nov 5 16:16:50 sys krtld: [ID 605504 kern.notice] descr = 0x2aNov 5 16:16:50 sys krtld: [ID 642728 kern.notice] kobj_read_file: size=34,Nov 5 16:16:50 sys krtld: [ID 217760 kern.notice] offset=0Nov 5 16:16:50 sys krtld: [ID 136382 kern.notice] kobj_read: req 8192 bytes,Nov 5 16:16:50 sys krtld: [ID 295989 kern.notice] got 4224Nov 5 16:16:50 sys krtld: [ID 426732 kern.notice] read 1080 bytesNov 5 16:16:50 sys krtld: [ID 720464 kern.notice] copying 34 bytesNov 5 16:16:50 sys krtld: [ID 234587 kern.notice] count = 34[33 lines elided]Nov 5 16:16:50 sys genunix: [ID 943528 kern.notice] load ’sched/TS_DPTBL’

(continued)

62 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 63: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

(Continuation)

id 9 loaded @ 0x10126438/0x10438dd8 size 132/2064Nov 5 16:16:50 sys genunix: [ID 131579 kern.notice] installing TS_DPTBL,module id 9.Nov 5 16:16:50 sys genunix: [ID 324367 kern.notice] init ’sched/TS_DPTBL’id 9 loaded @ 0x10126438/0x10438dd8 size 132/2064

� 0x20000000 - Prints even more detailedmessages. This doesn’t print any additionalinformation beyond what the detailederror message flag does during systemboot, but it does print additional informationabout releasing the module when the moduleis unloaded.

These values can be added together to set thefinal value.

Dynamic? Yes

Validation None

When to Change When a module is either not loading as expectedor the system seems to hang while loadingmodules. Note that when print detailedmessages is set, system boot is slowed downconsiderably by the number of messages writtento the console.

Commitment Level Unstable

General I/Omaxphys

Description Maximum size of physical I/O requests. If adriver sees a request larger than this size, thedriver breaks the request into maxphys sizechunks. File systems can and do impose theirown limit.

Solaris Kernel Tunables 63

Page 64: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Data Type Signed integer

Default 126,976 (sun4m and sun4d), 131,072 (sun4u),57,344 (Intel). The sd driver uses the value of1,048,576 if the drive supports wide transfers.The ssd driver uses 1,048,576 by default.

Range Machine-specific page size to MAXINT

Units Bytes

Dynamic? Yes, but many file systems load this value into aper-mount point data structure when the filesystem is mounted. A number of drivers load thevalue at the time a device is attached into adriver-specific data structure.

Validation None

When to Change When doing I/O to and from raw devices inlarge chunks. Note that a DBMS doing OLTPoperations issues large numbers of small I/Os.Changing maxphys does not result in anyperformance improvement in that case.

When doing I/O to and from a UFS file systemwhere large amounts of data (greater than 64Kbytes) are being read or written at any onetime. Note that the file system should beoptimized to increase contiguity (for example,increase the size of the cylinder groups anddecrease the number of inodes per cylindergroup). UFS imposes an internal limit of 1 Mbyteon the maximum I/O size it transfers.

Commitment Level Unstable

rlim_fd_max

Description "Hard" limit on file descriptors that a singleprocess might have open. To override this limitrequires superuser privilege.

Data Type Signed integer

64 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 65: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Default 1024

Range 1 to MAXINT

Units File descriptors

Dynamic? No

Validation None

When to Change When the maximum number of open files for aprocess is not enough. Note that other limitationsin system facilities can mean that a larger numberof file descriptors is not as useful as it might be:

� A 32-bit program using standard I/O islimited to 256 file descriptors. A 64-bitprogram using standard I/O can use up to 2billion descriptors.

� select (3C) is by default limited to 1024descriptors per fd_set . Starting with theSolaris 7 release, 32-bit application code can berecompiled with a larger fd_set size (lessthan or equal to 65,536). A 64-bit applicationsees an fd_set size of 65,536, which cannotbe changed.

An alternative to changing this on a system widebasis is to use the plimit (1) command. If aparent process has its limits changed by plimit ,all children inherit the increased limit. This isuseful for daemons such as inetd .

Commitment Level Unstable

rlim_fd_cur

Description "Soft" limit on file descriptors that a singleprocess can have open. A process might adjust itsfile descriptor limit to any value up to the "hard"limit defined by rlim_fd_max by using thesetrlimit() call or issuing the limitcommand in whatever shell it is running. You do

Solaris Kernel Tunables 65

Page 66: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

not require superuser privilege to adjust the limitto any value less than or equal to the hard limit.

Data Type Signed integer

Default 256

Range 1 to MAXINT

Units File descriptors

Dynamic? No

Validation Compared to rlim_fd_max and ifrlim_fd_cur is greater than rlim_fd_max ,rlim_fd_cur is reset to rlim_fd_max .

When to Change When the default number of open files for aprocess is not enough. Increasing this valuemeans only that it is possibly not necessary for aprogram to use setrlimit (2) to increase themaximum number of file descriptors available toit.

Commitment Level Unstable

Change History See “rlim_fd_cur (Solaris 7 Release andEarlier)” on page 172 for more information.

General File Systemncsize

Description Number of entries in the directory name look-upcache (DNLC). This parameter is used by UFSand NFS to cache elements of path names thathave been resolved.

Starting with the Solaris 8 6/00 release, theDNLC also caches negative lookup information,which means it caches a name not found in thecache.

66 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 67: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Data Type Signed integer

Default 4 x (v.v_proc + maxusers ) + 320

Range 0 to MAXINT

Units DNLC entries

Dynamic? No

Validation None. Larger values cause the time it takes tounmount a file system to increase as the cachemust be flushed of entries for that file systemduring the unmount process.

When to Change Prior to the Solaris 8 6/00 release, it is difficult todetermine whether the cache is too small. It ispossible to infer this by noting the number ofenters returned by kstat -n ncstats . If thenumber seems high given the system workloadand file access pattern, this may be due to thesize of the DNLC.

Starting with the Solaris 8 6/00 release, kstat-n dnlcstats , is available for you to determinewhen entries have been removed from the DNLCbecause it was too small. The sum of thepick_heuristic and the pick_lastrepresents otherwise valid entries which werereclaimed because the cache was too small.

Note that excessive values of ncsize have animmediate impact on the system since the systemallocates a set of data structures for the DNLCbased on the value of ncsize . A system runninga 32-bit kernel allocates 36 byte structures forncsize , while a system running a 64-bit kernelallocates 64 byte structures for ncsize . Thevalue also has a further affect on UFS and NFSunless ufs_inode and nfs:nfs_rnode areexplicitly set.

Commitment Level Unstable

Solaris Kernel Tunables 67

Page 68: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

rstchown

Description Indicates whether the POSIX semantics for thechown (2) system call are in effect. POSIXsemantics are:

� A process cannot change the owner of a fileunless it is running with UID 0.

� A process cannot change the group ownershipof a file to a group in which it is not currentlya member unless it is running as UID 0.

Data Type Signed integer

Default 1, indicating that POSIX semantics are used

Range 0 = POSIX semantics not in force, 1 = POSIXsemantics used

Units Toggle (on/off)

Dynamic? Yes

Validation None

When to Change When POSIX semantics are not desired. Note thatturning off POSIX semantics opens the potentialfor various security holes. It also opens thepossibility of a user changing ownership of a fileto another user and being unable to retrieve thefile back without intervention from the user orthe system administrator.

Commitment Level Obsolete

segkpsize

Description Specify the amount of kernel pageable memoryavailable. This memory is used primarily forkernel thread stacks. Increasing this numberallows either larger stacks for the same numberof threads or more threads. This parameter canonly be set on systems running 64–bit kernels.

68 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 69: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Systems running 64-bit kernels use a defaultstack size of 24 Kbytes.

Data Type Unsigned long

Default 64–bit kernels, 2 Gbytes

32–bit kernels, 512 Mbytes

Range 64–bit kernels, 512 Mbytes - 24 Gbytes

32-bit kernels, 512 Mbytes

Units Mbytes

Dynamic? No

Validation Value is compared to minimum and maximumsizes (512 Mbytes and 24 Gbytes for 64-bitsystems) and if smaller than the minimum orlarger than the maximum, it is reset to 2 Gbytesand a message to that effect is displayed.

The actual size used in creation of the cache isthe lesser of the value specified in segkpsizeafter the constraints checking and 50% ofphysical memory.

When to Change This is one of the steps necessary to support largenumbers of processes on a system. The defaultsize of 2 Gbytes, assuming at least 1 Gbyte ofphysical memory is present, allows creation of24–Kbyte stacks for more than 87,000 kernelthreads. The size of a stack in a 64-bit kernel isthe same whether the process is a 32-bit processor a 64-bit process. If more than this number isneeded, segkpsize can be increased assumingsufficient physical memory exists.

Commitment Level Unstable

Change History See “segkpsize (Solaris 7 and Earlier Releases)”on page 173 for more information.

dnlc_dir_enable

Description Enables large directory caching.

Solaris Kernel Tunables 69

Page 70: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Data Type Unsigned integer

Default 1 (enabled)

Range 0 (disabled), 1 (enabled)

Dynamic? Yes, but do not change this tunable dynamically.It is possible to enable it if originally disabled, orto disable it if originally enabled. However,enabling, disabling, and then enabling thisparameter might lead to stale directory caches.

Validation No

When to Change Directory caching has no known problems, but ifproblems occur, then set dnlc_dir_enable to 0to disable caching.

Commitment Level Unstable

dnlc_dir_min_size

Description Minimum number of entries before caching forone directory.

Data Type Unsigned integer

Default 40

Range 0 to MAXUINT (no maximum)

Units

Dynamic? Yes, it can be changed at any time.

Validation No

When to Change If performance problems occur with cachingsmall directories, then increasednlc_dir_min_size . Note that individual filesystems might have their own range limits forcaching directories. For instance, UFS limitsdirectories to a minimum ofufs_min_dir_cache bytes (approximately 1024entries), assuming 16 bytes per entry.

70 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 71: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Commitment Level Unstable

dnlc_dir_max_size

Description Maximum number of entries cached for onedirectory.

Data Type Unsigned integer

Default MAXUINT (no maximum)

Range 0 to MAXUINT

Dynamic? Yes, it can be changed at any time.

Validation No

When to Change If performance problems occur with largedirectories, then decrease dnlc_dir_max_size .

Commitment Level Unstable

UFSbufhwm

Description Maximum amount of memory for caching I/Obuffers. The buffers are used for writing filesystem metadata (superblocks, inodes, indirectblocks, and directories). Buffers are allocated asneeded until the amount to be allocated wouldexceed bufhwm . At this point, enough buffers arereclaimed to satisfy the request.

For historical reasons, this parameter does notrequire the ufs: prefix.

Data Type Signed integer

Default 2% of physical memory

Solaris Kernel Tunables 71

Page 72: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Range 80 Kbytes to 20% of physical memory

Units Kbytes

Dynamic? No. Value is used to compute hash bucket sizesand is then stored into a data structure thatadjusts the value in the field as buffers areallocated and deallocated. Attempting to adjustthis value without following the locking protocolon a running system can lead to incorrectoperation.

Validation If bufhwm is less than 80 Kbytes or greater thanthe lesser of 20% of physical memory or twice thecurrent amount of kernel heap, it is reset to thelesser of 20% of physical memory or twice thecurrent amount of kernel heap. The followingmessage appears on the system console and inthe /var/adm/messages file.

"binit: bufhwm out of range (value attempted). Using N."

Value attempted refers to the value entered in/etc/system or by using kadb −d. N is thevalue computed by the system based on availablesystem memory.

When to Change Since buffers are only allocated as they areneeded, the overhead from the default setting isthe allocation of a number of control structures tohandle the maximum possible number of buffers.These structures consume 52 bytes per potentialbuffer on a 32–bit kernel and 104 bytes perpotential buffer on a 64–bit kernel. On a 512Mbyte 64–bit kernel this consumes 104*10144bytes, or 1 Mbyte. The header allocationsassumes buffers are 1 Kbyte in size, although inmost cases, the buffer size is larger.

The amount of memory, which has not beenallocated in the buffer pool, can be found bylooking at the bfreelist structure in the kernelwith a kernel debugger. The field of interest inthe structure is bufsize , which is the possibleremaining memory in bytes. Looking at it withthe buf macro by using mdb:

72 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 73: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

# mdb −kLoading modules: [ unix krtld genunix ip nfs ipc ]> bfreelist$<bufbfreelist:[ elided ]bfreelist + 0x78: bufsize [ elided ]

75734016

bufhwm on this system, with 6 Gbytes ofmemory, is 122277. It is not directly possible todetermine the number of header structures usedsince the actual buffer size requested is usuallylarger than 1 Kbyte. However, some space mightbe profitably reclaimed from control structureallocation for this system.

The same structure on the 512 Mbyte systemshows that only 4 Kbytes of 10144 Kbytes has notbeen allocated. When the biostats kstat isexamined with kstat -n biostats , it is seenthat the system had a reasonable ratio ofbuffer_cache_hits tobuffer_cache_lookups as well. This indicatesthat the default setting is reasonable for thatsystem.

Commitment Level Unstable

ndquot

Description Number of quota structures for the UFS filesystem that should be allocated. Relevant only ifquotas are enabled on one or more UFS filesystems. Because of historical reasons, the ufs:prefix is not needed.

Data Type Signed integer

Default ((maxusers x 40) / 4) + max_nprocs

Range 0 to MAXINT

Units Quota structures

Solaris Kernel Tunables 73

Page 74: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Dynamic? No

Validation None. Excessively large values hang the system.

When to Change When the default number of quota structures isnot enough. This situation is indicated by thefollowing message displayed on the console orwritten in the message log.

dquot table full

Commitment Level Unstable

ufs_ninode

Description Number of inodes to be held in memory. Inodesare cached globally (for UFS), not on a per-filesystem basis.

A key variable in this situation is ufs_ninode .This parameter is used to compute two key limitsthat affect the handling of inode caching. A highwatermark of ufs_ninode / 2 and a low watermark of ufs_ninode / 4 are computed.

When the system is done with an inode, one oftwo things can happen:

1. The file referred to by the inode is no longeron the system so the inode is deleted. After itis deleted, the space goes back into the inodecache for use by another inode (which is readfrom disk or created for a new file).

2. The file still exists but is no longer referencedby a running process. The inode is thenplaced on the idle queue. Any referencedpages are still in memory.

When inodes are idled, the kernel defers theidling process to a later time. If a file system is alogging file system the kernel also defers deletionof inodes. Two kernel threads do this. Eachthread is responsible for one of the queues.

When the deferred processing is done, the systemdrops the inode onto either a delete or idle

74 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 75: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

queue, each of which has a thread that can run toprocess it. When the inode is placed on thequeue, the queue occupancy is checked againstthe low watermark. If it is in excess of the lowwatermark, the thread associated with the queueis awakened. After it is awakened, the threadruns through the queue and forces any pagesassociated with the inode out to disk and freesthe inode. The thread stops when it has removed50% of the inodes on the queue at the time it wasawakened.

A second mechanism is in place if the idle threadis unable to keep up with the load. When thesystem needs to find a vnode, it goes through theufs_vget routine. The first thing vget does ischeck the length of the idle queue. If the length isabove the high watermark, then it pops twoinodes off the idle queue and "idles" them(flushes pages and frees inodes). It does thisbefore it gets an inode for its own use.

The system does attempt to optimize by placinginodes with no in-core pages at the head of theidle list and inodes with pages at the end of theidle list, but it does no other ordering of the list.Inodes are always removed from the front of theidle queue.

The only time that inodes are removed from thequeues as a whole is when a sync, unmount, orremount occur.

For historical reasons, this parameter does notrequire the ufs: prefix.

Data Type Signed integer

Default ncsize

Range 0 to MAXINT

Units Inodes

Dynamic? Yes

Solaris Kernel Tunables 75

Page 76: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Validation If ufs_ninode is less than or equal to zero, thevalue is set to ncsize .

When to Change When the default number of inodes is notenough. If the maxsize reached field asreported by kstat -n inode_cache is largerthan the maxsize field in the kstat, the value ofufs_ninode may be too small. Excessive inodeidling (described previously) can also be aproblem.

This situation can be identified by using kstat-n inode_cache to look at the inode_cachekstat . Thread idles are inodes idled by thebackground threads while vget idles are idlesby the requesting process before using an inode.

Commitment Level Unstable

ufs:ufs_WRITES

Description If ufs_WRITES is non-zero, the number of bytesoutstanding for writes on a file is checked. Seeufs_HW subsequently to determine whether thewrite should be issued or should be deferreduntil only ufs_LW bytes are outstanding. Thetotal number of bytes outstanding is tracked on aper-file basis so that if the limit is passed for onefile, it won’t affect writes to other files.

Data Type Signed integer

Default 1 (enabled)

Range 0 (disabled), 1 (enabled)

Units Toggle (on/off)

Dynamic? Yes

Validation None

When to Change When you want UFS write throttling turned offentirely. If sufficient I/O capacity does not exist,

76 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 77: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

disabling this parameter can result in long servicequeues for disks.

Commitment Level Unstable

ufs:ufs_LW and ufs:ufs_HW

Description ufs_HW is the number of bytes outstanding on asingle file barrier value. If the number of bytesoutstanding is greater than this value andufs_WRITES is set, then the write is deferred.The write is deferred by putting the threadissuing the write to sleep on a condition variable.

ufs_LW is the barrier for the number of bytesoutstanding on a single file below which thecondition variable on which other sleepingprocesses are toggled. When a write completesand the number of bytes is less than ufs_LW ,then the condition variable is toggled, whichcauses all threads waiting on the variable toawaken and try to issue their writes.

Data Type Signed integer

Default 256 x 1024 for ufs_LW and 384 x 1024 forufs_HW

Range 0 to MAXINT

Units Bytes

Dynamic? Yes

Validation None

Implicit ufs_LW and ufs_HW have meaning only ifufs_WRITES is not equal to zero. ufs_HW andufs_LW should be changed together to avoidneedless churning when processes awake andfind that they either cannot issue a write (whenufs_LW and ufs_HW are too close) or when theymight have waited longer than necessary (whenufs_LW and ufs_HW are too far apart).

Solaris Kernel Tunables 77

Page 78: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

When to Change Consider changing these values when filesystems consist of striped volumes. Theaggregate bandwidth available can easily exceedthe current value of ufs_HW. Unfortunately, thisis not a per-file system setting.

When ufs_throttles is a non-trivial number.ufs_throttles can currently be accessed onlywith a kernel debugger.

Commitment Level Unstable

TMPFStmpfs:tmpfs_maxkmem

Description Maximum amount of kernel memory that TMPFScan use for its data structures (tmpnodes anddirectory entries).

Data Type Unsigned long

Default

Range Number of bytes in one page (8192 forUltraSPARCTM systems, 4096 for all others) to25% of the available kernel memory at the timeTMPFS was first used.

Units Bytes

Dynamic? Yes

Validation None

When to Change Increase if the following message is displayed onthe console or written in the messages file.

tmp_memalloc: tmpfs over memory limit

The current amount of memory used by TMPFSfor its data structures is held in thetmp_kmemspace field, which can be examinedwith a kernel debugger.

78 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 79: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Commitment Level Unstable

tmpfs:tmpfs_minfree

Description Minimum amount of swap space that TMPFSleaves for the rest of the system.

Data Type Signed long

Default 256

Range 0 to maximum swap space size

Units Bytes

Dynamic? Yes

Validation None

When to Change To maintain a reasonable amount of swap spaceon systems with large amounts of TMPFS usage,you can increase this number. The limit has beenreached when the console or system messages filedisplays the following message.

fs-name: File system full, swap space limit exceeded

Commitment Level Unstable

Pseudo TerminalsPseudo terminals, pty s, are used for two purposes in Solaris:

� Supporting remote logins by using the telnet , rlogin , or rsh commands

� Providing the interface through which the X Window system creates commandinterpreter windows

The default number of pseudo-terminals is sufficient for a desktop workstation sotuning focuses on the number of pty s available for remote logins.

Previous versions of Solaris required that steps be taken to explicitly configure thesystem for the desired number of pty s. Starting with the Solaris 8 release, a new

Solaris Kernel Tunables 79

Page 80: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

mechanism removes the necessity for tuning in most cases. The default number ofpty s is now based on the amount of memory on the system and should be changedonly to increase the number or to decrease the default value.

Three related variables are used in the configuration process:

� pt_cnt - Default maximum number of pty s

� pt_pctofmem - Percentage of kernel memory that can be dedicated to ptysupport structures

� pt_max_pty - Hard maximum for number of pty s

pt_cnt has a default value of zero, which tells the system to limit logins based onthe amount of memory specified in pct_pctofmem , unless pt_max_pty is set. Ifpt_cnt is non-zero, pty s are allocated until this limit. When that threshold iscrossed, the system looks at pt_max_pty . If that has a non-zero value, it iscompared to pt_cnt and the pty allocation is allowed if pt_cnt is less thanpt_max_pty . If pt_max_pty is zero, pt_cnt is compared to the number of pty ssupported based on pt_pctofmem . If pt_cnt is less than this value, the ptyallocation is allowed. Note that the limit based on pt_pctofmem only comes intoplay if both pt_cnt and ptms_ptymax have their default values of zero.

To put a hard limit on pty s that is different than the maximum derived frompt_pctofmem , set pt_cnt and ptms_ptymax in /etc/system to the number ofpty s desired. The setting of ptms_pctofmem is not relevant in this case.

To dedicate a different percentage of system memory to pty support and let theoperating system manage the explicit limits, do the following:

� Do not set pt_cnt or ptms_ptymax in /etc/system .

� Set pt_pctofmem in /etc/system to the desired percentage. For example, setpt_pctofmem=10 for a 10% setting.

Note that the memory is not actually allocated until it is used in support of a pty .Once memory is allocated, it remains allocated.

pt_cnt

Description The number of /dev/pts entries available isdynamic up to a limit determined by the amountof physical memory available on the system.pt_cnt is one of three variables that determinesthe minimum number of logins that the systemcan accommodate. The default maximum numberof /dev/pts devices the system can support isdetermined at boot time by computing thenumber of pty structures that can fit in apercentage of system memory (see

80 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 81: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

pt_pctofmem next). If pt_cnt is zero, thesystem allocates up to that maximum. If pt_cntis non-zero, the system allocates to the greater ofpt_cnt and the default maximum.

Data Type Unsigned integer

Default 0

Range 0 to maxpid

Units logins/windows

Dynamic? No

Validation None

When to Change When you want to explicitly control the numberof users that can remotely log in to the system.

Commitment Level Unstable

Change History See “pt_cnt (Solaris 7 and Earlier Releases)” onpage 174 for more information.

pt_pctofmem

Description Maximum percentage of physical memory thatcan be consumed by data structures to support/dev/pts entries. A system running a 64-bitkernel consumes 176 bytes per /dev/pts entry.A system running a 32-bit kernel consumes 112bytes per /dev/pts entry.

Data Type Unsigned integer

Default 5

Range 0 to 100

Units Percentage

Dynamic? No

Validation None

Solaris Kernel Tunables 81

Page 82: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

When to Change When you want to either restrict or increase thenumber of users that can log in to the system. Avalue of zero means that no remote users can login to the system.

Commitment Level Unstable

pt_max_pty

Description Maximum number of ptys the system offers.

Data Type Unsigned integer

Default 0 (Uses system defined maximum)

Range 0 to MAXUINT

Units logins/windows

Dynamic? Yes

Validation None

Implicit Should be greater than or equal to pt_cnt .Valueis not checked until the number of ptysallocated exceeds the value of pt_cnt .

When to Change When you want to place an absolute ceiling onthe number of logins supported even if thesystem could handle more based on its currentconfiguration values.

Commitment Level Unstable

Streamsnstrpush

Description Number of modules that can be inserted into(pushed onto) into a stream.

82 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 83: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Data Type Signed integer

Default 9

Range 9 to 16

Units Modules

Dynamic? Yes

Validation None

When to Change At the direction of your software vendor. Nomessages are displayed when a STREAM exceedsits permitted push count. A value of EINVAL isreturned to the program that attempted the push.

Commitment Level Unstable

strmsgsz

Description Maximum number of bytes that a single systemcall can pass to a STREAM to be placed in thedata part of a message. Any write (2) exceedingthis size is broken into multiple messages.

Data Type Signed integer

Default 65,536

Range 0 to 262,144

Units Bytes

Dynamic? Yes

Validation None

When to Change When putmsg (2) calls return ERANGE.

Commitment Level Unstable

Solaris Kernel Tunables 83

Page 84: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

strctlsz

Description Maximum number of bytes that a single systemcall can pass to a STREAM to be placed in thecontrol part of a message.

Data Type Signed integer

Default 1024

Range 0 to MAXINT

Units Bytes

Dynamic? Yes

Validation None

When to Change At the direction of your software vendor.putmsg (2) calls return ERANGEif they attempt toexceed this limit.

Commitment Level Unstable

System V Message QueuesSystem V message queues provide a message-passing interface that enables exchangeof messages by queues created in the kernel. Interfaces are provided in the Solarisenvironment to enqueue and dequeue messages. Messages can have a typeassociated with them. Enqueueing places messages at the end of a queue. Dequeuingremoves the first message of a specific type from the queue or the first message if notype is specified.

The module is dynamically loaded on first reference. Parameters provided to thesubsystem are validated at that time. Entries in the /etc/system file must containthe msgsys: prefix.

This facility is different from the POSIX 1003.1b message queue facility.

The Solaris 8 release modified the use of some of the parameters for this facility. Themsgsys:msginfo_msgssz , msgsys:msginfo_msgmap , andmsgsys:msginfo_msgseg parameters are now obsolete. The variables have beenleft in place to avoid error messages. Any values applied are ignored.

The maximum number of messages the facility can handle at any one point in time isnow entirely defined by msgsys:msginfo_msgtql . An array of message headers

84 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 85: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

sized to the value specified in this variable is allocated and initialized as a free list.When an attempt is made to send a message, the free list is examined and if a headeris available, a buffer is allocated from kernel memory to handle the message data.The data is copied into the buffer and the message is placed in the destination queue.When the message is read, the buffer is freed and the header placed on the free list.

Previous Solaris versions would limit the number of messages either by settingmsgsys:msginfo_msgtql or by limiting the number of memory segments and thesize of the segments that were allocated to a message buffer pool. When the moduleis first loaded, it allocates a number of data structures needed to manage messages.The total space allocated for these structures must not exceed 25% of availablekernel memory, or the attempt to load fails and the following message is displayed.

msgsys: can’t load module, too much memory requested

Unlike previous Solaris versions, a message buffer pool is not allocated as part of setup and is no longer considered in the 25% of memory check.

msgsys:msginfo_msgmax

Description Maximum size of System V message.

Data Type Unsigned long

Default 2048

Range 0 to amount of physical memory

Units Bytes

Dynamic? No. Loaded into msgmaxfield of msginfostructure.

Validation None

When to Change When msgsnd(2) calls return with error ofEINVAL or at the recommendation of a softwarevendor.

Commitment Level Unstable

Solaris Kernel Tunables 85

Page 86: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

msgsys:msginfo_msgmnb

Description Maximum number of bytes that can be on anyone message queue.

Data Type Unsigned long

Default 4096

Range 0 to amount of physical memory

Units Bytes

Dynamic? No. Loaded into msgmnbfield of msginfostructure.

Validation None

When to Change When msgsnd() calls block or return with anerror of EGAIN, or at the recommendation of asoftware vendor.

Commitment Level Unstable

msgsys:msginfo_msgmni

Description Maximum number of message queues that can becreated.

Data Type Signed integer

Default 50

Range 0 to MAXINT

Dynamic? No. Loaded into msgmni field of msginfostructure.

Validation None

When to Change When msgget (2) calls return with an error ofENOSPCor at the recommendation of a softwarevendor.

Commitment Level Unstable

86 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 87: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

msgsys:msginfo_msgtql

Description Maximum number of messages that can becreated. If a msgsnd call attempts to exceed thislimit, the request is deferred until a messageheader is available. Or, if the request has set theIPC_NOWAITflag, the request fails with the errorEGAIN.

Data Type Signed integer

Default 40

Range 0 to MAXINT

Dynamic? No. Loaded into msgtql field of msginfostructure.

Validation None

When to Change When msgsnd() calls block or return with errorof EGAIN, or at the recommendation of asoftware vendor.

Commitment Level Unstable

System V SemaphoresSystem V semaphores provide counting semaphores in the Solaris environment. Inaddition to the standard set and release operations for semaphores, System Vsemaphores can have values that are incremented and decremented as needed (forexample, to represent the number of resources available). The ability is offered to dooperations on a group of semaphores simultaneously as well as to have the systemundo the last operation by a process if it dies.

Semaphores are created in sets.

The module is dynamically loaded on first reference. Parameters provided to thesubsystem are validated at that time and all data structures (including thesemaphores) are created. Values for parameters are, accordingly, not changeable atruntime because increases in values would lead to data corruption. Entries in the/etc/system file must contain the semsys: prefix.

This facility is different from the POSIX 1003.1b semaphore facility.

Solaris Kernel Tunables 87

Page 88: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

semsys:seminfo_semmni

Description Maximum number of semaphore identifiers.

Data Type Signed integer

Default 10

Range 1 to 65,535

Dynamic? No

Validation Compared to SEMA_INDEX_MAX(currently65,535) and reset to that value if larger. Awarning message is written to the console and orsystem messages file.

When to Change When the default number of sets is not enough.Generally changed at the recommendation ofsoftware vendors. No error messages aredisplayed when an attempt is made to createmore sets than are currently configured. Theapplication sees a return code of ENOSPCfrom asemget (2) call.

Commitment Level Unstable

semsys:seminfo_semmns

Description Maximum number of System V semaphores onthe system.

Data Type Signed integer

Default 60

Range 1 to MAXINT

Dynamic? No

Validation The amount of space that could possibly beconsumed by the semaphores and theirsupporting data structures is compared to 25% ofthe kernel memory available at the time themodule is first loaded. If the memory threshold is

88 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 89: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

exceeded, the module refuses to load and thesemaphore facility is not available.

When to Change When the default number of semaphores is notenough. Generally changed at therecommendation of software vendors. No errormessages are displayed when an attempt is madeto create more semaphores than are currentlyconfigured. The application sees a return code ofENOSPCfrom a semget (2) call.

Commitment Level Unstable

semsys:seminfo_semvmx

Description Maximum value a semaphore can be set to.

Data Type Unsigned short

Default 32,767

Range 1 to 65,535

Dynamic? No

Validation None

When to Change When the default value is not enough. Generallychanged at the recommendation of softwarevendors. No error messages are displayed whenthe maximum value is exceeded. The applicationsees a return code of ERANGEfrom a semop(2)call.

Commitment Level Unstable

semsys:seminfo_semmsl

Description Maximum number of System V semaphores persemaphore identifier.

Data Type Signed integer

Solaris Kernel Tunables 89

Page 90: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Default 25

Range 1 to MAXINT

Dynamic? No

Validation The amount of space that could possibly beconsumed by the semaphores and theirsupporting data structures is compared to 25% ofthe kernel memory available at the time themodule is first loaded. If the memory threshold isexceeded, the module refuses to load and thesemaphore facility is not available.

When to Change When the default value is not enough. Generallychanged at the recommendation of softwarevendors. No error messages are displayed whenan attempt is made to create more semaphores ina set than are currently configured. Theapplication sees a return code of EINVAL from asemget (2) call.

Commitment Level Unstable

semsys:seminfo_semopm

Description Maximum number of System V semaphoreoperations per semop(2) call. This parameterrefers to the number of sembufs in the sopsarray that is provided to the semop() systemcall.

Data Type Signed integer

Default 10

Range 1 to MAXINT

Dynamic? No

Validation The amount of space that could possibly beconsumed by the semaphores and theirsupporting data structures is compared to 25% ofthe kernel memory available at the time themodule is first loaded. If the memory threshold is

90 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 91: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

exceeded, the module refuses to load and thesemaphore facility is not available.

When to Change When the default value is not enough. Generallychanged at the recommendation of softwarevendors. No error messages are displayed whenan attempt is made to perform more semaphoreoperations in a single semop call than arecurrently allowed. The application sees a returncode of E2BIG from a semop() call.

Commitment Level Unstable

semsys:seminfo_semume

Description Maximum number of System V semaphore undostructures that can be used by any one process.

Data Type Signed integer

Default 10

Range 1 to MAXINT

Dynamic? No

Validation The amount of space that could possibly beconsumed by the semaphores and theirsupporting data structures is compared to 25% ofthe kernel memory available at the time themodule is first loaded. If the memory threshold isexceeded, the module refuses to load and thesemaphore facility is not available.

When to Change When the default value is not enough. Generallychanged at the recommendation of softwarevendors. No error messages are displayed whenan attempt is made to perform more undooperations than are currently configured. Theapplication sees a return code of EINVAL from asemop(2) call.

Commitment Level Unstable

Solaris Kernel Tunables 91

Page 92: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

semsys:seminfo_semaem

Description Maximum value that a semaphore’s value in anundo structure can be set to.

Data Type Unsigned short

Default 16,384

Range 1 to 65,535

Dynamic? No

Validation None

When to Change When the default value is not enough. Generallychanged at the recommendation of softwarevendors. No error messages are displayed whenan attempt is made to perform more undooperations than are currently configured. Theapplication sees a return code of EINVAL from asemop(2) call.

Commitment Level Unstable

System V Shared MemorySystem V shared memory allows the creation of a segment by a process. Cooperatingprocesses can attach to the memory segment (subject to access permissions on thesegment) and gain access to the data contained in the segment. This capability isimplemented as a loadable module. Entries in the /etc/system file must containthe shmsys : prefix. Starting with the Solaris 7 release, the keyserv daemon usesSystem V shared memory.

A special kind of shared memory known as intimate shared memory (ISM) is usedby DBMS vendors to maximize performance. When a shared memory segment ismade into an ISM segment, the memory for the segment is locked. This enables afaster I/O path to be followed and improves memory usage because a number ofkernel resources describing the segment are now shared between all processesattaching to the segment in ISM mode.

The module is dynamically loaded on first reference. Parameters provided to thesubsystem are validated at that time.

This facility is different from the POSIX 1003.1b shared memory facility.

92 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 93: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

shmsys:shminfo_shmmax

Description Maximum size of system V shared memorysegment that can be created. This parameter is anupper limit that is checked before the system seesif it actually has the physical resources to createthe requested memory segment.

Data Type Unsigned long

Default 1,048,576

Range 0 - MAXINT on 32-bit systems, MAXINT64 on64-bit systems

Units Bytes

Dynamic? No. Loaded into shmmaxfield of shminfostructure.

Validation None

When to Change When the default value is too low. Generallychanged at the recommendation of softwarevendors, but unless the size of a shared memorysegment needs to be constrained, setting thisparameter to the maximum possible value has noside effects.

Commitment Level Unstable

shmsys:shminfo_shmmin

Description Minimum size of system V shared memorysegment that can be created.

Data Type Unsigned long

Default 1

Range 0 to amount of physical memory

Units Bytes

When to Change No known reason.

Solaris Kernel Tunables 93

Page 94: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Commitment Level Unstable

shmsys:shminfo_shmmni

Description System wide limit on number of shared memorysegments that can be created.

Data Type Signed integer

Default 100

Range 0 to MAXINT

Dynamic? No. Loaded into shmmni field of shminfostructure.

Validation The amount of space consumed by the maximumpossible number of data structures to supportSystem V shared memory is checked against 25%of the currently available kernel memory at thetime the module is loaded. If the memoryconsumed is too large, the attempt to load themodule fails.

When to Change When the system limits are too low. Generallychanged on the recommendation of softwarevendors.

Commitment Level Unstable

shmsys:shminfo_shmseg

Description Limit on the number of shared memory segmentsthat any one process can create.

Data Type Signed short

Default 6

Range 0 to 32,767

Dynamic? No. Loaded into shmseg field of shminfostructure.

94 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 95: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Validation The amount of space consumed by the maximumpossible number of data structures to supportsystem V shared memory is checked against 25%of the currently available kernel memory at thetime the module is loaded. If the memoryconsumed is too large, the attempt to load themodule fails.

When to Change When the system limits are too low. Generallychanged on the recommendation of softwarevendors.

Commitment Level Unstable

segspt_minfree

Description Pages of system memory that cannot be allocatedfor ISM shared memory.

Data Type Unsigned long

Default 5% of available system memory when first ISMsegment is created.

Range 0 to 32,767

Units Pages

Dynamic? Yes

Validation None. Values that are too small can cause thesystem to hang or performance to severelydegrade when memory is consumed with ISMsegments.

When to Change On database servers with large amounts ofphysical memory using ISM, this parameter canbe tuned downward. If ISM segments are notused, this parameter has no effect. A maximumvalue of 128 Mbytes (0x4000) is almost certainlysufficient on large memory machines.

Commitment Level Unstable

Solaris Kernel Tunables 95

Page 96: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Schedulingrechoose_interval

Description Number of clock ticks before a process is deemedto have lost all affinity for the last CPU it ran on.After this interval expires, any CPU is considereda candidate for scheduling a thread. Thisparameter is relevant only for threads in thetimesharing class. Real-time threads arescheduled on the first available CPU.

Data Type Signed integer

Default 3

Range 0 to MAXINT

Dynamic? Yes

Validation None

When to Change When caches are large, or the system is running acritical process, or a set of processes that seem tosuffer from excessive cache misses not caused bydata access patterns. Consider using theprocessor set ( psrset (1M)) capabilities availableas of the Solaris 2.6 release or processor binding( pbind (1M)) before changing this parameter.

Commitment Level Unstable

Timershires_tick

Description Variable that when set causes the Solarisenvironment to use a system clock rate of 1000instead of the default value of 100.

96 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 97: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Data Type Signed integer

Default 0

Range 0 (disabled) or 1 (enabled)

Dynamic? No. Causes new system timing variable to be setat boot time. Not referenced after boot.

Validation None

When to Change When you want timeouts with a resolution ofless than 10 milliseconds and greater than orequal to 1 millisecond.

Commitment Level Unstable

timer_max

Description Number of POSIX timers available.

Data Type Signed integer

Default 32

Range 0 to MAXINT

Dynamic? No. Increasing value can cause a system crash.

Validation None

When to Change When default number of timers offered by systemis inadequate. Applications see an EGAIN errorwhen executing timer_create system calls.

Commitment Level Unstable

Solaris Kernel Tunables 97

Page 98: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Sun4u Specificconsistent_coloring

Description Starting with the Solaris 2.6 release, the ability touse different page placement policies on theUltraSPARC (sun4u) platform was introduced. Apage placement policy attempts to allocatephysical page addresses to maximize the use ofthe L2 cache. Whatever algorithm is chosen asthe default algorithm, that algorithm canpotentially provide less optimal results thananother algorithm for a particular application set.This variable changes the placement algorithmselected for all processes on the system.

Based on the size of the L2 cache, memory isdivided into bins. The page placement codeallocates a page from a bin when a page faultfirst occurs on an unmapped page. The pagechosen depends on which of the three possiblealgorithms are used:

� Page coloring - Various bits of the virtualaddress are used to determine the bin fromwhich the page is selected. This is the defaultalgorithm in the Solaris 8 release.consistent_coloring is set to zero to usethis algorithm. No per-process history existsfor this algorithm.

� Virtual addr=physical address - Consecutivepages in the program selects pages fromconsecutive bins. consistent_coloring isset to 1 to use this algorithm. No per-processhistory exists for this algorithm.

� Bin-hopping - Consecutive pages in theprogram generally allocate pages from everyother bin, but the algorithm occasionally skipsmore bins. consistent_coloring is set to 2to use this algorithm. Each process starts at arandomly selected bin and a per-processmemory of the last bin allocated is kept.

98 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 99: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Dynamic? Yes

Validation None. Values larger than 2 cause a number ofWARNING: AS_2_BIN: bad consistentcoloring value messages to appear on theconsole and the system hangs immediatelythereafter. A power-cycle is required to recover.

When to Change When the primary workload of the system is aset of long-running high-performance computing(HPC) application(s). Changing this value mightprovide better performance. File servers, databaseservers, and systems with a number of activeprocesses (for example, compile or time-sharingservers) will not benefit from changes.

Commitment Level Unstable

Solaris Kernel Tunables 99

Page 100: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

100 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 101: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

CHAPTER 3

NFS Tunable Parameters

This section describes the NFS tunable parameters. For information on kerneltunables, see Chapter 2. For information on TCP/IP tunables, see Chapter 4.

� “NFS Module Parameters” on page 101

� “nfssrv Module Parameters” on page 125

� “rpcmod Module Parameters” on page 129

Tuning the NFS EnvironmentYou can define these parameters in the /etc/system file, which is read during theboot process. Each parameter can be identified by the name of the kernel modulethat it is in and a parameter name that identifies it. See “Tuning a Solaris System” onpage 19 for more information.

Note - The names of the symbols, the modules that they reside in, and the defaultvalues can change between releases. Check the documentation for the version of theactive SunOS release before making changes or applying values from previousreleases.

NFS Module ParametersThis section describes parameters relating to the NFS kernel module.

101

Page 102: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

nfs:nfs3_pathconf_disable_cache

Description Controls the caching of pathconf (2)information for NFS Version 3 mounted filesystems.

Data Type Integer (32–bit)

Default 0 (caching enabled)

Range 0 (caching enabled), 1 (caching disabled)

Units Boolean values

Dynamic? Yes

Validation None

When to Change The pathconf information is cached on a per filebasis. However, if the server can change theinformation for a specific file dynamically, thenuse this parameter to disable caching becausethere is no mechanism for the client to validateits cache entry.

Stability Level Evolving

nfs:nfs_allow_preepoch_time

Description Controls whether files with incorrect or negativetime stamps should be made visible on the client.

Historically, neither the NFS client nor the NFSserver would do any range checking on the filetimes being returned by using these attributes.The over-the-wire time stamp values areunsigned and 32–bits long, so all values havebeen legal.

However, on a system running a 32–bit Solarisrelease, the time stamp values are signed and32–bits long. Thus, it would be possible to have atime stamp representation that appeared to beprior to January 1, 1970, or pre-epoch.

102 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 103: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

The problem on a system running a 64–bit Solarisrelease is slightly different. The time stampvalues on the 64–bit Solaris release are signedand 64–bits long. It is impossible to determinewhether a time field represents a full 32–bit timeor a negative time, that is, one prior to January 1,1970.

It is impossible to determine whether to signextend a time value when converting from 32 bitsto 64 bits. The time value should be signextended if the time value is truly a negativenumber, but should not be sign extended if itdoes truly represent a full 32–bit time value. Thisproblem is resolved by simply disallowing full32–bit time values.

Data Type Integer (32–bit)

Default 0 (32–bit time stamps disabled)

Range 0 (32–bit time stamps disabled), 1 (32–bit timestamps enabled)

Units Boolean values

Dynamic? Yes

Validation None

When to Change Even during normal operation, it is possible forthe time stamp values on some files to be setvery far in the future or very far in the past. Ifaccess to these files is desired using NFSmounted file systems, then set this parameter to 1to allow the time stamp values to be passedthrough unchecked.

Stability Level Evolving

nfs:nfs_cots_timeo

Description Controls the default RPC timeout for NFS version2 mounted file systems using connection orientedtransports such as TCP for the transport protocol.

NFS Tunable Parameters 103

Page 104: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Data Type Signed integer (32–bit)

Default 600 (60 seconds)

Range 0 to 231 - 1

Units 10th of seconds

Dynamic? Yes, but the RPC timeout for a file system is setwhen the file system is mounted. To affect aparticular file system, unmount and mount thefile system after changing this parameter.

Validation None

When to Change TCP does a good job ensuring requests andresponses are delivered appropriately. However,if the round-trip times are very large in aparticularly slow network, the NFS version 2client might time out prematurely.

Increase this parameter to prevent the client fromtiming out incorrectly. The range of values is verylarge, so increasing this value to be too largemight result in real situations where aretransmission was required to not be detectedfor long periods of time.

Stability Level Evolving

nfs:nfs3_cots_timeo

Description Controls the default RPC timeout for NFS version3 mounted file systems using connection orientedtransports such as TCP for the transport protocol.

Data Type Signed integer (32–bit)

Default 600 (60 seconds)

Range 0 to 231 - 1

Units 10th of seconds

104 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 105: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Dynamic? Yes, but the RPC timeout for a file system is setwhen the file system is mounted. To affect aparticular file system, unmount and mount thefile system after changing this parameter.

Validation None

When to Change TCP does a good job ensuring requests andresponses are delivered appropriately. However,if the round-trip times are very large in aparticularly slow network, the NFS version 3client might time out prematurely. Increase thisparameter to prevent the client from timing outincorrectly. The range of values is very large, soincreasing this value to be too large might resultin real situations where a retransmission wasrequired to not be detected for long periods oftime.

Stability Level Evolving

nfs:nfs_do_symlink_cache

Description Controls whether the contents of symbolic linkfiles are cached for NFS version 2 mounted filesystems.

Data Type Integer (32–bit)

Default 1 (caching enabled)

Range 0 (caching disabled), 1 (caching enabled)

Units Boolean values

Dynamic? Yes

Validation None

When to Change If a server changes the contents of a symboliclink file without updating the modification timestamp on the file or if the granularity of the timestamp is too large, then changes to the contentsof the symbolic link file might not be visible onthe client for extended periods. In this case, use

NFS Tunable Parameters 105

Page 106: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

this parameter to disable the caching of symboliclink contents, thus making the changes visible toapplications running on the client immediately.

Stability Level Evolving

nfs:nfs3_do_symlink_cache

Description Controls whether the contents of symbolic linkfiles are cached for NFS version 3 mounted filesystems.

Data Type Integer (32–bit)

Default 1 (caching enabled)

Range 0 (caching disabled), 1 (caching enabled)

Units Boolean values

Dynamic? Yes

Validation None

When to Change If a server changes the contents of a symboliclink file without updating the modification timestamp on the file or if the granularity of the timestamp is too large, then changes to the contentsof the symbolic link file might not be visible onthe client for extended periods. In this case, usethis parameter to disable the caching of symboliclink contents, thus making the changes visible toapplications running on the client immediately.

Stability Level Evolving

nfs:nfs_dynamic

Description Controls whether a feature known as dynamicretransmission is enabled for NFS version 2mounted file systems using connectionlesstransports such as UDP. This feature attempts toreduce retransmissions by monitoring server

106 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 107: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

response times, and then adjusting RPC timeoutsand read and write transfer sizes.

Data Type Integer (32–bit)

Default 1 (enabled)

Range 0 (disabled), 1 (enabled)

Dynamic? Yes, but this parameter is set per file system atmount time. To affect a particular file system,unmount and mount the file system afterchanging this parameter.

Validation None

When to Change In a situation where server response or networkload varies rapidly, the dynamic retransmissionsupport might incorrectly increase RPC timeoutsor reduce read and write transfer sizesunnecessarily. Disabling this functionality mightresult in increased throughput, but possibly, alsoincreasing the visibility of the spikes due toserver response or network load.

Stability Level Evolving

nfs:nfs3_dynamic

Description Controls whether a feature known as dynamicretransmission is enabled for NFS version 3mounted file systems using connectionlesstransports such as UDP. This feature attempts toreduce retransmissions by monitoring serverresponse times and then adjusting RPC timeoutsand read and write transfer sizes.

Data Type Integer (32–bit)

Default 0 (disabled)

Range 0 (disabled), 1 (enabled)

Units Boolean values

NFS Tunable Parameters 107

Page 108: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Dynamic? Yes, but this parameter is set per file system atmount time. To affect a particular file system,unmount and mount the file system afterchanging this parameter.

Validation None

When to Change In a situation where server response or networkload varies rapidly, the dynamic retransmissionsupport might incorrectly increase RPC timeoutsor reduce read and write transfer sizesunnecessarily. Disabling this functionality mightresult in increased throughput, but possibly, alsoincreasing the visibility of the spikes due toserver response or network load.

Stability Level Evolving

nfs:nfs_lookup_neg_cache

Description Controls whether a negative name cache is usedfor NFS version 2 mounted file systems. Thisnegative name cache records filenames that werelooked up, but not found. The cache is used toavoid over the network lookup requests made forfilenames that are already known to not exist.

Data Type Integer (32–bit)

Default 1 (enabled)

Range 0 (disabled), 1 (enabled)

Units Boolean values

Dynamic? Yes

Validation None

When to Change In order for the cache to perform correctly,negative entries must be strictly verified beforethey are used. This consistency mechanism isrelaxed slightly for read-only mounted filesystems by assuming that the file system on theserver is not changing or is changing very slowly

108 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 109: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

and that it is okay for such changes to propagateslowly to the client. The consistency mechanismbecomes the normal attribute cache mechanismin this case.

If file systems are mounted read-only on theclient, but are expected to change on the serverand these changes need to be seen immediatelyby the client, then use this parameter to disablethe negative cache.

Stability Level Evolving

nfs:nfs3_lookup_neg_cache

Description Controls whether a negative name cache is usedfor NFS version 3 mounted file systems. Thisnegative name cache records filenames that werelooked up, but were not found. The cache is usedto avoid over-the-network lookup requests madefor filenames that are already known to not exist.

Data Type Integer (32–bit)

Default 1 (enabled)

Range 0 (disabled), 1 (enabled)

Units Boolean values

Dynamic? Yes

Validation None

When to Change In order for the cache to perform correctly,negative entries must be strictly verified beforethey are used. This consistency mechanism isrelaxed slightly for read-only mounted filesystems by assuming that the file system on theserver is not changing or is changing very slowlyand that it is okay for such changes to propagateslowly to the client. The consistency mechanismbecomes the normal attribute cache mechanismin this case.

NFS Tunable Parameters 109

Page 110: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

If file systems are mounted read-only on theclient, but are expected to change on the serverand these changes need to be seen immediatelyby the client, then use this parameter to disablethe negative cache.

Stability Level Evolving

nfs:nfs_max_threads

Description Controls the number of kernel threads thatperform asynchronous I/O for the NFS version 2client. Since NFS is based on RPC and RPC isinherently synchronous, separate executioncontexts are required to perform NFS operationsthat are asynchronous from the calling thread.

The operations which can be executedasynchronously are read for read-ahead, readdirfor readdir read-ahead, and write for putpageand pageio requests.

Data Type Integer (16–bit)

Default 8

Range 0 to 215 - 1

Units Threads

Dynamic? Yes, but this parameter is set per file system atmount time. To affect a particular file system,unmount and mount the file system afterchanging this parameter.

Validation None

When to Change Change this parameter to increase or reduce thenumber of simultaneous I/O operations that areoutstanding at any given time. For example, for avery low bandwidth network, you might want todecrease this value so that the NFS client doesnot overload the network. Alternately, if thenetwork is very high bandwidth and the clientand server have sufficient resources, you might

110 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 111: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

want to increase this value to more effectivelyutilize the available network bandwidth andclient and server resources.

Stability Level Unstable

nfs:nfs3_max_threads

Description Controls the number of kernel threads thatperform asynchronous I/O for the NFS version 3client. Since NFS is based on RPC and RPC isinherently synchronous, separate executioncontexts are required to perform NFS operationsthat are asynchronous from the calling thread.

The operations that can be executedasynchronously are read for read-ahead, readdirfor readdir read-ahead, write for putpage andpageio requests, and commit.

Data Type Integer (16–bit)

Default 8

Range 0 to 215 - 1

Units Threads

Dynamic? Yes, but this parameter is set per file system atmount time. To affect a particular file system,unmount and mount the file system afterchanging this parameter.

Validation None

When to Change Change this parameter to increase or reduce thenumber of simultaneous I/O operations that areoutstanding at any given time. For example, for avery low bandwidth network, you might want todecrease this value so that the NFS client doesnot overload the network. Alternately, if thenetwork is very high bandwidth and the clientand server have sufficient resources, you mightwant to increase this value to more effectively

NFS Tunable Parameters 111

Page 112: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

utilize the available network bandwidth and theclient and server resources.

Stability Level Unstable

nfs:nfs_nra

Description Controls the number of read-ahead operationsthat are queued by the NFS version 2 client whensequential access to a file is discovered. Theseread-ahead operations increase concurrency andread throughput. Each read-ahead request isgenerally for 8192 bytes of file data.

Data Type Integer (32–bit)

Default 4

Range 0 to 231 - 1

Units Read-ahead requests

Dynamic? Yes

Validation None

When to Change Change this parameter to increase or reduce thenumber of read-ahead requests that areoutstanding for a specific file at any given time.For example, for a very low bandwidth networkor on a low memory client, you might want todecrease this value so that the NFS client doesnot overload the network or the system memory.Alternately, if the network is very highbandwidth and the client and server havesufficient resources, you might want to increasethis value to more effectively utilize the availablenetwork bandwidth and the client and serverresources.

Stability Level Unstable

112 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 113: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

nfs:nfs3_nra

Description Controls the number of read-ahead operationsthat are queued by the NFS version 3 client whensequential access to a file is discovered. Theseread-ahead operations increase concurrency andread throughput. Each read-ahead request isgenerally for 32,768 bytes of file data.

Data Type Integer (32–bit)

Default 4

Range 0 to 231 - 1

Units Read-ahead requests

Dynamic? Yes

Validation None

When to Change Change this parameter to increase or reduce thenumber of read-ahead requests that areoutstanding for a specific file at any given time.For example, for a very low bandwidth networkor on a low memory client, you might want todecrease this value so that the NFS client doesnot overload the network or the system memory.Alternately, if the network is very highbandwidth and the client and server havesufficient resources, you might want to increasethis value to more effectively utilize the availablenetwork bandwidth and the client and serverresources.

Stability Level Unstable

nfs:nrnode

Description Controls the size of the rnode cache on the NFSclient.

The rnode cache, used by both NFS version 2and 3 clients, is the central data structure thatdescribes a file on the NFS client. It contains the

NFS Tunable Parameters 113

Page 114: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

file handle that identifies the file on the serverand also contains pointers to various caches usedby the NFS client to avoid network calls to theserver. Each rnode has a one-to-one associationwith a vnode . The vnode caches file data.

The NFS client attempts to keep a minimumnumber of rnode s around to attempt to avoiddestroying cached data and metadata. When anrnode is reused or freed, the cached data andmetadata must be destroyed.

Data Type Integer (32–bit)

Default The default setting of this parameter is 0, whichmeans that the value of nrnode should be set tothe value of the ncsize parameter. Actually, anynon-positive value of nrnode results in nrnodebeing set to the value of ncsize .

Range 1 to 231 - 1

Units rnode s

Dynamic? No. This value can only be changed by adding orchanging the parameter in the /etc/system file,and then rebooting the system.

Validation The system enforces a maximum value such thatthe rnode cache can only consume 25% ofavailable memory.

When to Change Since rnode s are created and destroyeddynamically, the system tends to settle upon anrnode-size cache, automatically adjusting the sizeof the cache as memory pressure on the systemincreases or as more files are simultaneouslyaccessed. However, in certain situations, it mightbe helpful to set the value of nrnode if the mixof files being accessed can be predicted inadvance. For example, if the NFS client isaccessing a few very large files, it might be usefulto set the value of nrnode to be a small numberso that system memory can cache file datainstead of rnode s. Alternately, if the client isaccessing many small files, it might be helpful toset the value of nrnode large enough to optimize

114 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 115: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

for storing file metadata to reduce the number ofnetwork calls for metadata.

Although it is not recommended, the rnodecache can be effectively disabled by setting thevalue of nrnode to 1. This instructs the client toonly cache 1 rnode , which means that it isreused frequently.

Stability Level Evolving

nfs:nfs_shrinkreaddir

Description Some older NFS servers might incorrectly handleNFS version 2 READDIRrequests for more than1024 bytes of directory information. This is dueto a bug in the server implementation. However,this parameter contains a workaround in the NFSversion 2 client.

When this parameter is enabled, the client doesnot generate a READDIRrequest for larger than1024 bytes of directory information. If thisparameter is disabled, then the over-the-wire sizeis set to the minimum of either the size passed inby using the getdents (2) system call or byusing NFS_MAXDATA, which is 8192 bytes.

Data Type Integer (32–bit)

Default 0 (disabled)

Range 0 (disabled), 1 (enabled)

Units Boolean values

Dynamic? Yes

Validation None

When to Change Examine the value of this parameter if an olderNFS version 2 only server is used andinteroperability problems are seen when trying toread directories. Enabling this parameter mightcause a slight performance drop for applicationsthat read directories.

NFS Tunable Parameters 115

Page 116: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Stability Level Evolving

nfs:nfs_write_error_interval

Description Controls the time duration in between loggingENOSPCand EDQUOTwrite errors seen by theNFS client. It affects both NFS version 2 and 3clients.

Data Type Long integer (32 bits on 32–bit platforms and 64bits on 64–bit platforms)

Default 5 seconds

Range 0 to 231 - 1 on 32–bit platforms

0 to 263 - 1 on 64–bit platforms

Units Seconds

Dynamic? Yes

Validation None

When to Change Increase or decrease the value of this parameterin response to the volume of messages beinglogged by the client. Typically, you might want toincrease the value of this parameter to decreasethe number of out of space messages beingprinted when a full file system on a server isbeing actively used.

Stability Level Evolving

nfs:nfs_write_error_to_cons_only

Description Controls whether NFS write errors are logged tothe system console and syslog or to the systemconsole only. It affects messages for both NFSversion 2 and 3 clients.

Data Type Integer (32–bit)

116 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 117: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Default 0 (system console and syslog )

Range 0 (system console and syslog ), 1 (systemconsole)

Units Boolean values

Dynamic? Yes

Validation None

When to Change Examine the value of this parameter to avoidfilling up the file system containing the messageslogged by the syslogd(1M) daemon. When thisparameter is enabled, messages are printed onthe system console only and are not copied to thesyslog messages file.

Stability Level Evolving

nfs:nfs_disable_rddir_cache

Description Controls the use of a cache to hold responsesfrom NFS version 2 READDIRand NFS Version 3READDIRand READDIRPLUSrequests. This cacheavoids over-the-wire calls to the server to retrievedirectory information.

Data Type Integer (32–bit)

Default 0 (caching enabled)

Range 0 (caching enabled), 1 (caching disabled)

Units Boolean values

Dynamic? Yes

Validation None

When to Change Examine the value of this parameter ifinteroperability problems develop due to a serverthat does not update the modification time on adirectory when a file or directory is created in itor removed from it. The symptoms are that new

NFS Tunable Parameters 117

Page 118: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

names do not appear in directory listings afterthey have been added to the directory or that oldnames do not disappear after they have beenremoved from the directory.

This parameter controls the caching for both NFSversion 2 and 3 mounted file systems. Thisparameter applies to all NFS mounted filesystems, so caching cannot be disabled orenabled on a per file system basis.

Stability Level Evolving

nfs:nfs3_bsize

Description Controls the logical block size used by the NFSversion 3 client. This block size represents theamount of data that the client attempts to readfrom or write to the server when it needs to doan I/O.

Data Type Unsigned integer (32–bit)

Default 32,768 (32 Kbytes)

Range 0 to 231 - 1

Units Bytes

Dynamic? Yes, but the block size for a file system is setwhen the file system is mounted. To affect aparticular file system, unmount and mount thefile system after changing this parameter.

Validation None. Setting this parameter too low or too highmight cause the system to malfunction. Do notset this parameter to anything less thanPAGESIZE for the specific platform. Do not setthis parameter too high because it might causethe system to hang waiting for memoryallocations to be granted.

When to Change Examine the value of this parameter whenattempting to change the maximum data transfersize. Change this parameter in conjunction with

118 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 119: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

the nfs3_max_transfer_size parameter. Iflarger transfers are desired, increase bothparameters. If smaller transfers are desired, thenjust reducing this parameter should suffice.

Stability Level Unstable

nfs:nfs_async_clusters

Description Controls the mix of asynchronous requests thatare generated by the NFS version 2 client. Thereare four types of asynchronous requests,read-ahead, putpage, pageio, and readdir-ahead.The client attempts to round-robin between thesedifferent request types to attempt to be fair andnot starve one operation type in favor of another.

However, functionality in some NFS version 2servers such as write gathering depends uponcertain behaviors of existing NFS Version 2clients. In particular, this functionality dependsupon the client sending out multiple WRITErequests at approximately the same time. If onerequest is taken out of the queue at a time, theclient would be defeating this server functionalitydesigned to enhance performance for the client.

Thus, use this parameter to control the number ofrequests of each type that are sent out beforechanging types.

Data Type Unsigned integer (32–bit)

Default 1

Range 0 to 231 - 1

Units Asynchronous requests

Dynamic? Yes, but the cluster setting for a file system is setwhen the file system is mounted. To affect aparticular file system, unmount and mount thefile system after changing this parameter.

NFS Tunable Parameters 119

Page 120: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Validation None. However, setting the value of thisparameter to 0 causes all of the queued requestsof a particular type to be processed beforemoving on to the next type. This effectivelydisables the fairness portion of the algorithm.

When to Change Change this parameter to increase the number ofeach type of asynchronous operation that isgenerated before switching to the next type. Thismight help with server functionality thatdepends upon clusters of operations coming fromthe client.

Stability Level Unstable

nfs:nfs3_async_clusters

Description Controls the mix of asynchronous requests thatare generated by the NFS version 3 client. Thereare five types of asynchronous requests,read-ahead, putpage, pageio, readdir-ahead, andcommit. The client attempts to round-robinbetween these different request types to attemptto be fair and not starve one operation type infavor of another.

However, functionality in some NFS version 3servers such as write gathering depends uponcertain behaviors of existing NFS version 3clients. In particular, this functionality dependsupon the client sending out multiple WRITErequests at approximately the same time. If onerequest is taken out of the queue at a time, theclient would be defeating this server functionalitydesigned to enhance performance for the client.

Thus, use this parameter to control the number ofrequests of each type that are sent out beforechanging types.

Data Type Unsigned integer (32–bit)

Default 1

Range 0 to 231 - 1

120 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 121: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Units Asynchronous requests

Dynamic? Yes, but the cluster setting for a file system is setwhen the file system is mounted. To affect aparticular file system, unmount and mount thefile system after changing this parameter.

Validation None. However, setting the value of thisparameter to 0 causes all of the queued requestsof a particular type to be processed beforemoving on to the next type. This effectivelydisables the fairness portion of the algorithm.

When to Change Change this parameter to increase the number ofeach type of asynchronous operation that isgenerated before switching to the next type. Thismight help with server functionality thatdepends upon clusters of operations coming fromthe client.

Stability Level Unstable

nfs:nfs_async_timeout

Description Controls the duration of time that threads, whichexecute asynchronous I/O requests, sleep withnothing to do before exiting. When there are nomore requests to execute, each thread goes tosleep. If no new requests come in before thistimer expires, the thread wakes up and exits. If arequest does arrive, a thread is woken up toexecute requests until there are none again, andthen goes back to sleep waiting for anotherrequest to arrive, or for the timer to expire.

Data Type Integer (32–bit)

Default 6000 (1 minute expressed as 60 sec * 100Hz )

Range 0 to 231 - 1

Units Hz (Typically, the clock runs at 100Hz)

Dynamic? Yes

NFS Tunable Parameters 121

Page 122: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Validation None. However, setting this parameter to anon-positive value has the affect of having thesethreads exit as soon as there are no requests inthe queue for them to process.

When to Change If the behavior of applications in the system isknown precisely and the rate of asynchronousI/O requests can be predicted, it might bepossible to tune this parameter to optimizeperformance slightly in either of the followingways:

� By making the threads expire more quickly,thus freeing up kernel resources more quickly,

� Or, by making them expire more slowly, thusavoiding thread create and destroy overhead.

Stability Level Evolving

nfs:nacache

Description Tunes the number of hash queues that access thefile access cache on the NFS client. The file accesscache stores file access rights that users have withrespect to files that they are trying to access. Thecache itself is dynamically allocated, but the hashqueues used to index into it are staticallyallocated. The algorithm assumes that there isone access cache entry per active file and four ofthese access cache entries per hash bucket. Thus,by default, the value of this parameter is set tothe value of the nrnode parameter.

Data Type Integer (32–bit)

Default The default setting of this parameter is 0, whichmeans that the value of nacache should be setto the value of the nrnode parameter.

Range 1 to 231 - 1

Units Access cache entries

122 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 123: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Dynamic? No. This value can only be changed by adding orchanging the parameter in the /etc/system file,and then rebooting system.

Validation None. However, setting this parameter to anegative value will probably cause the system totry to allocate a very large set of hash queues,and then hang while trying to do so.

When to Change Examine the value of this parameter if the basicassumption of one access cache entry per filewould be violated. This might be true forsystems in a time sharing mode where multipleusers are accessing the same file at about thesame time. In this case, it might be helpful toincrease the expected size of the access cache sothat the hashed access to the cache stays efficient.

Stability Level Evolving

nfs:nfs3_jukebox_delay

Description Controls the duration of time that the NFSversion 3 client waits to transmit a new requestafter receiving the error, NFS3ERR_JUKEBOX,from a previous request. The error,NFS3ERR_JUKEBOX, is generally returned fromthe server when the file is temporarilyunavailable for some reason. These situations aregenerally associated with hierarchical storage andCD or tape jukeboxes.

Data Type Long integer (32 bits on 32–bit platforms and 64bits on 64–bit platforms)

Default 1000 (10 seconds expressed as 10 sec * 100Hz )

Range 0 to 231 - 1 on 32–bit platforms

0 to 263 - 1 on 64–bit platforms

Units Hz (typically the clock runs at 100Hz)

Dynamic? Yes

NFS Tunable Parameters 123

Page 124: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Validation None

When to Change Examine the value of this parameter and perhapsadjust it to match the behaviors exhibited by theserver. The value should be increased if thedelays in making the file available are long inorder to reduce network overhead due torepeated retransmissions. The value can also bedecreased to reduce the delay in discovering thatthe file has become available.

Stability Level Evolving

nfs:nfs3_max_transfer_size

Description Controls the maximum size of the data portion ofan NFS version 3 READ, WRITE, READDIR, orREADDIRPLUSrequest. This parameter controlsboth the maximum size of request that the serverreturns as well as the maximum size of a requestthat the client generates.

Data Type Integer (32–bit)

Default 32, 768 (32 kbytes)

Range 0 to 231 - 1

Units Bytes

Dynamic? Yes

Validation None. Although setting the maximum transfersize on the server to 0 will probably either causeclients to malfunction or just decide not toattempt to talk to the server.

There is also a limit on the maximum transfersize when using NFS over the UDP transport.UDP has a hard limit of 64 kbytes per datagram.This 64 kbytes must include the RPC header aswell as other NFS information, in addition to thedata portion of the request. Setting the limit toolarge might result in errors from UDP and

124 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 125: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

communication problems between the client andthe server.

When to Change Change this parameter to tune the size of databeing passed over the network. In general, thenfs3_bsize parameter should also be updatedto reflect changes in this parameter. For example,when attempting to reduce the defaultover-the-wire transfer size to 8 kbytes, the valueof both the nfs3_max_transfer_size andnfs3_bsize parameters should be changed to8192 to avoid using multiple operations, eachreading or writing 8 kbytes. Alternately, whenattempting to increase the transfer size beyond 32kbytes, then nfs3_bsize should also beupdated to reflect the increased value, otherwiseno change in the over-the-wire request size isseen.

Stability Level Unstable

nfssrv Module ParametersThis section describes NFS parameters for the nfssrv module.

nfssrv:nfs_portmon

Description Controls some security checking that the NFSserver can do to attempt to enforce integrity onthe part of its clients. It can check to see whetherthe source port from which a request was sentwas a reserved port. This is a port whose numberis less than 1024. For BSD based systems, theseports are reserved to processes being run by root.This checking can prevent users from writingtheir own RPC-based applications to defeat theaccess checking that the NFS client uses.

Data Type Integer (32–bit)

Default 0 (checking disabled)

NFS Tunable Parameters 125

Page 126: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Range 0 (checking disabled), 1 (checking enabled)

Units Boolean values

Dynamic? Yes

Validation None

When to Change Use this parameter to prevent malicious usersfrom gaining access to files by using the NFSserver that they would not ordinarily have accessto. However, the reserved port notion is notuniversally supported. Thus, the security aspectsof the check are very weak. Also, not all NFSclient implementations bind their transportendpoints to a port number in the reservedrange, so interoperability problems might result ifthe checking is enabled.

Stability Level Evolving

nfssrv:rfs_write_async

Description Controls the behavior of the NFS version 2 serverwhen it processes WRITErequests. The NFSversion 2 protocol mandates that all modifieddata and metadata associated with the WRITErequest reside on stable storage before the servercan respond to the client. NFS version 2 WRITErequests are limited to 8192 bytes of data. Thus,each WRITErequest might cause multiple smallwrites to the storage subsystem. This can cause aperformance problem.

One trick to accelerate NFS version 2 WRITEs isto take advantage of a client behavior. Clientstend to send out WRITErequests in batches. Theserver can take advantage of this behavior byclustering together the different WRITErequestsinto a single request to the underlying filesystem. Thus, the data to be written to thestorage subsystem can be written in fewer, largerrequests. This can increase the throughput forWRITErequests tremendously.

126 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 127: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Data Type Integer (32–bit)

Default 1 (clustering enabled)

Range 0 (clustering disabled), 1 (clustering enabled)

Units Boolean values

Dynamic? Yes

Validation None

When to Change Some very small NFS clients, particularly PCclients, might not batch WRITErequests. Thus,the behavior required from the clients might notexist, and the clustering in the NFS version 2server might just add overhead and slow downperformance instead of increasing it.

Stability Level Evolving

nfssrv:nfsauth_ch_cache_max

Description Controls the size of the cache of client handlesthat contact the NFS authentication server. Thisserver authenticates NFS clients to determinewhether they are allowed access to the file handlethat they are trying to use.

Data Type Integer (32–bit)

Default 16

Range 0 to 231 - 1

Units Client handles

Dynamic? Yes

Validation None

When to Change This cache is not dynamic, so attempts to allocatea client handle when all are busy will fail. Thisresults in requests being dropped by the NFSserver because they could not be authenticated.

NFS Tunable Parameters 127

Page 128: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Most of the time, this is not a problem becausethe NFS client just times out and retransmits therequest. However, for soft-mounted file systemson the client, the client might time out, not retrythe request, and then return an error to theapplication. This might have been avoided byensuring that the size of the cache on the serveris large enough to handle the load.

Stability Level Unstable

nfssrv:exi_cache_time

Description Controls the duration of time that entries are heldin the NFS authentication cache before beingpurged due to memory pressure in the system.

Data Type Long integer (32 bits on 32–bit platforms and 64bits on 64–bit platforms)

Default 3600 seconds (1 hour)

Range 0 to 231 - 1 on 32–bit platforms

0 to 263 - 1 on 64–bit platforms

Units Seconds

Dynamic? Yes

Validation None

When to Change The size of the NFS authentication cache can beadjusted by varying the minimum age of entriesthat can get purged from the cache. The size ofthe cache should be controlled so that it is notallowed to grow too large, thus using systemresources that are not allowed to be released dueto this aging process.

Stability Level Evolving

128 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 129: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

rpcmod Module ParametersThis section describes NFS parameters for the rpcmod module.

rpcmod:clnt_max_conns

Description Controls the number of TCP connections that theNFS client uses when communicating with eachNFS server. The kernel RPC is constructed so thatit can multiplex RPCs over a single connection,but multiple connections can be used if desired.

Data Type Integer (32–bit)

Default 1

Range 1 to 231 - 1

Units Connections

Dynamic? Yes

Validation None

When to Change In general, 1 connection is sufficient to achievefull network bandwidth. However, if TCP cannotutilize the bandwidth offered by the network in asingle stream, then multiple connections mightincrease the throughput between the client andthe server.

Increasing the number of connections doesn’tcome for free though. The price for increasing thenumber of connections is increased kernelresource usage to keep track of each of theconnections.

Stability Level Evolving

NFS Tunable Parameters 129

Page 130: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

rpcmod:clnt_idle_timeout

Description Controls the duration of time on the client that aconnection between the client and server isallowed to remain idle before being closed.

Data Type Long integer (32 bits on 32–bit platforms and 64bits on 64–bit platforms)

Default 300,000 milliseconds (5 minutes)

Range 0 to 231 - 1 on 32–bit platforms

0 to 263 - 1 on 64–bit platforms

Units Milliseconds

Dynamic? Yes

Validation None

When to Change Use this parameter to change the time that idleconnections are allowed to exist on the clientbefore being closed, if desired. You might mightwant to close connections at a faster rate to avoidconsuming system resources.

Stability Level Evolving

rpcmod:svc_idle_timeout

Description Controls the duration of time on the server that aconnection between the client and server isallowed to remain idle before being closed.

Data Type Long integer (32 bits on 32–bit platforms and 64bits on 64–bit platforms)

Default 360,000 milliseconds (6 minutes)

Range 0 to 231 - 1 on 32–bit platforms

0 to 263 - 1 on 64–bit platforms

Units Milliseconds

130 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 131: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Dynamic? Yes

Validation None

When to Change Use this parameter to change the time that idleconnections are allowed to exist on the serverbefore being closed, if desired. Close connectionsat a faster rate to avoid consuming systemresources, if desired.

Stability Level Evolving

rpcmod:svc_default_stksize

Description Sets the size of the kernel stack for kernel RPCservice threads.

Data Type Integer (32–bit)

Default The default is 0, which means set the stack size tothe system default.

Range 0 to 231 - 1

Units Bytes

Dynamic? The stack size is set when the thread is created.Therefore, changes to this parameter do not affectexisting threads but are applied to all newthreads that are allocated.

Validation None

When to Change Possibly, very deep call depths can cause thestack to overflow and cause red zone faults. Thecombination of a fairly deep call depth for thetransport, coupled with a deep call depth for thelocal file system can cause NFS service threads tooverflow their stacks.

Set this parameter to a multiple of the hardwarepagesize on the platform.

Stability Level Evolving

NFS Tunable Parameters 131

Page 132: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

rpcmod:svc_default_max_same_xprt

Description Controls the maximum number of requests thatare processed for each transport endpoint beforeswitching transport endpoints. The kernel RPCworks by having a pool of service threads and apool of transport endpoints. Any one of theservice threads can process requests from anyone of the transport endpoints. For performance,multiple requests on each transport endpoint areconsumed before switching to a differenttransport endpoint. This approach offersperformance benefits while avoiding starvation.

Data Type Integer (32–bit)

Default 8

Range 0 to 231 - 1

Units Requests

Dynamic? Yes, but the maximum number of requests toprocess before switching transport endpoints isset when the transport endpoint is configuredinto the kernel RPC subsystem. Changes to thisparameter only affect new transport endpoints,not existing ones.

Validation None

When to Change Tune this number so that services can takeadvantage of client behaviors such as theclustering that accelerate NFS version 2 WRITErequests. It is possible that increasing thisparameter results in the server being better ableto take advantage of client behaviors.

Stability Level Evolving

rpcmod:maxdupreqs

Description Controls the size of the duplicate request cachethat detect RPC level retransmissions onconnectionless transports. This cache is indexed

132 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 133: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

by the client network address and the RPCprocedure number, program number, versionnumber, and the transaction ID. This cacheavoids processing of retransmitted requests thatmight be non-idempotent.

Data Type Integer (32–bit)

Default 1024

Range 1 to 231 - 1

Units Requests

Dynamic? The cache is dynamically sized, but the hashqueues that provide fast access to the cache arestatically sized. Making the cache very largemight result in long search times to find entriesin the cache.

Do not set the value of this parameter to 0. Itprevents the NFS server from handlingnon-idempotent requests.

Validation None

When to Change Examine the value of this parameter if falsefailures are being seen by NFS clients. Forexample, if an attempt to create a directory fails,but the directory is actually created, it is possiblethat a retransmitted MKDIRrequest was notdetected by the server.

The size of the cache should match the load onthe server. The cache records non-idempotentrequests and so only needs to track a portion ofthe total requests. It does need to hold theinformation long enough to be able to detect aretransmission on the part of the client. Typically,the client timeout for connectionless transports isrelatively short, starting at about 1 second andincreasing to about 20 seconds.

Stability Level Unstable

NFS Tunable Parameters 133

Page 134: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

rpcmod:cotsmaxdupreqs

Description Controls the size of the duplicate request cachethat detects RPC level retransmissions onconnection oriented transports. This cache isindexed by the client network address and theRPC procedure number, program number,version number, and the transaction ID. Thiscache avoids processing of retransmitted requeststhat might be non-idempotent.

Data Type Integer (32–bit)

Default 1024

Range 1 to 231 - 1

Units Requests

Dynamic? Yes

Validation The cache is dynamically sized, but the hashqueues that provide fast access to the cache arestatically sized. Making the cache very largemight result in long search times to find entriesin the cache.

Do not set the value of this parameter to 0. Itprevents the NFS server from handlingnon-idempotent requests.

When to Change Examine the value of this parameter if falsefailures are being seen by NFS clients. Forexample, if an attempt to create a directory fails,but the directory is actually created, it is possiblethat a retransmitted MKDIRrequest was notdetected by the server.

The size of the cache should match the load onthe server. The cache records non-idempotentrequests and so only needs to track a portion ofthe total requests. It does need to hold theinformation long enough to be able to detect aretransmission on the part of the client. Typically,the client timeout for connection orientedtransports is very long, about 1 minute. Thus,entries need to stay in the cache for fairly longtimes.

134 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 135: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Stability Level Unstable

NFS Tunable Parameters 135

Page 136: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

136 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 137: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

CHAPTER 4

TCP/IP Tunable Parameters

This section describes the TCP/IP tunable parameters. For information on kerneltunables, see Chapter 2. For information on NFS tunables, see Chapter 3.

� “IP Tunable Parameters” on page 138

� “TCP Tunable Parameters” on page 144

� “UDP Tunable Parameters” on page 159

� “Per-Route Metrics” on page 160

Overview of Tuning TCP/IP ParametersYou can set all of the tuning parameters described in this chapter with the nddcommand, except for the following two parameters that can only be set in the/etc/system file:

� “tcp_conn_hash_size ” on page 153

� “ipc_tcp_conn_hash_size ” on page 154

Use the following syntax to set TCP/IP parameters with the ndd command.

# ndd -set driver parameter

For example, the following ndd command disables IP forwarding.

# ndd -set /dev/ip ip_forwarding 0

See ndd (1M) for more information.

137

Page 138: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

To set a TCP/IP parameter across system reboots, include the appropriate nddcommand in a system startup script. Use the following guidelines to create a systemstartup script to include ndd commands:

� Create a script in the /etc/init.d directory and create links to it in the/etc/rc2.d , /etc/rc1.d , and /etc/rcS.d directories.

� The script should run between the existing S69inet and S72inetsvc scripts.

� Name the script with the S70 or S71 prefix. Scripts with the same prefix are runin some sequential way so it doesn’t matter if there is more than one script withthe same prefix.

� See the READMEfile in the /etc/init.d directory for more information onnaming run control scripts.

See “Run Control Scripts” in System Administration Guide, Volume 1 for moreinformation on creating a startup script.

TCP/IP Parameter ValidationAll of the TCP/IP parameters described in this section are checked to verify they fallin the parameter range, which is provided in each tunable section, except for the twoparameters that can be set only in the /etc/system file described above. See thevalidation section for “tcp_conn_hash_size ” on page 153 and“ipc_tcp_conn_hash_size ” on page 154 for more information.

Internet Request for Comments (RFCs)Internet protocol and standard specifications are described in RFC documents. Youcan get copies of RFCs by using anonymous ftp to the sri-nic.arpa machine.Browse RFC topics by viewing the rfc-index.txt file at this site.

IP Tunable ParametersThis section describes some of the IP tunable parameters.

138 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 139: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

ip_icmp_err_interval andip_icmp_err_burst

Description Control the rate of IP in generating IPv4 or IPv6ICMP error messages. IP generates only up toip_icmp_err_burst IPv4 or IPv6 ICMP errormessages in any ip_icmp_err_interval . Thisparameter protects IP from denial of serviceattacks. Set ip_icmp_err_interval to 0 todisable IP to generate IPv4 or IPv6 ICMP errormessages.

Default 100 milliseconds for ip_icmp_err_interval

10 for ip_icmp_err_burst

Range 0 - 99,999 milliseconds forip_icmp_err_interval

1 - 99,999 for ip_icmp_err_burst

Dynamic? Yes

When to Change Change the parameter values if you need ahigher error message generation rate fordiagnostic purposes.

Commitment Level Unstable

ip_forwarding and ip6_forwarding

Description Control whether IP does IPv4 or IPv6 forwardingbetween interfaces. See alsoxxx:ip_forwarding below.

Default 0 (disabled)

Range 0 (disabled), 1 (enabled)

Dynamic? Yes

When to Change If IP forwarding is needed, enable it.

Commitment Level Unstable

TCP/IP Tunable Parameters 139

Page 140: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

xxx:ip_forwarding

Description Enables IPv4 forwarding for a particular xxxinterface. The exact name of the parameter isinterface-name:ip_forwarding . For example,two interfaces are hme0 and hme1. Theircorresponding parameter names are:

hme0:ip_forwarding andhme1:ip_forwarding

Default 0 (disabled)

Range 0 (disabled), 1 (enabled)

Dynamic? Yes

When to Change If you need IPv4 forwarding, use this parameterto enable forwarding on a per-interface basis.

Commitment Level Unstable

ip_respond_to_echo_broadcast andip6_respond_to_echo_multicast

Description Control whether IPv4 or IPv6 responds tobroadcast ICMPv4 echo request or multicastICMPv6 echo request.

Default 1 (enabled)

Range 0 (disabled), 1 (enabled)

Dynamic? Yes

When to Change If you do not want this behavior for securityreasons, disable it.

Commitment Level Unstable

140 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 141: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

ip_send_redirects andip6_send_redirects

Description Control whether IPv4 or IPv6 sends out ICMPv4or ICMPv6 redirect messages. See also“ip_forwarding and ip6_forwarding ” onpage 139.

Default 1 (enabled)

Range 0 (disabled), 1 (enabled)

Dynamic? Yes

When to Change If you do not want this behavior for securityreasons, disable it.

Commitment Level Unstable

ip_forward_src_routed andip6_forward_src_routed

Description Control whether IPv4 or IPv6 forwards packetswith source IPv4 routing options or IPv6 routingheaders. See also “ip_forwarding andip6_forwarding ” on page 139.

Default 1 (enabled)

Range 0 (disabled), 1 (enabled)

Dynamic? Yes

When to Change If you do not want this behavior for securityreasons, disable it.

Commitment Level Unstable

TCP/IP Tunable Parameters 141

Page 142: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

ip_addrs_per_if

Description The maximum number of logical interfacesassociated with a real interface.

Default 256

Range 1 to 8192

Dynamic? Yes

When to Change Do not change the value. If more logicalinterfaces are required, increase the value, butrecognize that this change might have a negativeimpact on IP’s performance.

Commitment Level Unstable

ip_strict_dst_multihoming andip6_strict_dst_multihoming

Description Determine whether a packet arriving on anon-forwarding interface can be accepted for anIP address that is not explicitly configured onthat interface. If ip_forwarding is enabled, orxxx:ip_forwarding for the appropriateinterfaces is enabled, then this parameter isignored, because the packet is actuallyforwarded.

Refer to RFC 1122 3.3.2.4.

Default 0 (loose multihoming)

Range 0 = Off (loose multihoming)

1 = On (strict multihoming)

Dynamic? Yes

When to Change If a machine has interfaces that cross strictnetworking domains (for example, a firewall or aVPN node), set this variable to 1.

Commitment Level Unstable

142 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 143: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

IP Tunable Parameters With Additional CautionsChanging the following parameters is not recommended unless there are extenuatingcircumstances that are described with each parameter.

ip_ire_pathmtu_interval

Description The interval in milliseconds when IP flushes thepath maximum transfer unit (PMTU) discoveryinformation, and tries to rediscover PMTU.

Refer to RFC 1191 on PMTU discovery.

Default 10 minutes

Range 5 seconds to 277 hours

Dynamic? Yes

When to Change Do not change this value.

Commitment Level Unstable

ip_icmp_return_data_bytes andip6_icmp_return_data_bytes

Description When IPv4 or IPv6 sends an ICMPv4 or ICMPv6error message, it includes the IP header of thepacket that causes the error message. Thisparameter controls how many extra bytes of thepacket beyond the IPv4 or IPv6 header to beincluded in the ICMPv4 or ICMPv6 errormessage.

Default 64 bytes

Range 8 to 65,536 bytes

Dynamic? Yes

When to Change Do not change the value. Including moreinformation in an ICMP error message mighthelp in diagnosing network problems. If thisfeature is needed, increase the value.

TCP/IP Tunable Parameters 143

Page 144: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Commitment Level Unstable

TCP Tunable Parameterstcp_deferred_ack_interval

Description The time-out value for TCP delayedacknowledgment (ACK) timer in milliseconds.

Refer to RFC 1122, 4.2.3.2.

Default 100 milliseconds

Range 1 millisecond to 1 minute

Dynamic? Yes

When to Change Do not increase this value to more than 500milliseconds.

If in some circumstances, slow network links(less than 57.6 Kbps) with greater than 512 bytesmaximum segment size (MSS) when the intervalis short for receiving more than one TCPsegment, increase the value.

Commitment Level Unstable

tcp_deferred_acks_max

Description The maximum number of TCP segments (in unitsof maximum segment size MSS for individualconnections) received before an acknowledgment(ACK) is generated. If set to 0 or 1, it means nodelayed ACKs, assuming all segments are 1 MSSlong.

Note that for remote destinations (not directlyconnected), the maximum number is fixed to 2,no matter what this parameter is set to. Theactual number is dynamically calculated for eachconnection. The value is the default maximum.

144 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 145: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Default 8

Range 0 to 16

Dynamic? Yes

When to Change Do not change the value. In some circumstances,when the network traffic becomes very burstybecause of the delayed ACK effect, decrease thevalue. Do not decrease this value below 2.

Commitment Level Unstable

tcp_wscale_always

Description If set to 1, TCP always sends SYN segment withthe window scale option, even if the option valueis 0. Note that if TCP receives a SYN segmentwith the window scale option, even if theparameter is set to 0, TCP responds with a SYNsegment with the window scale option, and theoption value is set according to the receivewindow size.

Refer to RFC 1323 for the window scale option.

Default 0 (disabled)

Range 0 (disabled), 1 (enabled)

Dynamic? Yes

When to Change If you want the window scale option in ahigh-speed network configuration, enable it.

Commitment Level Unstable

tcp_tstamp_always

Description If set to 1, TCP always sends SYN segment withthe timestamp option. Note that if TCP receives aSYN segment with the timestamp option, TCPresponds with a SYN segment with the

TCP/IP Tunable Parameters 145

Page 146: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

timestamp option even if the parameter is set to0.

Default 0 (disabled)

Range 0 (disabled), 1 (enabled)

Dynamic? Yes

When to Change In summary, if an accurate measurement ofround trip time (RTT) and TCP sequence numberwraparound is a problem, enable it.

Refer to RFC 1323 for more reasons to enable thisoption.

Commitment Level Unstable

tcp_xmit_hiwat

Description The default send window size in bytes. Refer tothe following discussion of per-route metrics forsetting a different value on a per route basis. See“tcp_max_buf ” on page 147 also.

Default 16,384 bytes

Range 4096 to 1,073,741,824

Dynamic? Yes

When to Change Note that this is the default value. An applicationcan use setsockopt (3SOCKET) SO_SNDBUFtochange the individual connection’s send buffer.

Commitment Level Unstable

tcp_recv_hiwat

Description The default receive window size in bytes. Referto the following discussion of per-route metricsfor setting a different value on a per-route basis.

146 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 147: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

See “tcp_recv_hiwat_minmss ” on page 158and “tcp_max_buf ” on page 147 also.

Default 24,576

Range 2048 to 1,073,741,824

Dynamic? Yes

When to Change Note that this is the default value. An applicationcan use setsockopt (3SOCKET) SO_RCVBUFtochange the individual connection’s receive buffer.

Commitment Level Unstable

tcp_max_buf

Description The maximum buffer size in bytes. It controlshow large the send and receive buffers are set toby an application usingsetsockopt (3SOCKET).

Default 1,048,576

Range 8192 to 1,073,741,824

Dynamic? Yes

When to Change If TCP connections are being made in ahigh-speed network environment, increase thevalue to match the network link speed.

Commitment Level Unstable

tcp_cwnd_max

Description The maximum value of TCP congestion window(cwnd) in bytes.

Refer to RFC 1122 and RFC 2581 for moreinformation on TCP congestion window.

TCP/IP Tunable Parameters 147

Page 148: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Default 1,048,576

Range 128 to 1,073,741,824

Dynamic? Yes

When to Change This is the maximum value a TCP cwnd cangrow to. Note that even if an application usessetsockopt (3SOCKET) to change the windowsize to a value higher than tcp_cwnd_max , theactual window used can never grow beyondtcp_cwnd_max . Thus, tcp_max_buf should begreater than tcp_cwnd_max in general.

Commitment Level Unstable

tcp_slow_start_initial

Description The maximum initial congestion window (cwnd)size in MSS of a TCP connection.

Refer to RFC 2414 on how initial congestionwindow size is calculated.

When to Change This is the maximum value a TCP cwnd cangrow to. Note that even if an application usessetsockopt (3SOCKET) to change the windowsize to a value higher than tcp_cwnd_max , theactual window used can never grow beyondtcp_cwnd_max . Thus, tcp_max_buf should begreater than tcp_cwnd_max in general.

Commitment Level Unstable

Dynamic? Yes

When to Change Do not change the value.

If the initial cwnd size causes network congestionunder special circumstances, decrease the value.

Commitment Level Unstable

148 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 149: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

tcp_slow_start_after_idle

Description The congestion window size in MSS of a TCPconnection after it has been idled (no segmentreceived) for a period of one retransmissiontimeout (RTO).

Refer to RFC 2414 for the calculation.

Default 4

Range 1 to 16,384

Dynamic? Yes

When to Change See “tcp_slow_start_initial ” on page 148for more information.

Commitment Level Unstable

tcp_sack_permitted

Description If set to 2, TCP always sends SYN segment withthe selective acknowledgment (SACK) permittedoption. If TCP receives a SYN segment with aSACK-permitted option and this parameter is setto 1, TCP responds with a SACK-permittedoption. If the parameter is set to 0, TCP does notsend a SACK-permitted option, regardless ofwhether the incoming segment contains theSACK permitted option or not.

Refer to RFC 2018 for information on the SACKoption.

Default 2 (active enabled)

Range 0 (disabled), 1 (passive enabled), 2 (activeenabled)

Dynamic? Yes

When to Change SACK processing can improve TCPretransmission performance so it should beactively enabled. If, in some circumstances, theother side can be confused with the SACK option

TCP/IP Tunable Parameters 149

Page 150: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

actively enabled, set the value to 1 so that SACKprocessing is enabled only when incomingconnections allow SACK processing.

Commitment Level Unstable

tcp_rev_src_routes

Description If set to 0, TCP does not reverse the IP sourcerouting option for incoming connections forsecurity reasons. If set to 1, TCP does the normalreverse source routing.

Default 0 (disabled)

Range 0 (disabled), 1 (enabled)

Dynamic? Yes

When to Change If IP source routing is needed for diagnosticpurposes, enable it.

Commitment Level Unstable

tcp_time_wait_interval

Description The time in milliseconds a TCP connection staysin TIME-WAIT state.

Refer to RFC 1122, 4.2.2.13 for more information.

Default 4 minutes

Range 1 second to 10 minutes

Dynamic? Yes

When to Change On a busy web server, there can be too manyTCP connections in TIME-WAIT state, consumingtoo much memory. In this situation, you candecrease the value for performance reasons. Donot set the value lower than 60 seconds.

Refer to RFC 1122, 4.2.2.13 for more information.

150 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 151: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Commitment Level Unstable

tcp_conn_req_max_q

Description The default maximum number of pending TCPconnections for a TCP listener waiting to beaccepted by accept (3SOCKET). See also“tcp_conn_req_max_q0 ” on page 152.

Default 128

Range 1 to 4,294,967,296

Dynamic? Yes

When to Change For applications such as web servers that mightreceive several connection requests, the defaultvalue might be increased to match the incomingrate.

Do not increase the parameter to a very largevalue. The pending TCP connections canconsume excessive memory. And if an applicationis not fast enough to handle that manyconnection requests in a timely fashion becausethe number of pending TCP connections is toolarge, new incoming requests might be denied.

Note that increasing tcp_conn_req_max_qdoes not mean that applications can have thatmany pending TCP connections. Applications canuse listen (3SOCKET) to change the maximumnumber of pending TCP connections for eachsocket. This parameter is the maximum anapplication can use listen() to set the numberto. This means that even if this parameter is setto a very large value, the actual maximumnumber for a socket might be much less thantcp_conn_req_max_q , depending on the valueused in listen() .

Commitment Level Unstable

TCP/IP Tunable Parameters 151

Page 152: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

tcp_conn_req_max_q0

Description The default maximum number of incomplete(three-way handshake not yet finished) pendingTCP connections for a TCP listener.

Refer to RFC 793 for more information on TCPthree-way handshake. See also“tcp_conn_req_max_q ” on page 151.

Default 1024

Range 0 to 4,294,967,296

Dynamic? Yes

When to Change For applications, such as web servers that mightreceive excessive connection requests, you canincrease the default value to match the incomingrate.

The following explains the relationship betweentcp_conn_req_max_q0 and the maximumnumber of pending connections for each socket.

When a connection request is received, TCP firstchecks if the number (N) of pending TCPconnections (three-way handshake is done)waiting to be accepted exceeds the maximum forthe listener. If the connections are excessive, therequest is denied. If the number of connections isallowable, then TCP checks if the number ofincomplete pending TCP connections exceeds thesum of N and tcp_conn_req_max_q0 . If it doesnot, the request is accepted. Otherwise, the oldestincomplete pending TCP request is dropped.

Commitment Level Unstable

tcp_conn_req_min

Description The default minimum value of the maximumnumber of pending TCP connection requests fora listener waiting to be accepted. This is thelowest maximum value of listen (3SOCKET)an application can use.

152 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 153: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Default 1

Range 1 to 1024

Dynamic? Yes

When to Change This can be a solution for applications that uselisten (3SOCKET) to set the maximum numberof pending TCP connections to a value too low.Increase the value to match the incomingconnection request rate.

Commitment Level Unstable

TCP Parameters Set in the /etc/system FileThese parameters can be set only in the /etc/system file. After the file is modified,reboot the system.

The following entry sets tcp_conn_hash_size :

set tcp:tcp_conn_hash_size=1024

tcp_conn_hash_size

Description Controls the hash table size in the TCP modulefor all TCP connections.

Data Type Signed integer

Default 512

Range 512 to 1,073,741,824

Implicit The value should be a power of 2.

Dynamic? No. The parameter can only be changed at boottime.

Validation If you set the parameter to a value that is not apower of 2, it is rounded up to the nearest powerof 2.

When to Change If the system consistently has tens of thousandsof TCP connections, increase the valueaccordingly. With the default value, TCP

TCP/IP Tunable Parameters 153

Page 154: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

performs well up to a few thousand activeconnections. Note that increasing the hash tablesize means more memory consumption so set anappropriate value to avoid wasting memoryunnecessarily.

Commitment Level Unstable

ipc_tcp_conn_hash_size

Description Controls the hash table size in an IP module forall active (in ESTABLISHED state) TCPconnections.

Data Type Unsigned integer

Default 512

Range 512 to 2,147,483,648

Implicit It should be a power of two.

Dynamic? No. This parameter can only be changed at boottime.

Validation If you set the parameter to a value that is not apower of 2, it is rounded up to the nearest powerof two.

When to Change If the system consistently has tens of thousandsof active TCP connections, increase the valueaccordingly. With the default value, the systemperforms well up to a few thousand activeconnections. Note that increasing the hash tablesize means more memory consumption so set anappropriate value to avoid wasting memoryunnecessarily.

Commitment Level Unstable

TCP Parameters With Additional CautionsChanging the following parameters is not recommended unless there are extenuatingcircumstances that are described with each parameter.

154 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 155: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

tcp_ip_abort_interval

Description The default total retransmission timeout value fora TCP connection in milliseconds. For a givenTCP connection, if TCP has been retransmittingfor tcp_ip_abort_interval period of timeand it has not received any acknowledgmentfrom the other endpoint during this period, TCPcloses this connection.

For TCP retransmission timeout (RTO)calculation, refer to RFC 1122, 4.2.3. See also“tcp_rexmit_interval_max ” on page 156.

Default 8 minutes

Range 500 millisecond to 1193 hours

Dynamic? Yes

When to Change Do not change this value. See“tcp_rexmit_interval_max ” on page 156 forexceptions.

Commitment Level Unstable

tcp_rexmit_interval_initial

Description The default initial retransmission timeout (RTO)value for a TCP connection in milliseconds. Referto the following discussion of per route metricsfor setting a different value on a per-route basis.

Default 3 seconds

Range 1 millisecond to 20 seconds

Dynamic? Yes

When to Change Do not change this value. Lowering the value canresult in unnecessary retransmissions.

Commitment Level Unstable

TCP/IP Tunable Parameters 155

Page 156: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

tcp_rexmit_interval_max

Description The default maximum retransmission timeoutvalue (RTO) in milliseconds. The calculated RTOfor all TCP connections cannot exceed this value.See also “tcp_ip_abort_interval ” on page155.

Default 60 seconds

Range 1 millisecond to 20 seconds

Dynamic? Yes

When to Change Do not change the value in a normal networkenvironment.

If in some special circumstances, the round triptime (RTT) for a connection is in the order of 10seconds, you can change the value to a highervalue. If you change this value, you should alsochange the tcp_ip_abort_intervalparameter to match it. Change the value oftcp_ip_abort_interval to at least four timesthe value of tcp_rexmit_interval_max .

Commitment Level Unstable

tcp_rexmit_interval_min

Description The default minimum retransmission time-out(RTO) value in milliseconds. The calculated RTOfor all TCP connections cannot be lower than thisvalue. See also “tcp_rexmit_interval_max ”on page 156.

Default 400 milliseconds

Range 1 millisecond to 20 seconds

Dynamic? Yes

When to Change Do not change the value in a normal networkenvironment.

TCP’s RTO calculation should be able to copewith most RTT fluctuations. If in some very

156 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 157: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

special circumstances such that the round triptime (RTT) for a connection is in the order of 10seconds, change to a higher value. If you changethis value, you should change thetcp_rexmit_interval_max parameter tomatch it. You should change the value oftcp_rexmit_interval_max to at least eighttimes the value of tcp_rexmit_interval_min .

Commitment Level Unstable

tcp_rexmit_interval_extra

Description A constant added to the calculated retransmissiontime-out value (RTO) in milliseconds.

Default 0 milliseconds

Range 0 to 2 hours

Dynamic? Yes

When to Change Do not change the value.

When the RTO calculation fails to obtain a goodvalue for a connection in some circumstances,you can change this value to avoid unnecessaryretransmissions.

Commitment Level Unstable

tcp_tstamp_if_wscale

Description If this parameter is set to 1, and the window scaleoption is enabled for a connection, TCP alsoenables the timestamp option for thatconnection.

Default 1 (enabled)

Range 0 (disabled), 1 (enabled)

Dynamic? Yes

TCP/IP Tunable Parameters 157

Page 158: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

When to Change Do not change this value. In general, when TCPis used in high-speed network, protection againstsequence number wraparound is essential, thusyou need the timestamp option.

Commitment Level Unstable

tcp_recv_hiwat_minmss

Description Controls the default minimum receive windowsize. The minimum istcp_recv_hiwat_minmss times the size ofmaximum segment size (MSS) of a connection.

Default 4

Range 1 to 65,536

Dynamic? Yes

When to Change Do not change the value. If changing it isnecessary, do not change the value lower than 4.

Commitment Level Unstable

tcp_compression_enabled

Description If set to 1, protocol control blocks of TCPconnections in TIME-WAIT state are compressedto reduce memory usage. If set to 0, nocompression is done. See“tcp_time_wait_interval ” on page 150 also.

Default 1 (enabled)

Range 0 (disabled), 1 (enabled)

Dynamic? Yes

When to Change Do not turn off the compression mechanism.

Commitment Level Unstable

158 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 159: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

UDP Tunable ParametersThis section describes some of the UDP tunable parameters.

udp_xmit_hiwat

Description The default maximum UDP socket datagram sizein bytes. See “udp_max_buf ” on page 160 formore information.

Default 8192 bytes

Range 4096 to 65,536

Dynamic? Yes

When to Change Note that an application can usesetsockopt (3SOCKET) SO_SNDBUFto changethe size for an individual socket. In general, youdo not need to change the default value.

Commitment Level Unstable

udp_recv_hiwat

Description The default maximum UDP socket receive buffersize in bytes. See “udp_max_buf ” on page 160for more information.

Default 8192 bytes

Range 4096 to 65,536

Dynamic? Yes

When to Change Note that an application can usesetsockopt (3SOCKET) SO_RCVBUFto changethe size for an individual socket. In general, youdo not need to change the default value.

TCP/IP Tunable Parameters 159

Page 160: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Commitment Level Unstable

UDP Parameters with Additional CautionsChanging the following parameters is not recommended unless there are extenuatingcircumstances that are described with each parameter.

udp_max_buf

Description Controls how large send and receive buffers (inbytes) can be for a UDP socket.

Default 262,144 bytes

Range 65,536 to 1,073,741,824

Dynamic? Yes

When to Change Do not change the value. If this parameter is setto a very large value, UDP socket applicationscan consume too much memory.

Commitment Level Unstable

Per-Route MetricsIn the Solaris 8 release, you can use the per-route metrics to associate someproperties with IPv4 and IPv6 routing table entries.

For example, a system has two different network interfaces, fast ethernet interfaceand gigabit ethernet interface. The system default tcp_recv_hiwat is 24,576 bytes.This default is sufficient for the fast ethernet interface, but may not be sufficient forthe gigabit ethernet interface.

Instead of increasing the system’s default tcp_recv_hiwat , you can associate adifferent default TCP receive window size to the gigabit ethernet interface routingentry. By making this association, all TCP connections going through the route willhave the increased receive window size.

Assuming IPv4, the following is in the routing table (netstat -rn ).

160 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 161: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

192.123.123.0 192.123.123.4 U 1 4 hme0192.123.124.0 192.123.124.4 U 1 4 ge0default 192.123.123.1 UG 1 8

Do the following:

# route change -net 192.123.124.0 -recvpipe x

This means all connections going to the 192.123.124.0 network, which is on thege0 link, use the receive buffer size x, instead of the default 24567 receive windowsize.

If the destination is in the a.b.c.d network, and there is no specific routing entryfor that network, you can add a prefix route to that network and change the metric.For example:

# route add -net a.b.c.d 192.123.123.1 -netmask w.x.y.z# route change -net a.b.c.d -recvpipe y

Note that the prefix route’s gateway is the default router. Then all connections goingto that network use receive buffer size y. If you have more than one interface, use the−ifp argument to specify which interface to use. This way, you can control whichinterface to use for specific destinations. Use the route (1M) get command to verifythe metric.

TCP/IP Tunable Parameters 161

Page 162: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

162 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 163: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

CHAPTER 5

System Facility Parameters

This section describes most of the parameters for setting default values for varioussystem facilities.

� “cron ” on page 164

� “devfsadm ” on page 164

� “dhcpagent ” on page 164

� “fs ” on page 164

� “inetinit ” on page 164

� “init ” on page 164

� “kbd ” on page 165

� “login ” on page 165

� “nfslogd ” on page 165

� “passwd ” on page 165

� “power ” on page 165

� “su ” on page 165

� “sys-suspend ” on page 165

� “tar ” on page 166

� “utmpd ” on page 166

System Default ParametersThe functioning of various system facilities is governed by a set of values that areread by the facility on startup. The values stored in a file for each facility are located

163

Page 164: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

in the /etc/default directory. Not every system facility has a file located in thisdirectory.

cronSee cron (1M), the "Setting cron Defaults" section for more information.

devfsadmThis file is not currently used.

dhcpagentClient usage of DHCP is provided by the dhcpagent daemon. When ifconfigidentifies an interface that has been configured to receive its network configurationfrom DHCP, it starts the client daemon to manage that interface.

See dhcpagent (1M), the "/etc/default/dhcpagent " section for moreinformation.

fsFile system administrative commands have a generic and file system-specific portion.If the file system type is not explicitly specified with the −F option, a default isapplied. The value is specified in this file. See default_fs (4) for more information.

inetinitUsed by the /etc/rc2.d/S69inet script to control the sequence numbers used byTCP.

initSee init (1M), the "/etc/default/init " section for more information.

The CMASKvariable referred to in the file is not documented in the man page. CMASKis the umask that init uses and that every process inherits from the init process.If not set, init uses the default umask it obtains from the kernel. The init process

164 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 165: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

always attempt to apply a umask of 022 before creating any files, regardless of thesetting of CMASK. All values in the file are placed in the environment of the shell thatinit invokes in response to a single user boot request. The init process also passesthese values to any commands that it starts or restarts from the /etc/inittab file.

kbdSee kbd (1), the "Extended Description" section for more information.

loginSee login (1), "/etc/default/login " in the FILES section for more information.

nfslogdSee nfslogd (1M), the "Description" section for more information.

passwdSee passwd (1), "/etc/default/passwd " in the FILES section for moreinformation.

powerSee pmconfig (1M), "/etc/default/power " in the FILES section for moreinformation.

suSee su (1M), "/etc/default/su " in the FILES section for more information.

sys-suspendSee sys-suspend(1M) , "/etc/default/sys-suspend " in the FILES section formore information.

System Facility Parameters 165

Page 166: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

tarSee tar (1) for description of the −f function modifier.

If the TAPEenvironment variable is not present and the value of one of thearguments is a number and −f is not specified, the number matching the archiveNstring is looked up in the /etc/default/tar file. The value of the archiveN stringis used as the output device with the blocking and size specifications from the file.

For example:

% tar -c 2 /tmp/ *

Writes the output to the device specified as archive2 in the /etc/default/tarfile.

utmpdThe utmpd daemon monitors /var/adm/utmpx (and /var/adm/utmp in earlierversions of Solaris) to ensure that utmp entries inserted by non-root processes bypututxline (3C) are cleaned up on process termination.

Two entries in /etc/default/utmpd are supported:

� SCAN_PERIOD- The number of seconds that utmpd sleeps between checks of/proc to see if monitored processes are still alive. The default is 300.

� MAX_FDS- The maximum number of processes that utmpd attempts to monitor.The default value is 4096 and should never need to be changed.

166 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 167: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

APPENDIX A

Tunable Parameter Change History

This section describes the change history of specific parameters. Parameters whosefunctionality has been removed are listed also.

� “Process Sizing Tunables” on page 167

� “Paging Related Tunables” on page 169

� “General Kernel Variables” on page 171

� “General I/O” on page 172

� “Pseudo Terminals” on page 174

� “Sun4u Specific” on page 174

� “Parameters With No Functionality” on page 175

Kernel ParametersProcess Sizing Tunables

maxusers (Solaris 7 Release)

Description The maxusers parameter drives max_nprocsand maxuprc .

Data Type Signed integer

Default Lesser of the amount of memory in Mbytes and1024

167

Page 168: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Range 1 to 2048

Note - Values greater than 1024 must bespecified in /etc/system . If a value greaterthan 2048 is provided, calculations clamps thevalue at 2048, but later processing sets the valueto the provided value.

Units Users

Dynamic? No. After computation of dependent variables isdone, maxusers is never referenced again.

Validation None

When to Change If the default number of user processes derivedby the system is insufficient. This insufficiency isseen by the following messages on the systemconsole or messages file.

out of processes

Commitment Level Unstable

max_nprocs (Pre-Solaris 8 Releases)

Description Maximum number of processes that can becreated on a system. Includes system and userprocesses. Prior to the Solaris 8 release, the valuewas determined by computation and then usedin the setting of maxuprc .

This value is also used in determining the size ofseveral other system data structures. For releasesprior to Solaris 8, if a value is provided in/etc/system it is used rather than thecomputed value. Other data structures where thisvariable plays a role are:

� Determining the size of the directory namelookup cache (if ncsize is not specified)

� Allocating disk quota structures for UFS (ifndquot is not specified)

168 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 169: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

� Verifying that the amount of memory used byconfigured system V semaphores does notexceed system limits

� Configuring Hardware Address Translationresources for the sun4d, sun4m, and Intelplatforms

Data Type Signed integer

Default 10 + (16 x maxusers )

Range 266 to value of pidmax

Dynamic? No. max_nprocs is assigned to the v_procelement of the v structure after the initialparameter calculation is completed. Changingv.v_proc on a running system almost certainlyresults in a system crash or silent data corruption.

Validation Compared to maxpid and set to maxpid , iflarger. On the sun4d and Intel platforms, anadditional check is made against aplatform-specific value. max_nprocs is set to thesmallest value in the triplet (max_nprocs ,maxpid , platform value). Both platforms use65,534 as the platform value.

When to Change Starting with the Solaris 8 release, this value canbe changed to enable more than 30,000 processeson a system. Changing this parameter is one ofthe steps necessary to enable support for morethan 30,000 processes on a system.

Commitment Level Unstable

Paging Related TunablesIn certain revisions of the Solaris 2.6 kernel patch (105181-10 for SPARC platformsand 105182-09 for Intel platforms) and in the Solaris 7 release, a new parameter isintroduced: priority paging. A new starting point for pageout thread activity(cachefree ) is also used. When available memory is between cachefree andlotsfree , priority paging modifies the page-checking algorithm to skip the page, ifit came from an executable (text, stack, or data). After memory falls belowlotsfree , every page is considered equally. The facility is not enabled by default,

Tunable Parameter Change History 169

Page 170: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

but can be enabled by either setting cachefree to a value greater than lotsfreeor by setting the priority_paging variable to a non-zero value, which setscachefree to 2 times lotsfree .

priority_paging (Solaris 2.6 and 7 Releases)

Description Enables priority paging feature. When set, thisvariable sets cachefree to 2 times lotsfree ,thereby enabling priority paging.

Data Type Signed integer

Default 0

Range 0 (priority paging disabled unless cachefree setseparately) or 1 (enabled)

Units Toggle (on/off)

Dynamic? No. Sets the value of cachefree at boot timeonly. Runtime enabling can be achieved bysetting cachefree with adb while the system isrunning.

Validation None

When to Change Should always be enabled unless the system istight on memory, and does excessive I/O wherethe contents of the files are needed in the future.

Commitment Level Obsolete

cachefree (Solaris 2.6 and Solaris 7 Releases)

Description Enables priority paging feature, providedcachefree is greater than lotsfree . Thisvariable is available for systems running theSolaris 2.6 release, with at a minimum, revision10 of patch 105181 installed, and for systemsrunning the Solaris 7 release. By default, thisfeature (cachefree equals lotsfree ) isdisabled.

Data Type Unsigned long

170 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 171: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Default Value of lotsfree unless priority_paging isset, which means cachefree is 2 timeslotsfree

Range lotsfree to physical memory on system

Units Pages

Dynamic? Yes

Validation If less than lotsfree , it is reset to the value oflotsfree .

When to Change Should always be enabled unless the system istight on memory, and does excessive I/O wherethe contents of the files are needed in the future.

Commitment Level Obsolete

General Kernel Variables

noexec_user_stack (Solaris 2.6 and Solaris 7 Releases)

Description Introduced in the Solaris 2.6 release to allow thestack to be marked as non-executable. This helpsmake buffer-overflow attacks more difficult.

In the Solaris 2.6 release, the value does not affectthreaded applications. All 64-bit Solarisapplications effectively make all stacksnon-executable irrespective of the setting of thisvariable.

Note - This variable exists on all systemsrunning Solaris 2.6 or later, but it is only effectiveon sun4u, sun4m, and sun4d architectures.

Data Type Signed integer

Default 0 (disabled)

Range 0 (disabled), 1 (enabled)

Units Toggle (on/off)

Tunable Parameter Change History 171

Page 172: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Dynamic? Yes. Does not affect currently runningprocesses—only those created after the value isset.

Validation None

When to Change Should be enabled at all times unless applicationsare deliberately placing executable code on thestack without using mprotect (2) to make thestack executable.

Commitment Level Unstable

General I/O

rlim_fd_cur (Solaris 7 Release and Earlier)

Description "Soft" limit on file descriptors that a singleprocess can have open. A process might adjust itsfile descriptor limit to any value up to the "hard"limit defined by rlim_fd_max by using thesetrlimit() call or issuing the limitcommand in whatever shell it is running. You donot require superuser privilege to adjust the limitto any value less than or equal to the hard limit.

Data Type Signed integer

Default 64

Range 1 to MAXINT

Units File descriptors

Dynamic? No. Loaded into rlimits structure.

Validation Compared to rlim_fd_max and ifrlim_fd_cur is greater than rlim_fd_max ,rlim_fd_cur is reset to rlim_fd_max .

When to Change When the default number of open files for aprocess is not enough. Increasing this valuemeans only that it is possibly not necessary for a

172 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 173: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

program to use setrlimit (2) to increase themaximum number of file descriptors available toit.

Commitment Level Unstable

segkpsize (Solaris 7 and Earlier Releases)

Description Specify the amount of kernel pageable memoryavailable. This memory is used primarily forkernel thread stacks. Increasing this numberallows either larger stacks for the same numberof threads or more threads. This parameter canonly be set on 64–bit kernels. 64-bit kernels use adefault stack size of 24 Kbytes.

Available for the Solaris 7 release with patch106541-04 or the Solaris 7 5/99 and Solaris 8releases.

Data Type Unsigned long

Default 64–bit kernels, 2 Gbytes

32–bit kernels, 512 Mbytes

Range 64–bit kernels, 512 Mbytes - 24 Gbytes

32-bit kernels, 512 Mbytes

Units Mbytes

Dynamic? No

Validation None

When to Change Increase when more threads are desired.

Commitment Level Unstable

Tunable Parameter Change History 173

Page 174: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Pseudo Terminals

pt_cnt (Solaris 7 and Earlier Releases)

Description Number of /dev/pts (the pseudo terminaldevices used by telnet or rlogin for networklogins) entries to create on a reconfiguration boot.This parameter effectively limits the number ofusers that can simultaneously be logged in acrossthe net to the value of pt_cnt . You must do areconfiguration boot (boot -r ) after making thechange to the /etc/system file for theadditional device nodes to be created.

Data Type Signed integer

Default 48

Range 0 to maxpid

Units logins/windows

Dynamic? No

Validation None. Excessively large values hang the system.

When to Change When the desired number of users cannot log into the system.

Commitment Level Unstable

Sun4u Specific

enable_grp_ism (Solaris 2.6 Release)

Description Enables a shared memory Translation SetasideBuffer (TSB) capability for System V SharedMemory that has been attached with theSHARE_MMUflag set. This parameter is availablein, at minimum, patch 105181-05 for the Solaris2.6 release. Starting with the Solaris 7 release, the

174 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 175: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

parameter name has been removed, but thesystem implements this parameter by default.

Data Type Signed integer

Default 0

Range 0 (disabled) or 1 (enabled)

Dynamic? No

Validation None

When to Change Turn on when using System V Shared Memoryattached with the SHARE_MMUflag set.

Commitment Level Unstable

Parameters With No FunctionalityThe following section describes parameters whose functionality has been removed,but the parameter might still be available for compatibility reasons. These parametersare ignored if they are set.

Paging-Related Tunables

tune_t_gpgslo

Description Obsolete. Variable left in place for compatibilityreasons.

tune_t_minasmem

Description Obsolete. Variable left in place for compatibilityreasons.

Tunable Parameter Change History 175

Page 176: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

System V Message Parameters

msgsys:msginfo_msgssz

Description Specifies size of chunks system uses to managespace for message buffers. Obsolete since theSolaris 8 release.

Data Type Signed integer

Default 40

Range 0 to MAXINT

Dynamic? No. Loaded into msgtql field of msginfostructure.

Validation The space consumed by the maximum number ofdata structures that would be created to supportthe messages and queues is compared to 25% ofthe available kernel memory at the time themodule is loaded. If the number is too big, themessage queue module refuses to load and thefacility is unavailable. This computation doesinclude the space that might be consumed by themessages. This situation occurs only when themodule is first loaded.

When to Change When the default value is not enough. Generallychanged at the recommendation of softwarevendors.

Commitment Level Obsolete

msgsys:msginfo_msgmap

Description Number of messages the system supports.Obsolete since the Solaris 8 release.

Data Type Signed integer

Default 100

Range 0 to MAXINT

176 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 177: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Dynamic? No

Validation The space consumed by the maximum number ofdata structures that would be created to supportthe messages and queues is compared to 25% ofthe available kernel memory at the time themodule is loaded. If the number is too big, themessage queue module refuses to load and thefacility is unavailable. This computation doesinclude the space that might be consumed by themessages. This situation occurs only when themodule is first loaded.

When to Change When the default value is not enough. Generallychanged at the recommendation of softwarevendors.

Commitment Level Obsolete

msgsys:msginfo_msgseg

Description Number of msginfo_msgssz segments thesystem uses as a pool for available messagememory. Total memory available for messages ismsginfo_msgseg * msginfo_msgssz .Obsolete as of the Solaris 8 release.

Data Type Signed short

Default 1024

Range 0 to 32,767

Dynamic? No

Validation The space consumed by the maximum number ofdata structures that would be created to supportthe messages and queues is compared to 25% ofthe available kernel memory at the time themodule is loaded. If the number is too big, themessage queue module refuses to load and thefacility is unavailable. This computation does notinclude the space that might be consumed by themessages. This situation occurs only when themodule is first loaded.

Tunable Parameter Change History 177

Page 178: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

When to Change When the default value is not enough. Generallychanged at the recommendation of softwarevendors.

Commitment Level Obsolete

System V Semaphore Parameters

semsys:seminfo_semmap

Obsolete. Variable is present in kernel for compatibility reasons but is no longer used.

semsys:seminfo_semusz

Obsolete. Any values entered are ignored.

NFS Module Parameters

nfs:nfs_32_time_ok

Obsolete as of the Solaris 8 release.

nfs:nfs_acl_cache

Obsolete as of the Solaris 2.6 release.

178 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 179: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

APPENDIX B

Revision History for this Manual

This section describes the revision history for this manual.

First and Current Version—Solaris 810/00The current version of this manual applies to the Solaris 8 10/00 release.

179

Page 180: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

180 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 181: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Index

Aautoup 33

Bbufhwm 71

Ccachefree 48, 170consistent_coloring 98CRON 164

Ddesfree 44dhcpagent 164dnlc_dir_enable 70dnlc_dir_max_size 71dnlc_dir_min_size 70doiflush 35dopageflush 35

Eenable_grp_ism 175

Ffastscan 51fs 164fsflush 32

Hhandspreadpages 53hires_tick 97

Iinetinit 164init 164ip6_forwarding 139ip6_forward_src_routed 141ip6_icmp_return_data_bytes 143ip6_respond_to_echo_multicast 140ip6_send_redirects 141ip6_strict_dst_multihoming 142ipc_tcp_conn_hash_size 154ip_addrs_per_if 142ip_forwarding 139ip_forward_src_routed 141ip_icmp_err_burst 139ip_icmp_err_interval 139ip_icmp_return_data_bytes 143ip_ire_pathmtu_interval 143ip_respond_to_echo_broadcast 140ip_send_redirects 141ip_strict_dst_multihoming 142

Kkbd 165kmem_flags 59

181

Page 182: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

Llogin 165lotsfree 42lwp_default_stksize 31

Mmaxpgio 55maxphys 64maxpid 39maxuprc 41maxusers 37, 167max_nprocs 40, 168minfree 45min_percent_cpu 53moddebug 62msgsys:msginfo_msgmap 176msgsys:msginfo_msgmax 85msgsys:msginfo_msgmnb 86msgsys:msginfo_msgmni 86msgsys:msginfo_msgseg 177msgsys:msginfo_msgssz 176msgsys:msginfo_msgtql 87

Nncsize 66ndd 137ndquot 73nfs:nacache 122nfs:nfs3_async_clusters 120nfs:nfs3_bsize 118nfs:nfs3_cots_timeo 104nfs:nfs3_do_symlink_cache 106nfs:nfs3_dynamic 107nfs:nfs3_jukebox_delay 123nfs:nfs3_lookup_neg_cache 109nfs:nfs3_max_threads 111nfs:nfs3_max_transfer_size 124nfs:nfs3_nra 113nfs:nfs3_pathconf_disable_cache 102nfs:nfs_allow_preepoch_time 103nfs:nfs_async_clusters 119nfs:nfs_async_timeout 121nfs:nfs_cots_timeo 104nfs:nfs_disable_rddir_cache 117nfs:nfs_do_symlink_cache 105nfs:nfs_dynamic 107

nfs:nfs_lookup_neg_cache 108nfs:nfs_nra 112nfs:nfs_shrinkreaddir 115nfs:nfs_write_error_interval 116nfs:nfs_write_error_to_cons_only 116nfs:nrnode 114nfssrv:exi_cache_time 128nfssrv:nfsauth_ch_cache_max 127nfssrv:nfs_portmon 125nfssrv:rfs_write_async 127nfs_32_time_ok 178nfs_acl_cache 178nfs_max_threads 110noexec_user_stack 58, 171nstrpush 83

Ppageout_reserve 47pages_before_pager 54pages_pp_maximum 50passwd 165physmem 30pidmax 39power 165priority_paging 49, 170pt_cnt 81, 174pt_max_pty 82pt_pctofmem 81

Rrechoose_interval 96reserved_procs 38rlim_fd_cur 66, 172rlim_fd_max 64rpcmod:clnt_idle_timeout 130rpcmod:clnt_max_conns 129rpcmod:cotsmaxdupreqs 134rpcmod:maxdupreqs 133rpcmod:svc_default_max_same_xprt 132rpcmod:svc_default_stksize 131rpcmod:svc_idle_timeout 130rstchown 68

Ssegkpsize 173

182 Solaris Tunable Parameters Reference Manual ♦ July 2000

Page 183: mario.elinos.org.mxmario.elinos.org.mx/tools/806-4015.pdf · tune_t_fsflushr 33 autoup 33 dopageflush 35 doiflush 35 Process Sizing Tunables 36 maxusers 36 reserved_procs 38 pidmax

segspt_minfree 95semsys:seminfo_semaem 92semsys:seminfo_semmap 178semsys:seminfo_semmni 88semsys:seminfo_semmns 88semsys:seminfo_semmsl 89semsys:seminfo_semopm 90semsys:seminfo_semume 91semsys:seminfo_semusz 178semsys:seminfo_semvmx 89shmsys:shminfo_shmmax 93shmsys:shminfo_shmmin 93shmsys:shminfo_shmmni 94shmsys:shminfo_shmseg 94slowscan 52strmsgsz 83, 84su 165swapfs_minfree 57swapfs_reserve 56sys-suspend 165

Ttar 166tcp_compression_enabled 158tcp_conn_hash_size 153tcp_conn_req_max_q 151tcp_conn_req_max_q0 152tcp_conn_req_min 153tcp_cwnd_max 147tcp_deferred_acks_max 144tcp_deferred_ack_interval 144tcp_ip_abort_interval 155tcp_max_buf 147tcp_recv_hiwat 147tcp_recv_hiwat_minmss 158

tcp_rev_src_routes 150tcp_rexmit_interval_extra 157tcp_rexmit_interval_initial 155tcp_rexmit_interval_max 156tcp_rexmit_interval_min 156tcp_sack_permitted 149tcp_slow_start_after_idle 149tcp_slow_start_initial 148tcp_time_wait_interval 150tcp_tstamp_always 146tcp_tstamp_if_wscale 157tcp_wscale_always 145tcp_xmit_hiwat 146throttlefree 46timer_max 97tmpfs_maxkmem 78tmpfs_minfree 79tune_t_fsflushr 33tune_t_gpgslo 175tune_t_minarmem 51tune_t_minasmem 176

Uudp_max_buf 160udp_recv_hiwat 159udp_xmit_hiwat 159ufs:ufs_HW 77ufs:ufs_LW 77ufs:ufs_WRITES 76ufs_ninode 74utmpd 166

Xxxx:ip_forwarding 140

183