|
Softpanorama |
May the source be with you, but remember the KISS principle ;-)
Softpanorama Search
|
| News | Recommended Links | memconf utility | prtconf -pv | Swap Space Management |
| Kernel Upgrades and Maintanance | Virtual memory | Humor |
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):
Amount of free memory on Solaris can be misleading as the system cashes /tmp in the memory.
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: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
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:
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 = 320MBOn 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)
A common question pre-Solaris 8 users ask is "Where has all my memory gone"? Thevmstatcommand, 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
vmstatcommand 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 ispaging (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?
A common question pre-Solaris 8 users ask is "Where has all my memory gone"? Thevmstatcommand, 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
vmstatcommand 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 ispaging (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/systemfile 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_pagingsystem variable on systems running Solaris 8. Also, be sure to remove this system variable from the/etc/systemfile 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:
- Higher Page Reclaims This is considered normal during heavy file system activity.
- Higher Free Memory Values The amount of free memory will be higher, since the free memory count now includes a large component of the file system cache.
- Zero Scan Rates Scan rates will be almost zero, unless there is a shortage of system wide available memory. Scanning is no longer used to replace the free list during normal file system activity.
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 thevmstatcommand 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
vmstatcommand has been updated to report virtual memory usage statistics based on the cyclical page cache. Use thevmstat -pcommand 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.
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:
- "Understanding Why Virtual-to-Physical Address Translation Affects Performance"
- "Working With Multiple Page Sizes in the Solaris OS"
- "Configuring for Multiple Page Sizes"
Solaris Tunable Parameters Reference Manual
Getting to know the Solaris filesystem, Part 3 - SunWorld - July 1999
Getting the Best AIPS Performance from Solaris
IBM poster explaining virtual memory 1978
Copyright © 1996-2009 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. Submit comments This document is an industrial compilation designed and created exclusively for educational use and is placed under the copyright of the Open Content License(OPL). Site uses AdSense so you need to be aware of Google privacy policy. Original materials copyright belong to respective owners. Quotes are made for educational purposes only in compliance with the fair use doctrine.
Disclaimer:
Last modified: August 14, 2009