OpenSolaris
Collectives
Discussions
Documentation
Download
Source Browser
Free CD
Log-in
|
en
Community Group performance
:
OpenSolaris NUMA project
>
Observability
>
Tools
>
plgrp(1)
>
plgrp(1M) proposed man page.
Top Menu
Show
:
Comments
Attachments
History
Information
Print
:
Print
Print preview
Export as PDF
Export as RTF
Export as HTML
Export as XAR
Wiki code for
plgrp(1M) proposed man page.
Hide Line numbers
1: |** plgrp - observe and affect home lgroup and lgroup affinities of threads** 2: 3: * [[NAME>>#name]] 4: * [[SYNOPSIS>>#synopsis]] 5: * [[DESCRIPTION>>#description]] 6: ** [[OPTIONS>>#options]] 7: *** [[-a <lgroup list>>>#a__lgroup_list_]] 8: *** [[-A <lgroup list>/<none|weak|strong>[,...]>>#a__lgroup_list{{{___}}}none_weak_strong{{{_______}}}]] 9: *** [[-F>>#f]] 10: *** [[-h>>#h]] 11: *** [[-H <lgroup list>>>#h__lgroup_list_]] 12: * [[USAGE>>#usage]] 13: *** [[Specifying lgroups>>#specifying_lgroups]] 14: *** [[Specifying process and thread arguments>>#specifying_process_and_thread_arguments]] 15: * [[EXAMPLES>>#examples]] 16: * [[EXIT STATUS>>#exit_status]] 17: * [[ATTRIBUTES>>#attributes]] 18: * [[SEE ALSO>>#see_also]] 19: * [[WARNINGS>>#warnings]] 20: 21: ---- 22: 23: = NAME 24: 25: plgrp - observe and affect home lgroup and lgroup affinities of threads 26: 27: ---- 28: 29: = SYNOPSIS 30: 31: {{{ 32: 33: plgrp [-F] [-h] <pid> | <core> [/<lwps>] ... 34: }}} 35: 36: {{{ 37: 38: plgrp [-F] -a <lgroup list> <pid>[/<lwps>] ... 39: plgrp [-F] -H <lgroup list> <pid>[/<lwps>] ... 40: plgrp [-F] -A <lgroup list>/<none|weak|strong>[,...] <pid>[/<lwps>] ... 41: }}} 42: 43: ---- 44: 45: = DESCRIPTION 46: 47: The plgrp utility can display or set the home lgroup and lgroup affinities for one or more processes and/or threads/lwps. 48: 49: An lgroup represents the set of CPU and memory-like hardware devices that are at most some distance (latency) apart from each other. Each lgroup in the system is identified by a unique lgroup ID. The lgroups are organized into a hierarchy to facilitate finding the nearest resources (see {{code}}lgrpinfo(1){{/code}} for more about lgroups and the lgroup hierarchy). 50: 51: By default, each thread is assigned a home lgroup upon creation. When the system needs to allocate a CPU or memory resource for a thread, it searches the lgroup hierarchy from the thread’s home lgroup for the nearest available resources to the thread’s home. 52: 53: Typically, the home lgroup for a thread is the lgroup for which the thread has the most affinity. Initially, the system chooses a home lgroup for each thread, but leaves the thread’s affinity for that lgroup set to none. If a thread sets a stronger affinity for an lgroup in its processor set other than its home, the thread is rehomed to that lgroup as long as the thread is not bound to a CPU. The thread may be rehomed to the lgroup in its processor set with the next highest affinity when the affinity (if any) for its home lgroup is removed (set to none). 54: 55: The different levels of lgroup affinities and their semantics are fully described in lgrp_affinity_set(3LGRP). 56: 57: == OPTIONS 58: 59: The following options are supported: 60: 61: === -a <lgroup list> 62: 63: Displays lgroup affinities of specified {{code}}process(es){{/code}} or {{code}}thread(s){{/code}} for the given lgroups. 64: 65: === -A <lgroup list>/<none|weak|strong>[,...] 66: 67: Sets affinity of specified {{code}}process(es){{/code}} or {{code}}thread(s){{/code}} to given lgroups. A comma separated list of <lgroups>/<affinity> assignments can be given to set several affinities at once. 68: 69: === -F 70: 71: Force. Grabs the target process even if another process has control. 72: 73: Caution should be exercised when using the -F flag. Imposing two controlling processes on one victim process can lead to chaos. Safety is assured only when the primary controlling process (typically a debugger) has stopped the victim process, but isn’t doing anything during the application of this proc tool. See WARNINGS for more details. 74: 75: === -h 76: 77: Get home lgroup of specified {{code}}process(es){{/code}} and/or thread(s). This is the default when no options are given. 78: 79: === -H <lgroup list> 80: 81: Sets home lgroup of specified {{code}}process(es){{/code}} and/or thread(s). 82: 83: This sets a strong affinity for the desired lgroup to rehome the thread(s). If more than one lgroup is specified, the plgrp utility will try to home the threads to the lgroups in a round robin fashion. 84: 85: ---- 86: 87: = USAGE 88: 89: === Specifying lgroups 90: 91: The <lgroup list> is a comma separated list of one or more of the following: 92: 93: {{{ 94: 95: - lgroup ID 96: - Range of lgroup IDs specified as 97: <start lgroup ID>-<end lgroup ID> 98: - "all" 99: - "root" 100: - "leaves" 101: }}} 102: 103: The {{code}}all{{/code}} keyword represents all lgroup IDs in the system, the {{code}}root{{/code}} keyword represents the ID of the root lgroup and the {{code}}leaves{{/code}} keyword represents the IDs of all leaf lgroups (ie. lgroups which do not have any children). 104: 105: === Specifying process and thread arguments 106: 107: The plgrp utility takes one or more space separated processes or threads as arguments. Processes and threads can be specified in a manner similiar to the {{code}}proc(1){{/code}} tools. A process ID may be specified as an integer <pid> or /proc/<pid>. Shell expansions may be used to specify processes when /proc/<pid> is used. For example, /proc/* can be used to specify all the processes in the system. If a process ID is given alone, then all the threads of the process are included as arguments to plgrp(1). 108: 109: Threads can be explicitly specified with its process ID and thread ID given together as <pid>/<lwpid>. Multiple threads of a process can be selected at once by using the {{code}}-{{/code}} and {{code}},{{/code}}. For example, <pid>/1,2,7-9 specifies threads 1, 2, 7, 8, and 9 of the process with <pid> as its process ID. 110: 111: ---- 112: 113: = EXAMPLES 114: 115: ; **Example 1:** 116: : Getting home lgroup for shell 117: : 118: 119: {{{ 120: % plgrp $$ 121: PID/LWPID HOME 122: 3401/1 1 123: }}} 124: 125: ; **Example 2:** 126: : Setting home lgroup of multiple threads to the root lgroup 127: : 128: 129: {{{ 130: % plgrp -H root `pgrep firefox` 131: PID/LWPID HOME 132: 918/1 1 => 0 133: 934/1 2 => 0 134: 934/2 1 => 0 135: 934/3 2 => 0 136: 934/625 1 => 0 137: 934/626 2 => 0 138: 934/624 2 => 0 139: 934/623 2 => 0 140: 934/630 1 => 0 141: }}} 142: 143: ; **Example 3:** 144: : Getting two threads’ affinities for lgroups 0-2 145: : 146: 147: {{{ 148: % plgrp -a 0-2 101398/1 101337/1 149: PID/LWPID HOME AFFINITY 150: 101398/1 1 0-2/none 151: 101337/1 1 0-2/none 152: }}} 153: 154: ; **Example 4:** 155: : Setting lgroup affinities 156: : 157: 158: {{{ 159: % plgrp -A 0/weak,1/none,2/strong 101398 160: PID/LWPID HOME AFFINITY 161: 101398/1 1 => 2 0,2/none => 2/strong,0/weak 162: }}} 163: 164: ---- 165: 166: = EXIT STATUS 167: 168: The following exit values are returned: 169: 170: 1. 171: 1. 172: 1. 173: 174: ---- 175: 176: = ATTRIBUTES 177: 178: See {{code}}attributes(5){{/code}} for descriptions of the following attributes: 179: 180: {{{ 181: 182: {{{____________________________________________________________}}} 183: | ATTRIBUTE TYPE | ATTRIBUTE VALUE | 184: |{{{_____________________________}}}|{{{_____________________________}}}| 185: | Availability | | 186: |{{{_____________________________}}}|{{{_____________________________}}}| 187: | Interface Stability | | 188: |{{{_____________________________}}}|{{{_____________________________}}}| 189: | Command Syntax | Unstable | 190: |{{{_____________________________}}}|{{{_____________________________}}}| 191: | Output Format(s) | Unstable | 192: |{{{_____________________________}}}|{{{_____________________________}}}| 193: }}} 194: 195: ---- 196: 197: = SEE ALSO 198: 199: lgrpinfo(1), madv.so.1(1), pmadvise(1), pmap(1), proc(1), prstat(1M), ps(1), lgrp_affinity_get(3LGRP), lgrp_affinity_set(3LGRP), lgrp_home(3LGRP), liblgrp(3LIB), {{code}}proc(4){{/code}} 200: 201: ---- 202: 203: = WARNINGS 204: 205: Like {{code}}proc(1){{/code}} tools, the plgrp utility stops its target processeswhile inspecting them and reporting the results when invoked with any option. 206: 207: There are conditions under which processes may deadlock (see {{code}}proc(1){{/code}} for more details). A process can do nothing while it is stopped. Stopping a heavily used process in a production environment (even for a short amount of time) can cause severe bottlenecks and even hangs of these processes, making them to be unavailable to users. Thus, stopping a UNIX process in a production environment should be avoided. 208: 209: A process being stopped by this tool can be identified by issuing /usr/bin/ps -eflL and looking for T in the first column. Notice that certain processes, for example, sched, can show the T status by default most of the time. 210: 211: |** plgrp - observe and affect home lgroup and lgroup affinities of threads**
Search
Collectives
Community Group
Academic and Research
Accessibility
Advocacy
Appliances
Approachability
Architecture Process and Tools
BrandZ
Chinese Users
Community Advisory Board
Databases
Desktop
Device Drivers
Distribution
Documentation
DTrace
Emerging Platforms
Fault Management
Games on OpenSolaris
HA Clusters
HPC Developer
Installation and Packaging
Internationalization and Localization
Laptop
Logical Domains
Modular Debugger (MDB)
Networking
NFS
Observability
OpenSolaris Governing Board (OGB)
OpenSolaris Printing
OS/Net (ON)
Performance
Power Management
PowerPC
Security
Service Management Facility (smf(5))
Software Porters
Solaris Volume Manager
Storage
Systems Administration Community Group
Testing
Tools Home
Unix File Systems (UFS)
Website Community
X Window System
Xen
ZFS
Zones
Project
ADSL Modem Enhancement
ARC Process Definition
ARM Platform Port
Automatic Data Migration
BIND Update
Bluetooth Stack & Drivers
Brocade FC HBA - Initiator
Brocade FC HBA - Target
Brussels - unified network link configuration
Caiman, Solaris Install Revisited
Celeste
Český portál
Chime Visualization Tool for DTrace
CIFS client for Solaris
CIFS Server
Clearview: Network Interface Coherence
Cluster Agent: Informix Dynamic Server
Cluster Agent: OpenSolaris Container
Cluster Agent: OpenSolaris xVM
Cluster Agent: Oracle E-Business Suite
Cluster agent: PostgreSQL
Cluster Agent: Samba
Cluster Agent: Tomcat
CMT
Coarse Data Flow Parallelism
Colorado: Open HA Cluster on OpenSolaris
Command Assistant
Common Array Manager
Companion - /opt/sfw: Free and Open Source software
COMSTAR: Common Multiprotocol SCSI Target
Content
Contest
CPU Observability
Credentials Process Groups
Crossbow: Network Virtualization and Resource Control
Crypto KMS Agent Toolkit
Cryptographic Framework
Data Migration Manager
Data Tethers
Deutsches Portal
Device Detection Tool
Device Driver Utility
Device Manager
Device Mapper
Direct Rendering Infrastructure & 3D drivers
DTrace Guide
Duckwater: Simplified name services management
Easy Tools
Emancipation
Emulex Fibre Channel Device Driver
Emulex Advanced Ethernet Device Driver
Enable/Enhance Solaris support for Intel Platform
Enhance the support of USB webcams
Enhanced SMF Profiles
Enhancements for AMD-based Platforms
Erlang DTrace Integration
Ethernet bridge module for Solaris
Evaluate Conary
Events Registry
Ext3 file system support
F/OSS Package Base
Facilitation
Fibre Channel over Ethernet
Fine Grained Access Policy (FGAP)
Fingerprint Authentication
Flexible Mandatory Access Control
Forensic Tools
Fully Open X Project
Fuse on Solaris
gcore
Generic Machine Check Architecture Improvements
Google SOC
HA-JBoss
HA-MySQL
Hadoop Live CD
Hitachi
HoneyComb Fixed Content Storage
HPC Stack
Image Packaging System
Improved Performance MIB
Indiana
Innovation Awards
Input Method
Intel Graphics
Interrupt Resource Management
IP Datapath Refactoring
IP over Infiniband
IPsec Tunnel Reform
iSCSI Extensions for Remote DMA (iSER)
iSNS Server
JeOS - Just enough Operating System
JKstat - a java binding for libkstat
Journaled File System (JFS)
K Desktop Environment
Kerberos
Kernel Sockets
Kernel SSL Enhancements
Key Management Framework
Korn Shell 93 integration/migration project
Labeled IPsec
LatencyTOP
Layer 2 Filtering
LDoms Manager
Lending
libMicro - portable microbenchmarks
Link Layer Discovery
Live Media: Technologies for distributions running from CD and other media
Locale Data
lofi compression and cryptography support
lx64 brand
Media Management System
Mega_sas
Mexico
MilaX minimal Live Distribution
MIPS Platform Port
Mozilla DTrace
MRSL.NONsharedDevice
Multi-lingual Glossary
Multi-pathing software (MPxIO)
Multiple disk sector size support
Multiple DOI
Muskoka: An open repository for OpenSolaris technical content
Navigator
Nemo: A Framework for High-Performance Networking
Network Auto-Magic
Network Data Management Protocol
Network MIBs
Network Storage
Network Time Protocol (NTP)
Nevada Globalization
New Design of 4over6 Mechanism Based on OpenSolaris
NFS RDMA transport update and performance analysis
NFS Server in non-Global Zones
NFS version 4.1 pNFS
NFSv4 namespace extensions
Nightingale: Port Songbird to OpenSolaris
NPort ID Virtualization (NPIV)
NUMA
Object Storage Device (OSD) support for Solaris
OHACGE Script Based Plug-in
ON/Nevada (ONNV) Project
Open Development Infrastructure
Open HA Cluster Utilities
Open Sound System
OpenGrok
OpenPegasus CIM Server
OpenRTI
OpenSolaris Busybox
OpenSolaris Desktop
OpenSolaris Hispano
OpenSolaris Security Audit
OpenSolaris support for the QEMU processor emulator: host and guest
PEF: Packet Event Framework
Performance Wrappers
Pkgfactory
Polski Portal
Portail Francophone
Portal Brasil
Portals
Power Management Usability Interfaces
Presto: Automatic Printing Configuration
Printable Many Page Solaris Manuals
Promise SuperTrak RAID HBA Driver
QLogic Converged Network Adapter GLDv3 NIC Driver
Quagga Routing Protocol Suite Integration
RAID Configuration Utility
RBridge (IETF TRILL) support
RDMA Offload Framework
Reno: Login Process Enhancements for Interop
Resource Management
s10brand
SAM/QFS
SCM Migration Project
SCSI RDMA Protocol
SDcard Drivers
Sensor Abstraction Layer
Session Initiation Protocol
SFW
Shell: bourne shell, korn shell, C shell, etc.
Sierra: Intel WiFi Chipsets Support
Simple Panels
SM-HBA Based SAS HBA Management
SMF Documentation
Solaris iSCSI Target
Solaris PowerPC Port
SourceJuicer
Sparks: name service switch/nscd enhancements
Squashfs
Star integration/migration project
Starfish
Starter Kit
Storage Power Management
Sun Security Toolkit
Sun StorageTek Availability Suite
Support for OpenFabrics User Verbs / API on OpenSolaris OS
Support gcc4/GCCfss in Solaris
Suspend/Resume
SVR4 Packaging
Systemz
Tamarack: Removable Media Enhancements in Solaris
Tesla: OpenSolaris Enhanced Power Management
Test Development
Tickless Kernel Architecture
TIPC
Trademarks
Trusted networking interface policy database for Trusted Extensions
Trusted Platform Module support
Use Case
Validated Execution Project
Virtual Console
Virtual Network Machines
Visual Panels
Visualization for HPC
Volo
VRRP: Virtual Router Redundancy Protocol Implementation
VSCAN service
Web Stack
Website
Winchester: Schema mapping and ID mapping for AD Interoperability
Wireless USB Support
Wireless Wide Area Network
X Consolidation
x86 Generic FMA Topology Enumerator
Xen Gate
Xfce: A lightweight desktop environment
ZFS Boot and Install
ZFS on disk encryption support
Zone Manager
Zone Statistics
Русский портал
البوابة العربية
भारतीय पोर्टल
中国门户
日本ポータル
한국 포탈
User Group
Adelaide
Argentina
Arizona
Atlanta
Baltimore-Washington
Bangalore
Bangkok
Bangladesh
Beijing
Bélem
Berlin
Bhimavaram
Bloomington
Campus Ambassadors
Capital Region
Cardiff
Charlotte
Chengdu
Chennai
Chihuahua
Chile
Cleveland
Colombia
Columbus
Connecticut
Cracow
Czech
Dallas/Ft. Worth
Danish
Delaware
Edinburgh
Egypt
Finland
Florida
Front Range
FuZhou
Great Lakes
Greece
Hangzhou
Hawaii
HeFei
Houston
Hyderabad
Indonesia
Irish
Israel
Italian
Jinan
Kabul
Kansas City
Latvia
London
Madurai
Manchester
Mato Grosso
Melbourne
Minas Gerais
Minnesota
Montreal
Moscow
Mumbai
Munich
NEA
Netherlands
New England
New York City
New Zealand
NIT Hamirpur
Noroeste
Oklahoma City
Osnabrück
Peru
Philadelphia
Piaski
Pittsburgh
Porto Alegre
Puget Sound
Pune
Queensland
Research Triangle Park
Romania
Russia
San Antonio
San Diego
San Francisco
São Paulo
Scottish
Serbia
Shanghai
Shenzhen
Silicon Valley
Singapore
Slovak
South African
Southern Connecticut
St. Louis
Sweden
Switzerland
Sydney
Szczecin
Taiwan
Tecum
Thames Valley
Tokyo
Toronto
Trondheim
Tulsa
Turkey
Ukraine
University of Melbourne
Vale do Paraíba
Vancouver
Venezuela
Welsh - Cymru
Wisconsin
Xi'an
Subsites
Code Reviews
Code Repositories
Package Search
Bugster
Bugzilla
Test Machines
Planet
Mailing Lists
Elections & Polls
ARC Case Logs
Source Juicer
Package Factory
User Authentication
Community Group performance Pages
FileBench
Sample Comparison
Gotchas
Quick Start Guide to FileBench
Files
libMicro
Sample Comparison
OpenSolaris NUMA project
8 CPU chip Opteron
Improved Latency Discovery
Load Balancing
Observability
Roles and Grants
Technical Documents