Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
1.  Overview of Solaris System Tuning Tuning the Solaris Kernel mdb Example--Using mdb to Change a Value  Previous   Contents   Next 
   
 

Special Structures

Solaris tuning variables come in a variety of forms. The tune structure defined in /usr/include/sys/tuneable.h is the runtime representation of tune_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 these variables are found in the appropriate field of the tune structure.

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

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

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

Viewing System Configuration Information

Several tools are available to examine system configuration. Some require root privilege, others can be run by a non-privileged user. Every structure and data item can be examined with the kernel debugger by using mdb on a running system or by booting under kadb..

sysdef

The sysdef(1M) command provides the values of System V IPC settings, STREAMS tunables, process resource limits, and portions of the tune and v structures. For example, the sysdef "Tunable Parameters" section from on a 512 Mbyte Ultra™ 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)
      25        minimum swapable memory for avoiding deadlock (MINASMEM)

kstats

kstats are data structures maintained by various kernel subsystems and drivers. They provide a mechanism for exporting data from the kernel to user programs without requiring that the program read kernel memory or have root privilege. For more information, see kstat(3KSTAT).

Starting in the Solaris 8 release, the kstat(1M) command is available to enable selection and display of kstats with a command-line interface. A Perl module, kstat(3EXT), is also available to process kstat information.


Note - kstats with system_pages name in the unix module do not report statistics for cachefree because cachefree is not supported in the Solaris 9 release.


 
 
 
  Previous   Contents   Next