Softpanorama

May the source be with you, but remember the KISS principle ;-)
Contents Bulletin Scripting in shell and Perl Network troubleshooting History Humor

Solaris Virtual Memory

News Recommended Links memconf utility prtconf -pv Swap Space
 Management
  Kernel Upgrades and Maintanance Virtual memory Gathering Solaris system information Humor

First let's discuss how to get some information about hardware of the system on which the processes run. Total amount of memory installed on particular Solaris system one can get from prtconf command.

$ prtconf
System Configuration: Sun Microsystems sun4u
Memory size: 8192 Megabytes
System Peripherals (Software Nodes):

The number of CPUs present in the system can be retrieved from prtdiag command:

System Configuration: Sun Microsystems sun4u Sun Fire V240
System clock frequency: 160 MHZ
Memory size: 8GB
==================================== CPUs ====================================
E$ CPU CPU Temperature
CPU Freq Size Implementation Mask Die Amb. Status Location
--- -------- ---------- --------------------- ----- ---- ---- ------ --------
0 1280 MHz 1MB SUNW,UltraSPARC-IIIi 2.4 - - online MB/P0
1 1280 MHz 1MB SUNW,UltraSPARC-IIIi 2.4 - - online MB/P1

Amount of free memory on Solaris can be misleading as the system cashes /tmp in the memory.

NEWS CONTENTS

Old News ;-)

[Aug 30, 2007] UNIX memconf utility

memconf - 30-Aug-2007 V2.4 - perl script that displays memory modules installed in a Sun Solaris, Linux or HP-UX system. Listed in the SunManagers FAQ.
 

Usage: memconf [ -v | -D | -h ] [ explorer_dir ]
                 -v            verbose mode
                 -D            send results to memconf maintainer
                 -h            print help
                 explorer_dir  Sun Explorer output directory
memconf reports the size of each SIMM/DIMM memory module installed in a system. It also reports the system type and any empty memory sockets. In verbose mode, it also reports the following information if available:

If memconf does not completely recognize a system, then please send the output of '/usr/sbin/prtconf -pv' on Solaris 2.X or later, or '/usr/etc/devinfo -pv' on Solaris 1.X and '/usr/platform/`uname -i`/sbin/prtdiag -v' and '/usr/sbin/prtfru -x' if available to tschmidt@micron.com so that memconf can be enhanced to properly recognize it. You can do this using the 'memconf -D' command. If the unrecognized system is a Sun clone, please also send any hardware documentation on the memory layout that you may have.

Maintained by Tom Schmidt (tschmidt@micron.com)

memconf is Y2K compliant. There are no date calls in the program. Your Operating System or Perl version may not be Y2K compliant.

memconf is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

Based on SunManagers SUMMARY by Howard Modell on 29-Jan-1997.

Requirements:

Downloading: Installation: Sample output:

On a Solaris Sun SPARCstation 20 SX system:

> memconf
hostname: my-ss20
Sun SPARCstation 20 MP (2 X SuperSPARC-II)
socket J0201 has a 64MB SIMM
socket J0303 has a 16MB SIMM
socket J0202 has a 16MB SIMM
socket J0301 has a 32MB SIMM
socket J0305 has a 64MB SIMM
socket J0203 has a 64MB SIMM
socket J0302 has a 64MB SIMM
sockets J0304/J0407 have a 4MB VSIMM installed for SX (CG14) graphics
empty sockets: None
total memory = 320MB
On a Solaris Sun Ultra 60 system:
> memconf -v
memconf:  V2.4 30-Aug-2007 http://www.4schmidts.com/unix.html
hostname: my-ultra60
banner:   Sun Ultra 60 UPA/PCI (2 X UltraSPARC-II 450MHz)
model:    Ultra-60
Sun development codename: Deuterium
Sun Family Part Number: A23 (Ultra-60), N02/N04 (Netra t1120), N03 (Netra t1125)
Solaris 9 9/04 s9s_u7wos_09 SPARC, 64-bit kernel, SunOS 5.9
2 UltraSPARC-II 450MHz cpus, system freq: 113MHz
CPU Units:
========================= CPUs =========================
                    Run   Ecache   CPU    CPU
Brd  CPU   Module   MHz     MB    Impl.   Mask
---  ---  -------  -----  ------  ------  ----
 0     0     0      450     4.0   US-II    10.0
 0     2     2      450     4.0   US-II    10.0
Memory Units:
socket U0701 has a 128MB DIMM (bank 0, address 0x00000000-0x1fffffff)
socket U0702 has a 128MB DIMM (bank 0, address 0x00000000-0x1fffffff)
socket U0703 has a 128MB DIMM (bank 0, address 0x00000000-0x1fffffff)
socket U0704 has a 128MB DIMM (bank 0, address 0x00000000-0x1fffffff)
socket U0801 has a 128MB DIMM (bank 1, address 0x20000000-0x3fffffff)
socket U0802 has a 128MB DIMM (bank 1, address 0x20000000-0x3fffffff)
socket U0803 has a 128MB DIMM (bank 1, address 0x20000000-0x3fffffff)
socket U0804 has a 128MB DIMM (bank 1, address 0x20000000-0x3fffffff)
empty sockets: U0901 U0902 U0903 U0904 U1001 U1002 U1003 U1004
total memory = 1024MB (1GB)

[Jan 16, 2006] Solaris 8 Memory Architecture

A common question pre-Solaris 8 users ask is "Where has all my memory gone"? The vmstat command, used to report virtual memory statistics, often reports that free memory (measured in Kbytes in the free column) is zero or close to zero on a pre-Solaris 8 system that has been up and running for a while.

Most likely, memory is being used to cache file system data, since the virtual memory system is shared by applications, data, the kernel, and file system data. By default, any free memory is used to cache data read from or written to the file system (including NFS). The size of the file system cache is dynamic -- it grows or shrinks depending on free memory.

The idea of this memory allocation scheme is to simultaneously enhance file system performance and optimize the use of an important system resource -- virtual memory. The two computing tasks of running applications and reading and writing data compete equally for system memory.

Generally, sharing a pool of memory is not an issue on small memory systems with low compute power, but with today's powerful desktop systems and servers, the file system cache can overwhelm the memory pool and make application performance suffer. Another drawback is that file system performance is tied to how quickly the virtual memory system can free memory.

Even worse, it is difficult to measure memory usage amongst the consumers of memory on the system. The vmstat command is often the first tool users run to examine virtual memory usage, but pre-Solaris 8 versions do a poor job of indicating why a system is paging (running an algorithm that moves data out from physical memory to disk, and back into physical memory from disk).

So, the question becomes: is it because the system is caching file system data, or is it because memory is a bottleneck and the system is struggling to keep up?

Solaris Internals book, Second Edition

Recommended Links

Softpanorama hot topic of the month

Softpanorama Recommended

Solaris Internals

UNIX memconf utility

Solaris 8 Memory Architecture

A common question pre-Solaris 8 users ask is "Where has all my memory gone"? The vmstat command, used to report virtual memory statistics, often reports that free memory (measured in Kbytes in the free column) is zero or close to zero on a pre-Solaris 8 system that has been up and running for a while.

Most likely, memory is being used to cache file system data, since the virtual memory system is shared by applications, data, the kernel, and file system data. By default, any free memory is used to cache data read from or written to the file system (including NFS). The size of the file system cache is dynamic -- it grows or shrinks depending on free memory.

The idea of this memory allocation scheme is to simultaneously enhance file system performance and optimize the use of an important system resource -- virtual memory. The two computing tasks of running applications and reading and writing data compete equally for system memory.

Generally, sharing a pool of memory is not an issue on small memory systems with low compute power, but with today's powerful desktop systems and servers, the file system cache can overwhelm the memory pool and make application performance suffer. Another drawback is that file system performance is tied to how quickly the virtual memory system can free memory.

Even worse, it is difficult to measure memory usage amongst the consumers of memory on the system. The vmstat command is often the first tool users run to examine virtual memory usage, but pre-Solaris 8 versions do a poor job of indicating why a system is paging (running an algorithm that moves data out from physical memory to disk, and back into physical memory from disk).

So, the question becomes: is it because the system is caching file system data, or is it because memory is a bottleneck and the system is struggling to keep up?

The Least Recently Used Paging Algorithm

To better understand how the virtual memory system works, let's examine the least recently used paging algorithm (LRU). The LRU paging algorithm is controlled by the amount of available primary memory. If free primary memory falls below an established watermark, the system attempts to reclaim memory by scanning pages and looking for pages that have not been accessed recently. Pages that meet this criteria are moved to the free list, meaning they can be paged out to the swap device, thus freeing the page in primary memory.

For example, here are the watermarks used by the LRU paging algorithm for a system with 128 Mbytes of primary memory:

When Free Primary Memory Reaches ... The Watermark Is ... And the LRU Algorithm ...
2 MB lotfree
(will run up to 120 MHz)
runs the page scanner. The page scanner scans pages in memory that have not been used recently and moves them to the free list.
1 MB desfree starts conserving memory used by the kernel
512 KB minfree stops allocating memory for user programs and file system read operations
Priority Paging

To alleviate the pressure on virtual memory induced by heavy file system activity, priority paging was introduced for the Solaris 2.6 and Solaris 7 operating environments.

Priority paging introduces a new watermark in the LRU paging algorithm, cachefree:

When Free Primary Memory Reaches ... The Watermark Is ... And the LRU Algorithm ...
2X lotsfree cachefree
(will run up to 120 MHz)
only frees pages with file system data that have not been referenced recently. Executables and shared libraries are untouched
2 MB lotsfree runs the page scanner. The page scanner scans pages in memory that have not been used recently and moves them to the free list
1 MB desfree starts conserving memory used by the kernel
512 KB minfree stops allocating memory for user programs and file system read operations

Priority paging helps performance on desktop systems with more than 64 Mbytes of primary memory, especially when a windowing system such as the Common Desktop Environment (CDE) is used.

It is also a boon for servers running online transaction processing (OLTP) applications. OLTP applications will see better response time, as will applications that use batch processing, such as high performance computing (HPC) environments. Also, servers running mixed applications (for example, NFS and database systems) will benefit from priority paging.

By default, priority paging is not enabled on systems running the Solaris 7 operating environment. To enable priority paging, set the following system variable in the /etc/system file and reboot:

   set priority_paging=1
... ... ...
The Solaris 8 Cyclical Page Cache

Priority paging is not available in the Solaris 8 operating environment, for good reason. Solaris 8 introduces a new file system caching architecture, the cyclical page cache, that eliminates most of the problems with virtual memory resulting from file system cache activity.

Caution - Do not set the priority_paging system variable on systems running Solaris 8. Also, be sure to remove this system variable from the /etc/system file on systems to be upgraded to Solaris 8.

The new file system caching architecture in Solaris 8 introduces a new free list, the file system free list. The file system free list is dedicated to caching file system data only -- other objects in virtual memory such as applications, uninitialized application data, the kernel, shared libraries, and so on are managed on a separate free list.

The result is a much cleaner architecture where the file system cache no longer competes for virtual memory resources, since it effectively pages against itself. Heavy file system activity does not force applications out of primary memory -- it now throws only other file system pages out.

Because of these changes, the tools used to report virtual memory statistics report significantly different values that you should take into account when monitoring memory usage on your system.

The most obvious changes are:

The pre-Solaris 8 problem of not being able to differentiate between a true memory shortage or simply heavy file system activity has been eliminated. The scan rate (sr) column in the vmstat command is now a true indication of a memory bottleneck, and any non-zero values appearing in the sr column mean you don't have enough primary memory to keep up with the demand on the system.

Also, the vmstat command has been updated to report virtual memory usage statistics based on the cyclical page cache. Use the vmstat -p command to report paging activity details for applications (executable), data (anonymous), and file system activity, as shown in the following example:


% vmstat -p 3
     memory           page          executable      anonymous      filesystem 
   swap  free  re  mf  fr  de  sr  epi  epo  epf  api  apo  apf  fpi  fpo  fpf
 473160 40080   1   2   1   0   0    0    0    0    0    0    0   11    0    0
 416920 45168   0   1   0   0   0    0    0    0    0    0    0    0    0    0
 416920 45168   0   0   0   0   0    0    0    0    0    0    0    0    0    0

Tuning virtual memory on systems running Solaris 8 is unnecessary -- the virtual memory system has been optimized for the best performance straight out of the box, providing you with a compelling reason to upgrade your computing environment (especially servers) to Solaris 8.

Memory and swapping

Solaris processes

Supporting Multiple Page Sizes in the Solaris Operating System

Beginning with the Solaris 9 OS, multiple page sizes can be supported on UltraSPARC processors so administrators can optimize performance by changing the page size on behalf of an application. Typical performance measurement tools do not provide sufficient detail for evaluating the impact of page size and do not provide the needed support to make optimal page size choices.
This article explains how to use new tools to determine the potential performance gain. In addition, it explains how to configure larger page sizes using the multiple page size support (MPSS) feature of the Solaris 9 OS. The article addresses the following topics:

Solaris Tunable Parameters Reference Manual

Getting to know the Solaris filesystem, Part 3 - SunWorld - July 1999

Getting the Best AIPS Performance from Solaris

Humor

IBM poster explaining virtual memory 1978



Etc

FAIR USE NOTICE This site contains copyrighted material the use of which has not always been specifically authorized by the copyright owner. We are making such material available in our efforts to advance understanding of environmental, political, human rights, economic, democracy, scientific, and social justice issues, etc. We believe this constitutes a 'fair use' of any such copyrighted material as provided for in section 107 of the US Copyright Law. In accordance with Title 17 U.S.C. Section 107, the material on this site is distributed without profit exclusivly for research and educational purposes.   If you wish to use copyrighted material from this site for purposes of your own that go beyond 'fair use', you must obtain permission from the copyright owner. 

ABUSE: IPs or network segments from which we detect a stream of probes might be blocked for no less then 90 days. Multiple types of probes increase this period.  

Society

Groupthink : Two Party System as Polyarchy : Corruption of Regulators : Bureaucracies : Understanding Micromanagers and Control Freaks : Toxic Managers :   Harvard Mafia : Diplomatic Communication : Surviving a Bad Performance Review : Insufficient Retirement Funds as Immanent Problem of Neoliberal Regime : PseudoScience : Who Rules America : Neoliberalism  : The Iron Law of Oligarchy : Libertarian Philosophy

Quotes

War and Peace : Skeptical Finance : John Kenneth Galbraith :Talleyrand : Oscar Wilde : Otto Von Bismarck : Keynes : George Carlin : Skeptics : Propaganda  : SE quotes : Language Design and Programming Quotes : Random IT-related quotesSomerset Maugham : Marcus Aurelius : Kurt Vonnegut : Eric Hoffer : Winston Churchill : Napoleon Bonaparte : Ambrose BierceBernard Shaw : Mark Twain Quotes

Bulletin:

Vol 25, No.12 (December, 2013) Rational Fools vs. Efficient Crooks The efficient markets hypothesis : Political Skeptic Bulletin, 2013 : Unemployment Bulletin, 2010 :  Vol 23, No.10 (October, 2011) An observation about corporate security departments : Slightly Skeptical Euromaydan Chronicles, June 2014 : Greenspan legacy bulletin, 2008 : Vol 25, No.10 (October, 2013) Cryptolocker Trojan (Win32/Crilock.A) : Vol 25, No.08 (August, 2013) Cloud providers as intelligence collection hubs : Financial Humor Bulletin, 2010 : Inequality Bulletin, 2009 : Financial Humor Bulletin, 2008 : Copyleft Problems Bulletin, 2004 : Financial Humor Bulletin, 2011 : Energy Bulletin, 2010 : Malware Protection Bulletin, 2010 : Vol 26, No.1 (January, 2013) Object-Oriented Cult : Political Skeptic Bulletin, 2011 : Vol 23, No.11 (November, 2011) Softpanorama classification of sysadmin horror stories : Vol 25, No.05 (May, 2013) Corporate bullshit as a communication method  : Vol 25, No.06 (June, 2013) A Note on the Relationship of Brooks Law and Conway Law

History:

Fifty glorious years (1950-2000): the triumph of the US computer engineering : Donald Knuth : TAoCP and its Influence of Computer Science : Richard Stallman : Linus Torvalds  : Larry Wall  : John K. Ousterhout : CTSS : Multix OS Unix History : Unix shell history : VI editor : History of pipes concept : Solaris : MS DOSProgramming Languages History : PL/1 : Simula 67 : C : History of GCC developmentScripting Languages : Perl history   : OS History : Mail : DNS : SSH : CPU Instruction Sets : SPARC systems 1987-2006 : Norton Commander : Norton Utilities : Norton Ghost : Frontpage history : Malware Defense History : GNU Screen : OSS early history

Classic books:

The Peter Principle : Parkinson Law : 1984 : The Mythical Man-MonthHow to Solve It by George Polya : The Art of Computer Programming : The Elements of Programming Style : The Unix Haterís Handbook : The Jargon file : The True Believer : Programming Pearls : The Good Soldier Svejk : The Power Elite

Most popular humor pages:

Manifest of the Softpanorama IT Slacker Society : Ten Commandments of the IT Slackers Society : Computer Humor Collection : BSD Logo Story : The Cuckoo's Egg : IT Slang : C++ Humor : ARE YOU A BBS ADDICT? : The Perl Purity Test : Object oriented programmers of all nations : Financial Humor : Financial Humor Bulletin, 2008 : Financial Humor Bulletin, 2010 : The Most Comprehensive Collection of Editor-related Humor : Programming Language Humor : Goldman Sachs related humor : Greenspan humor : C Humor : Scripting Humor : Real Programmers Humor : Web Humor : GPL-related Humor : OFM Humor : Politically Incorrect Humor : IDS Humor : "Linux Sucks" Humor : Russian Musical Humor : Best Russian Programmer Humor : Microsoft plans to buy Catholic Church : Richard Stallman Related Humor : Admin Humor : Perl-related Humor : Linus Torvalds Related humor : PseudoScience Related Humor : Networking Humor : Shell Humor : Financial Humor Bulletin, 2011 : Financial Humor Bulletin, 2012 : Financial Humor Bulletin, 2013 : Java Humor : Software Engineering Humor : Sun Solaris Related Humor : Education Humor : IBM Humor : Assembler-related Humor : VIM Humor : Computer Viruses Humor : Bright tomorrow is rescheduled to a day after tomorrow : Classic Computer Humor

The Last but not Least


Copyright © 1996-2016 by Dr. Nikolai Bezroukov. www.softpanorama.org was created as a service to the UN Sustainable Development Networking Programme (SDNP) in the author free time. This document is an industrial compilation designed and created exclusively for educational use and is distributed under the Softpanorama Content License.

The site uses AdSense so you need to be aware of Google privacy policy. You you do not want to be tracked by Google please disable Javascript for this site. This site is perfectly usable without Javascript.

Original materials copyright belong to respective owners. Quotes are made for educational purposes only in compliance with the fair use doctrine.

FAIR USE NOTICE This site contains copyrighted material the use of which has not always been specifically authorized by the copyright owner. We are making such material available to advance understanding of computer science, IT technology, economic, scientific, and social issues. We believe this constitutes a 'fair use' of any such copyrighted material as provided by section 107 of the US Copyright Law according to which such material can be distributed without profit exclusively for research and educational purposes.

This is a Spartan WHYFF (We Help You For Free) site written by people for whom English is not a native language. Grammar and spelling errors should be expected. The site contain some broken links as it develops like a living tree...

You can use PayPal to make a contribution, supporting development of this site and speed up access. In case softpanorama.org is down you can use the at softpanorama.info

Disclaimer:

The statements, views and opinions presented on this web page are those of the author (or referenced source) and are not endorsed by, nor do they necessarily reflect, the opinions of the author present and former employers, SDNP or any other organization the author may be associated with. We do not warrant the correctness of the information provided or its fitness for any purpose.

Last modified: February 19, 2014