AIX 性能调优-内存、CPU篇

合集下载

AIX查看cpu 内存序列号

AIX查看cpu 内存序列号

95561aix查看内存_cpu_序列号码1、# lsdev -Cc memory查看配置的物理内存设备,下面为其输出示例:L2cache0 Available L2 Cachemem0 Available Memory# lsattr -El mem0输出类似如下所示:goodsize 7936 Amount of usable physical memory in Mbytes Falsesize 7936 Total amount of physical memory in Mbytes False此例说明机器的物理内存为5888MB。

如果前面lsdev的输出中有设备名mem1,则使用同样的命令查看其对应的大小并依此类推。

2、# bootinfo -r8126464此例说明机器的物理内存为8126464kB。

3、# prtconf输出类似下面所示:--------Memory Size: 7936 MB--------本命令会打出当前主机的详细配置信息,输出中有Memory Size属性,指示其当前物理内存大小4、# svmon -G输出类似下面所示:sizeinuse free pin virtualmemory 2031616 1474504 557112 210251 440972pg space 131072 1555workpersclntpin 210251 0 0in use 440972 0 1033532PageSizePoolSizeinusepgsp pin virtuals 4 KB - 1426984 1555 187531 393452m 64 KB - 2970 0 1420 2970其中:size表示真实的物理内存的大小,单位是4k.因此当前物理内存大小为4k*2031616=8126464kB以上命令在Aix5.3版本实验通过==========================================如果系统是AIX5Lprtconf | more如果是4.3.3的话,ML09以上才有这个命令lsattr -El proc0lsattr -El mem0lsattr -El hdisk0lspv -l hdisk0在aix下怎么查看CPU频率,硬盘分区和内存大小。

aix topas解析

aix topas解析
在 AIX 操作系统上,topas 是一个用于性能监控和系统分析的实用工具。它提 供了对系统资源使用情况的实时监控,包括 CPU 使用率、内存使用情况、磁 盘 I/O、网络流量等。使用 topas 可以帮助系统管理员了解系统的性能状况, 识别性能瓶颈,并进行适当的优化。 以下是一些常见的 topas 输出解析及其对应的含义:
1. CPU 情况: topas 显示每个 CPU 核心的使用率,以及整个系统的 CPU 使用率。可以观察各个进程的 CPU 占用情况。
2. 内存使用情况: 显示物理内存、虚拟内存的使用供磁盘读写速率、等待情况、队列长度等指标,帮助识别 磁盘性能问题。
要深入了解 topas 的各种功能和选项,可以在终端上输入 topas 并查看相关帮 助信息。此外,IBM 官方文档也提供了更详细的 topas 使用指南,可供进一步 参考。
4. 网络流量: 显示网络接口的数据传输速率,有助于了解网络使用情况。 5. 进程列表: 列出当前正在运行的进程,包括 PID、CPU 使用率、内存
占用等信息。 6. 虚拟内存: 显示页面调度、虚拟内存使用情况。 7. 适配器信息: 显示网络适配器的状态和统计信息。
topas 的输出是实时更新的,可以通过按键来切换不同的视图和模式。例如,按 t 键可以切换到磁盘和 TTY(终端)视图,按 m 键可以切换到内存视图。

优化AIX 7内存性能 第二部分 监视内存情况并分析结果【ps+sar+svmon +vmstat】

优化AIX 7内存性能 第二部分 监视内存情况并分析结果【ps+sar+svmon +vmstat】

优化AIX 7内存性能第二部分监视内存的使用情况并分析其结果【ps+sar+svmon +vmstat】简介内存子系统调优中最重要的部分并不涉及实际的调优工作。

在对系统进行调优之前,必须弄清楚主机系统的实际运行情况。

要做到这一点,AIX® 7 管理员必须知道应该使用何种工具以及如何对将要捕捉的数据进行分析。

再次重申前面的调优文章(见 参考资料)中所介绍的原则:必须先监视主机,才能对系统进行正确地调优,无论它是作为逻辑分区 (LPAR) 运行还是在自己的物理服务器上运行。

可以使用许多命令来捕捉和分析数据,所以需要了解这些命令,以及其中的哪些命令最适合想要进行的工作。

在捕捉了数据之后,需要对结果进行分析。

有些问题初看起来像是 CPU 的问题,但是经过分析之后,可以诊断出是内存或 I/O 问题,前提是使用合适的工具捕捉数据并知道如何进行分析工作。

只有在正确地完成了这些工作之后,才可以考虑对系统进行实际的更改。

如果医生不了解病史和目前的症状,就无法诊治疾病;同样,也需要在优化子系统之前对其进行诊断。

如果在出现 CPU 或者 I/O 瓶颈的情况下对内存子系统进行优化,这将是毫无帮助的,甚至可能会影响主机的正常运行。

本文将帮助您理解正确地进行诊断的重要性。

您将看到,性能调优远不只是实际的调优工作本身。

在您将要学习的工具中,有一些是通用的监视工具,所有版本的 UNIX® 都提供这些工具,另外一些工具是专门为 AIX 7 编写的。

必须获得基准数据;这是已知环境的关键数据,调优决策都以此作为基础。

不要等到用户开始向服务台抱怨糟糕的性能时,才开始监视系统。

应该在将服务器投入生产环境中后尽快捕捉数据。

如果做到了这一点,那么就可以积极主动地进行调优,其目标是在用户指出问题之前找到它。

如果不了解系统正常运行时的数据,那么就无法确定所查看的数据是否表示存在性能问题。

这是所有适当的性能调优方法的一部分;必须有效地捕捉数据,并正确地分析结果和趋势。

AIX系统参数配置

AIX系统参数配置

AIX系统参数配置AI某内核属于动态内核,核心参数基本上可以自动调整,因此当系统安装完毕后,应考虑修改的参数一般如下:一、单机环境1、系统用户的最大登录数ma某loginma某login的具体大小可根据用户数设定,可以通过mittychlicene 命令修改,该参数记录于/etc/ecurity/login.cfg文件,修改在系统重新启动后生效。

2、系统用户的limit参数这些参数位于/etc/ecurity/limit文件中,可以把这些参数设为-1,即无限制,可以用vi修改/etc/ecurity/limit文件,所有修改在用户重新登录后生效。

default:fize=2097151----》改为-1core=2097151cpu=-1data=262144----》改为-1r=65536tack=65536nofile=20003、PagingSpace检查pagingpace的大小,在物理内存<2G时,应至少设定为物理内存的1.5倍,若物理内存>2G,可作适当调整。

同时在创建pagingpace时,应尽量分配在不同的硬盘上,提高其性能。

利用mittychp修改原有pagingpace的大小或mittymkp增加一块pagingpace。

4、系统核心参数配置利用lattr-Ely0检查ma某uproc,minpout,ma某pout等参数的大小。

ma某uproc为每个用户的最大进程数,通常如果系统运行DB2或ORACLE是应将ma某uproc调整,Default:128、调整到500,ma某uproc增加可以马上起作用,降低需要AI某重起。

当应用涉及大量的顺序读写而影响前台程序响应时间时,可考虑将ma某pout设为33,minpout设为16,利用mittychgy来设置。

5、文件系统空间的设定一般来说,系统的文件系统/、/ur、/var、/tmp的使用率不要超过80%,/tmp建议至少为300M,文件系统满可导致系统不能正常工作,尤其是AI某的基本文件系统,如/(根文件系统)满则会导致用户不能登录。

aix 常用命令

aix 常用命令

aix 常用命令AIX常用命令AIX(Advanced Interactive eXecutive)是IBM公司的一款UNIX操作系统,广泛应用于企业级服务器系统中。

本文将介绍AIX 常用命令,帮助读者更好地理解和使用该操作系统。

一、系统管理命令1. whoami:查询当前登录用户的用户名;2. hostname:查看主机名;3. uname -a:显示系统的各种信息,如内核版本、硬件平台等;4. uptime:查看系统的运行时间和负载情况;5. date:显示当前日期和时间;6. topas:实时监控系统性能,包括CPU利用率、内存使用情况等;7. lparstat -i:显示LPAR(Logical Partition)信息,包括分区的配置和资源利用情况;8. lsdev:列出设备列表;9. errpt:查看系统错误日志,用于排查故障;10. ps -ef:显示当前系统的进程列表;11. mksysb:创建系统备份;12. bootlist:设置系统启动顺序。

二、文件和目录管理命令1. ls:列出当前目录下的文件和子目录;2. pwd:显示当前工作目录的路径;3. cd:切换工作目录;4. mkdir:创建新的目录;5. rm:删除文件或目录;6. cp:复制文件或目录;7. mv:移动文件或目录;8. find:按照指定条件查找文件;9. du:查看目录或文件的磁盘使用情况;10. df:显示文件系统的使用情况;11. cat:查看文件内容;12. vi:编辑文本文件。

三、用户和权限管理命令1. useradd:创建新用户;2. userdel:删除用户;3. passwd:修改用户密码;4. chuser:修改用户属性;5. chown:修改文件或目录的所有者;6. chmod:修改文件或目录的权限;7. chgrp:修改文件或目录的所属组;8. groups:查看用户所属的组;9. su:切换用户身份;10. visudo:编辑sudoers文件,配置用户的sudo权限。

浅议AIX操作系统下应用系统的维护与性能优化

浅议AIX操作系统下应用系统的维护与性能优化

浅议AIX操作系统下应用系统的维护与性能优化摘要:AIX操作系统作为一种高可靠、高性能的操作系统,被广泛应用于金融、电信、制造等行业的服务器系统上。

本文将针对在AIX操作系统下应用系统的维护与性能优化进行论述。

首先,介绍了AIX操作系统的特点以及应用程序在其中的调度方式,并探讨了应用程序在AIX操作系统下的常见问题。

然后,从操作系统级别、网络级别以及应用程序级别三个方面着手对AIX操作系统下应用系统的维护进行了深入阐述。

最后,针对AIX操作系统下应用系统的性能优化,提出了基于硬件、操作系统和应用程序三个方面的优化措施。

关键词:AIX操作系统、应用系统维护、性能优化、调度方式、优化措施正文:一、AIX操作系统的特点及应用程序的调度方式AIX操作系统是IBM公司推出的一种商业级别的UNIX操作系统。

它具有高可靠性、高性能、高伸缩性、高安全性等特点,被广泛应用于金融、电信、制造等行业的服务器系统上。

在AIX操作系统下,应用程序的调度方式是通过进程、线程进行的。

进程是AIX操作系统中的一种资源分配单位,而线程是进程中最小的调度单位。

应用程序启动后,操作系统会为其分配进程和线程资源,并通过在进程和线程之间的切换,协调应用程序的运行。

在AIX操作系统下,应用程序存在着一些常见问题,如进程、线程崩溃、进程池资源泄露以及线程饥饿等。

这些问题通常是由于操作系统或应用程序自身的问题引起的,因此,对于AIX操作系统下的应用系统,维护和优化至关重要。

二、AIX操作系统下应用系统的维护(一)操作系统级别的维护在AIX操作系统下,进行操作系统级别的维护是确保应用系统稳定、高效运行的关键。

操作系统级别的维护主要包括以下方面:1、定期扫描安全漏洞,防范恶意攻击;2、定期进行操作系统补丁更新,确保操作系统处于最新状态;3、定期清理系统日志和垃圾文件,释放系统资源;4、定期备份系统数据和应用程序,确保数据安全;5、定期进行系统性能分析和优化,寻找存在的性能瓶颈并及时解决。

AIX 性能调优

AIX 性能调优

IBM TRAINING®A26AIX Performance TuningJaqui LynchLas Vegas, NVAIX Performance TuningUpdated Presentation will be at:/papers/pseries-a26-aug06.pdfJaqui LynchSenior Systems EngineerMainline Information SystemsAgenda•AIX v5.2 versus AIX v5.3•32 bit versus 64 bit •Filesystem Types•DIO and CIO•AIX Performance Tunables •Oracle Specifics •Commands•ReferencesNew in AIX 5.2•P5support•JFS2•Large Page support (16mb)•Dynamic LPAR•Small Memory Mode–Better granularity in assignment of memory to LPARs •CuOD•xProfiler•New Performance commands–vmo, ioo, schedo replace schedtune and vmtune •AIX 5.1 Status–Will not run on p5 hardware–Withdrawn from marketing end April 2005–Support withdrawn April 2006AIX 5.3•New in5.3–With Power5 hardware•SMT•Virtual Ethernet•With APV–Shared Ethernet–Virtual SCSI Adapter–Micropartitioning–PLMAIX 5.3•New in5.3–JFS2 Updates•Improved journaling•Extent based allocation•1tb filesystems and files with potential of 4PB•Advanced Accounting•Filesystem shrink for JFS2•Striped Columns–Can extend striped LV if a disk fills up•1024 disk scalable volume group–1024 PVs, 4096 LVs, 2M pps/vg•Quotas•Each VG now has its own tunable pbuf pool–Use lvmo commandAIX 5.3•New in5.3–NFSv4 Changes•ACLs–NIM enhancements•Security•Highly available NIM•Post install configuration of Etherchannel and Virtual IP –SUMA patch tool–Last version to support 32 bit kernel–MP kernel even on a UP–Most commands changed to support LPAR stats–Forced move from vmtune to ioo and vmo–Page space scrubbing–Plus lots and lots of other things32 bit versus 64 bit•32 Bit•Up to 96GB memory •Uses JFS for rootvg •Runs on 32 or 64 bit hardware •Hardware all defaults to 32 bit•JFS is optimized for 32 bit• 5.3 is last version of AIX with 32 bit kernel •64 bit•Allows > 96GB memory •Current max is 256GB (arch is 16TB) except 590/595 (1TB & 2TB)•Uses JFS2 for rootvg •Supports 32 and 64 bit apps•JFS2 is optimized for 64 bitFilesystem Types•JFS•2gb file max unless BF •Can use with DIO •Optimized for 32 bit •Runs on 32 bit or 64 bit •Better for lots of small file creates and deletes •JFS2•Optimized for 64 bit •Required for CIO •Can use DIO•Allows larger file sizes •Runs on 32 bit or 64 bit •Better for large files and filesystemsGPFSClustered filesystemUse for RACSimilar to CIO –noncached, nonblocking I/ODIO and CIO•DIO–Direct I/O–Around since AIX v5.1–Used with JFS–CIO is built on it–Effectively bypasses filesystem caching to bring data directlyinto application buffers–Does not like compressed JFS or BF (lfe) filesystems•Performance will suffer due to requirement for 128kb I/O –Reduces CPU and eliminates overhead copying data twice–Reads are synchronous–Bypasses filesystem readahead–Inode locks still used–Benefits heavily random access workloadsDIO and CIO•CIO–Concurrent I/O–Only available in JFS2–Allows performance close to raw devices–Use for Oracle dbf and control files, and online redo logs,not for binaries–No system buffer caching–Designed for apps (such as RDBs) that enforce writeserialization at the app–Allows non-use of inode locks–Implies DIO as well–Benefits heavy update workloads–Not all apps benefit from CIO and DIO –some arebetter with filesystem caching and some are saferthat wayPerformance Tuning•CPU–vmstat, ps, nmon•Network–netstat, nfsstat, no, nfso•I/O–iostat, filemon, ioo, lvmo•Memory–lsps, svmon, vmstat, vmo, iooNew tunables•Old way–Create rc.tune and add to inittab•New way–/etc/tunables•lastboot•lastboot.log•Nextboot–Use –p –o options–ioo–p –o options–vmo–p –o options–no –p –o options–nfso–p –o options–schedo-p –o optionsTuneables1/3•minperm%–Value below which we steal from computational pages -default is 20%–We lower this to something like 5%, depending on workload•Maxperm%–default is 80%–This is a soft limit and affects ALL file pages (including those in maxclient)–Value above which we always steal from persistent–Be careful as this also affects maxclient–We no longer tune this –we use lru_file_repage instead–Reducing maxperm stops file caching affecting programs that are running•maxclient–default is 80%–Must be less than or equal to maxperm–Affects NFS, GPFS and JFS2–Hard limit by default–We no longer tune this –we use lru_file_repage instead•numperm–This is what percent of real memory is currently being used for caching ALL file pages •numclient–This is what percent of real memory is currently being used for caching GPFS, JFS2 and NFS •strict_maxperm–Set to a soft limit by default –leave as is•strict_maxclient–Available at AIX 5.2 ML4–By default it is set to a hard limit–We used to change to a soft limit –now we do notTuneables2/3•maxrandwrt–Random write behind–Default is 0 –try 32–Helps flush writes from memory before syncd runs•syncd runs every 60 seconds but that can be changed–When threshhold reached all new page writes are flushed to disk–Old pages remain till syncd runs•Numclust–Sequential write behind–Number of 16k clusters processed by write behind•J2_maxRandomWrite–Random write behind for JFS2–On a per file basis–Default is 0 –try 32•J2_nPagesPerWriteBehindCluster–Default is 32–Number of pages per cluster for writebehind•J2_nRandomCluster–JFS2 sequential write behind–Distance apart before random is detected•J2_nBufferPerPagerDevice–Minimum filesystem bufstructs for JFS2 –default 512, effective at fs mountTuneables3/3•minpgahead, maxpgahead, J2_minPageReadAhead & J2_maxPageReadAhead–Default min =2 max = 8–Maxfree–minfree>= maxpgahead•lvm_bufcnt–Buffers for raw I/O. Default is 9–Increase if doing large raw I/Os (no jfs)•numfsbufs–Helps write performance for large write sizes–Filesystem buffers•pv_min_pbuf–Pinned buffers to hold JFS I/O requests–Increase if large sequential I/Os to stop I/Os bottlenecking at the LVM–One pbuf is used per sequential I/O request regardless of the number of pages–With AIX v5.3 each VG gets its own set of pbufs–Prior to AIX 5.3 it was a system wide setting•sync_release_ilock–Allow sync to flush all I/O to a file without holding the i-node lock, and then use the i-node lock to do the commit.–Be very careful –this is an advanced parameter•minfree and maxfree–Used to set the values between which AIX will steal pages–maxfree is the number of frames on the free list at which stealing stops (must be >=minfree+8)–minfree is the number used to determine when VMM starts stealing pages to replenish the free list–On a memory pool basis so if 4 pools and minfree=1000 then stealing starts at 4000 pages– 1 LRUD per pool, default pools is 1 per 8 processors•lru_file_repage–Default is 1 –set to 0–Available on >=AIX v5.2 ML5 and v5.3–Means LRUD steals persistent pages unless numperm< minperm•lru_poll_interval–Set to10–Improves responsiveness of the LRUD when it is runningNEW Minfree/maxfree•On a memory pool basis so if 4 pools andminfree=1000 then stealing starts at 4000pages•1 LRUD per pool•Default pools is 1 per 8 processors•Cpu_scale_memp can be used to changememory pools•Try to keep distance between minfree andmaxfree<=1000•Obviously this may differvmstat -v•26279936 memory pages•25220934 lruable pages•7508669 free pages• 4 memory pools•3829840 pinned pages•80.0 maxpin percentage•20.0 minperm percentage•80.0 maxperm percentage•0.3 numperm percentage All filesystem buffers•89337 file pages•0.0 compressed percentage•0 compressed pages•0.1 numclient percentage Client filesystem buffers only•80.0 maxclient percentage•28905 client pages•0 remote pageouts scheduled•280354 pending disk I/Os blocked with no pbuf LVM –pv_min_pbuf •0 paging space I/Os blocked with no psbuf VMM –fixed per page dev •2938 filesystem I/Os blocked with no fsbuf numfsbufs•7911578 client filesystem I/Os blocked with no fsbuf•0 external pager filesystem I/Os blocked with no fsbuf j2_nBufferPerPagerDevice •Totals since boot so look at 2 snapshots 60 seconds apart•pbufs, psbufs and fsbufs are all pinnedno -p -o rfc1323=1no -p -o sb_max=1310720no -p -o tcp_sendspace=262144no -p -o tcp_recvspace=262144no -p -o udp_sendspace=65536no -p -o udp_recvspace=655360nfso -p -o nfs_rfc1323=1nfso -p -o nfs_socketsize=60000nfso -p -o nfs_tcp_socketsize=600000vmo -p -o minperm%=5vmo -p -o minfree=960vmo -p -o maxfree=1088vmo -p -o lru_file_repage=0vmo -p -o lru_poll_interval=10ioo -p -o j2_maxPageReadAhead=128ioo -p -o maxpgahead=16ioo -p -o j2_maxRandomWrite=32ioo -p -o maxrandwrt=32ioo -p -o j2_nBufferPerPagerDevice=1024ioo -p -o pv_min_pbuf=1024ioo -p -o numfsbufs=2048ioo -p -o j2_nPagesPerWriteBehindCluster=32Increase the following if using raw LVMs (default is 9)Ioo –p –o lvm_bufvnt=12Starter Set of tunablesNB please test these before putting intoproduction vmstat -IIGNORE FIRST LINE -average since bootRun vmstat over an interval (i.e. vmstat 2 30)System configuration: lcpu=24 mem=102656MB ent=0kthr memory page faults cpu---------------------------------------------------------------------------r b avm fre re pi po fr sr cy in sy cs us sy id wa pc ec 56 1 18637043 7533530 0 0 0 0 0 0 4298 24564 986698 2 0 0 12.00 100.057 1 18643753 7526811 0 0 0 0 0 0 3867 25124 9130 98 2 0 0 12.00 100.0System configuration: lcpu=8 mem=1024MB ent=0.50kthr memory page faults cpu------------------------------------------------------------------------------r b p avm fre fi fo pi po fr sr in sy cs us sy id wa pc ec1 1 0 170334 968 96 163 0 0 190 511 11 556 662 1 4 90 5 0.03 6.81 1 0 170334 1013 53 85 0 0 107 216 7 268 418 02 92 5 0.02 4.4Pc = physical processors consumed –if using SPPEc = %entitled capacity consumed –if using SPPFre may well be between minfree and maxfreefr:sr ratio 1783:2949 means that for every 1783 pages freed 2949 pages had to be examined. ROT was 1:4 –may need adjustingTo get a 60 second average try: vmstat 60 2Memory and I/O problems•iostat–Look for overloaded disks and adapters•vmstat•vmo and ioo(replace vmtune)•sar•Check placement of JFS and JFS2 filesystems and potentially the logs•Check placement of Oracle or database logs•fileplace and filemon•Asynchronous I/O•Paging•svmon–svmon-G >filename•nmon•Check error logsioo Output•lvm_bufcnt= 9•minpgahead= 2•maxpgahead= 8•maxrandwrt = 32 (default is 0)•numclust= 1•numfsbufs= 186•sync_release_ilock= 0•pd_npages= 65536•pv_min_pbuf= 512•j2_minPageReadAhead = 2•j2_maxPageReadAhead = 8•j2_nBufferPerPagerDevice = 512•j2_nPagesPerWriteBehindCluster = 32•j2_maxRandomWrite = 0•j2_nRandomCluster = 0vmo OutputDEFAULTS maxfree= 128 minfree= 120 minperm% = 20 maxperm% = 80 maxpin% = 80 maxclient% = 80 strict_maxclient = 1 strict_maxperm = 0OFTEN SEEN maxfree= 1088 minfree= 960 minperm% = 10 maxperm% = 30 maxpin% = 80 Maxclient% = 30 strict_maxclient = 0 strict_maxperm = 0numclient and numperm are both 29.9So numclient-numperm=0 aboveMeans filecaching use is probably all JFS2/NFS/GPFSRemember to switch to new method using lru_file_repageiostatIGNORE FIRST LINE -average since bootRun iostat over an interval (i.e. iostat2 30)tty: tin tout avg-cpu: % user % sys % idle % iowait physc% entc0.0 1406.0 93.1 6.9 0.0 0.012.0 100.0Disks: % tm_act Kbps tps Kb_read Kb_wrtn hdisk1 1.0 1.5 3.0 0 3hdisk0 6.5 385.5 19.5 0 771hdisk14 40.5 13004.0 3098.5 12744 13264 hdisk7 21.0 6926.0 271.0 440 13412 hdisk15 50.5 14486.0 3441.5 13936 15036 hdisk17 0.0 0.00.00 0iostat–a AdaptersSystem configuration: lcpu=16 drives=15tty: tin tout avg-cpu: % user % sys % idle % iowait0.4 195.3 21.4 3.3 64.7 10.6Adapter: Kbps tps Kb_read Kb_wrtnfscsi1 5048.8 516.9 1044720428 167866596Disks: % tm_act Kbps tps Kb_read Kb_wrtn hdisk6 23.4 1846.1 195.2 381485286 61892408 hdisk9 13.9 1695.9 163.3 373163554 34143700 hdisk8 14.4 1373.3 144.6 283786186 46044360 hdisk7 1.1 133.5 13.8 628540225786128 Adapter: Kbps tps Kb_read Kb_wrtnfscsi0 4438.6 467.6 980384452 85642468Disks: % tm_act Kbps tps Kb_read Kb_wrtn hdisk5 15.2 1387.4 143.8 304880506 28324064 hdisk2 15.5 1364.4 148.1 302734898 24950680 hdisk3 0.5 81.4 6.8 3515294 16043840 hdisk4 15.8 1605.4 168.8 369253754 16323884 iostat-DExtended Drive Reporthdisk3 xfer: %tm_act bps tps bread bwrtn0.5 29.7K 6.8 15.0K 14.8Kread: rps avgserv minserv maxserv timeouts fails29.3 0.1 0.1784.5 0 0write: wps avgserv minserv maxserv timeouts fails133.6 0.0 0.3 2.1S 0 0 wait: avgtime mintime maxtime avgqsz qfull0.0 0.00.2 0.0 0iostat Otheriostat-A async IOSystem configuration: lcpu=16 drives=15aio: avgc avfc maxg maif maxr avg-cpu: % user % sys % idle % iowait150 0 5652 0 12288 21.4 3.3 64.7 10.6Disks: % tm_act Kbps tps Kb_read Kb_wrtnhdisk6 23.4 1846.1 195.2 381485298 61892856hdisk5 15.2 1387.4 143.8 304880506 28324064hdisk9 13.9 1695.9 163.3 373163558 34144512iostat-m pathsSystem configuration: lcpu=16 drives=15tty: tin tout avg-cpu: % user % sys % idle % iowait0.4 195.3 21.4 3.3 64.7 10.6Disks: % tm_act Kbps tps Kb_read Kb_wrtnhdisk0 1.6 17.0 3.7 1190873 2893501Paths: % tm_act Kbps tps Kb_read Kb_wrtnPath0 1.6 17.0 3.7 1190873 2893501lvmo•lvmo output••vgname= rootvg(default but you can change with –v)•pv_pbuf_count= 256–Pbufs to add when a new disk is added to this VG •total_vg_pbufs= 512–Current total number of pbufs available for the volume group.•max_vg_pbuf_count= 8192–Max pbufs that can be allocated to this VG•pervg_blocked_io_count= 0–No. I/O's blocked due to lack of free pbufs for this VG •global_pbuf_count= 512–Minimum pbufs to add when a new disk is added to a VG •global_blocked_io_count= 46–No. I/O's blocked due to lack of free pbufs for all VGslsps–a(similar to pstat)•Ensure all page datasets the same size although hd6 can be bigger -ensure more page space than memory–Especially if not all page datasets are in rootvg–Rootvg page datasets must be big enough to hold the kernel •Only includes pages allocated (default)•Use lsps-s to get all pages (includes reserved via early allocation (PSALLOC=early)•Use multiple page datasets on multiple disks –Parallelismlsps outputlsps-aPage Space Physical Volume Volume Group Size %Used Active Auto Typepaging05 hdisk9 pagvg01 2072MB 1 yes yes lvpaging04 hdisk5 vgpaging01 504MB 1 yes yes lvpaging02 hdisk4 vgpaging02 168MB 1 yes yes lvpaging01 hdisk3 vgpagine03 168MB 1 yes yes lvpaging00 hdisk2 vgpaging04 168MB 1 yes yes lvhd6 hdisk0 rootvg512MB 1 yes yes lvlsps-sTotal Paging Space Percent Used3592MB 1%Bad Layout aboveShould be balancedMake hd6 the biggest by one lp or the same size as the others in a mixedenvironment like thisSVMON Terminology•persistent–Segments used to manipulate files and directories •working–Segments used to implement the data areas of processesand shared memory segments•client–Segments used to implement some virtual file systems likeNetwork File System (NFS) and the CD-ROM file system•/infocenter/pseries/topi c/com.ibm.aix.doc/cmds/aixcmds5/svmon.htmsvmon-Gsize inuse free pin virtualmemory 26279936 18778708 7501792 3830899 18669057pg space 7995392 53026work pers clnt lpagepin 3830890 0 0 0in use 18669611 80204 28893 0In GB Equates to:size inuse free pin virtualmemory 100.25 71.64 28.62 14.61 71.22pg space 30.50 0.20work pers clnt lpagepin 14.61 0 0 0in use 71.22 0.31 0.15 0General Recommendations•Different hot LVs on separate physical volumes•Stripe hot LV across disks to parallelize•Mirror read intensive data•Ensure LVs are contiguous–Use lslv and look at in-band % and distrib–reorgvg if needed to reorg LVs•Writeverify=no•minpgahead=2, maxpgahead=16 for 64kb stripe size•Increase maxfree if you adjust maxpgahead•Tweak minperm, maxperm and maxrandwrt•Tweak lvm_bufcnt if doing a lot of large raw I/Os•If JFS2 tweak j2 versions of above fields•Clean out inittab and rc.tcpip and inetd.conf, etc for things that should not start–Make sure you don’t do it partially–i.e. portmap is in rc.tcpip and rc.nfsOracle Specifics•Use JFS2 with external JFS2 logs(if high write otherwise internal logs are fine)•Use CIO where it will benefit you–Do not use for Oracle binaries•Leave DISK_ASYNCH_IO=TRUE in Oracle•Tweak the maxservers AIO settings•If using JFS–Do not allocate JFS with BF (LFE)–It increases DIO transfer size from 4k to 128k–2gb is largest file size–Do not use compressed JFS –defeats DIOTools•vmstat –for processor and memory•nmon–/collaboration/wiki/display/WikiPtype/nmon–To get a 2 hour snapshot (240 x 30 seconds)–nmon-fT-c 30 -s 240–Creates a file in the directory that ends .nmon•nmon analyzer–/collaboration/wiki/display/WikiPtype/nmonanalyser–Windows tool so need to copy the .nmon file over–Opens as an excel spreadsheet and then analyses the data•sar–sar-A -o filename 2 30 >/dev/null–Creates a snapshot to a file –in this case 30 snaps 2 seconds apart •ioo, vmo, schedo, vmstat–v•lvmo•lparstat,mpstat•Iostat•Check out Alphaworks for the Graphical LPAR tool•Many many moreOther tools•filemon–filemon -v -o filename -O all–sleep 30–trcstop•pstat to check async I/O–pstat-a | grep aio| wc–l•perfpmr to build performance info forIBM if reporting a PMR–/usr/bin/perfpmr.sh300lparstatlparstat-hSystem Configuration: type=shared mode=Uncapped smt=On lcpu=4 mem=512 ent=5.0 %user %sys %wait %idle physc%entc lbusy app vcsw phint%hypv hcalls0.0 0.5 0.0 99.5 0.00 1.0 0.0 -1524 0 0.5 154216.0 76.3 0.0 7.7 0.30 100.0 90.5 -321 1 0.9 259Physc–physical processors consumed%entc–percent of entitled capacityLbusy–logical processor utilization for system and userVcsw–Virtual context switchesPhint–phantom interrupts to other partitions%hypv-%time in the hypervisor for this lpar–weird numbers on an idle system may be seen/infocenter/pseries/index.jsp?topic=/com.ibm.aix.doc/cmds/aixcmds3/lparstat.htmmpstatmpstat–sSystem configuration: lcpu=4 ent=0.5Proc1Proc00.27%49.63%cpu0cpu2cpu1cpu30.17%0.10% 3.14%46.49%Above shows how processor is distributed using SMTAsync I/OTotal number of AIOs in usepstat–a | grep aios| wc–lOr new way is:ps–k | grep aio| wc-l4205AIO max possible requestslsattr –El aio0 –a maxreqsmaxreqs4096 Maximum number of REQUESTS TrueAIO maxserverslsattr –El aio0 –a maxserversmaxservers 320 MAXIMUM number of servers per cpu TrueNB –maxservers is a per processor setting in AIX 5.3Look at using fastpathFastpath can now be enabled with DIO/CIOSee Session A23 by Grover Davidson for a lot more info on Async I/OI/O Pacing•Useful to turn on during backups (streaming I/Os)•Set high value to multiple of (4*n)+1•Limits the number of outstanding I/Osagainst an individual file•minpout–minimum•maxpout–maximum•If process reaches maxpout then it issuspended from creating I/O untiloutstanding requests reach minpoutNetwork•no –a & nfso-a to find what values are set to now•Buffers–Mbufs•Network kernel buffers•thewall is max memory for mbufs•Can use maxmbuf tuneable to limit this or increase it–Uses chdev–Determines real memory used by communications–If 0 (default) then thewall is used–Leave it alone–TCP and UDP receive and send buffers–Ethernet adapter attributes•If change send and receive above then also set it here–no and nfso commands–nfsstat–rfc1323 and nfs_rfc1323netstat•netstat–i–Shows input and output packets and errors foreach adapter–Also shows collisions•netstat–ss–Shows summary info such as udp packets droppeddue to no socket•netstat–m–Memory information•netstat–v–Statistical information on all adaptersNetwork tuneables•no -a•Using no–rfc1323 = 1–sb_max=1310720(>= 1MB)–tcp_sendspace=262144–tcp_recvspace=262144–udp_sendspace=65536(at a minimum)–udp_recvspace=655360•Must be less than sb_max•Using nfso–nfso-a–nfs_rfc1323=1–nfs_socketsize=60000–nfs_tcp_socketsize=600000•Do a web search on “nagle effect”•netstat–s | grep“socket buffer overflow”nfsstat•Client and Server NFS Info •nfsstat–cn or –r or –s–Retransmissions due to errors•Retrans>5% is bad–Badcalls–Timeouts–Waits–ReadsUseful Links• 1. Ganglia–• 2. Lparmon–/tech/lparmon• 3. Nmon–/collaboration/wiki/display/WikiPtype/nmon• 4. Nmon Analyser–/collaboration/wiki/display/WikiPtype/nmonanalyser • 5. Jaqui's AIX* Blog–Has a base set of performance tunables for AIX 5.3 /blosxomjl.cgi/• 6. vmo command–/infocenter/pseries/v5r3/index.jsp?topic=/com.ibm.aix.doc/cmds/aixcmds6/vmo.htm •7. ioo command–/infocenter/pseries/v5r3/index.jsp?topic=/com.ibm.aix.doc/cmds/aixcmds3/ioo.htm •8. vmstat command–/infocenter/pseries/v5r3/index.jsp?topic=/com.ibm.aix.doc/cmds/aixcmds3/ioo.htm •9. lvmo command–/infocenter/pseries/v5r3/index.jsp?topic=/com.ibm.aix.doc/cmds/aixcmds3/ioo.htm •10. eServer Magazine and AiXtra–/•Search on Jaqui AND Lynch•Articles on Tuning and Virtualization•11. Find more on Mainline at:–/ebrochureQuestions?Supplementary SlidesDisk Technologies•Arbitrated–SCSI20 or 40 mb/sec–FC-AL 100mb/sec–Devices arbitrate for exclusive control–SCSI priority based on address •Non-Arbitrated–SSA80 or 160mb/sec–Devices on loop all treated equally–Devices drop packets of data on loopAdapter Throughput-SCSI100%70%Bits Maxmby/s mby/s Bus DevsWidth •SCSI-15 3.588•Fast SCSI10788•FW SCSI20141616•Ultra SCSI201488•Wide Ultra SCSI 4028168•Ultra2 SCSI402888•Wide Ultra2 SCSI80561616•Ultra3 SCSI1601121616•Ultra320 SCSI3202241616•Ultra640 SCSI6404481616•Watch for saturated adaptersCourtesy of /terms/scsiterms.htmlAdapter Throughput-Fibre100%70%mbit/s mbit/s•13393•266186•530371• 1 gbit717• 2 gbit1434•SSA comes in 80 and 160 mb/secRAID Levels•Raid-0–Disks combined into single volume stripeset–Data striped across the disks•Raid-1–Every disk mirrored to another–Full redundancy of data but needs extra disks–At least 2 I/Os per random write•Raid-0+1–Striped mirroring–Combines redundancy and performanceRAID Levels•RAID-5–Data striped across a set of disks–1 more disk used for parity bits–Parity may be striped across the disks also–At least 4 I/Os per random write(read/write to data and read/write toparity)–Uses hot spare technology。

AIX系统cpu、内存、网卡、硬盘、HBA卡等硬件信息查看

AIX系统cpu、内存、网卡、硬盘、HBA卡等硬件信息查看

AIX系统cpu、内存、网卡、硬盘、HBA卡等硬件信息查看查看AIX系统的主机型号、序列号、CPU、内存、硬盘、网卡、网卡物理插槽位置信息、是否配置以太网通道、网卡链路状态、当前网络速率、HBA卡、HBA卡物理插槽位置信息、HBA卡WWN、HBA卡支持速率、HBA卡当前速率、VG、PV、LV信息、该主机当前由哪台HMC管理、配置了多少磁带机驱动器tape driver等信息,可以通过一段脚本收集全部信息。

一、查看型号、序列号、CPU、内存、HMC型号:#uname -MIBM,8204-E8A序列号:#uname -uIBM,0206*****CPU数量#lsdev -Cc processorproc0 Available 00-00 Processorproc2 Available 00-02 Processorproc4 Available 00-04 Processorproc6 Available 00-06 Processorproc8 Available 00-08 Processorproc10 Available 00-10 Processorproc12 Available 00-12 Processorproc14 Available 00-14 ProcessorCPU主频#lsattr -El proc0frequency 4204000000 Processor Speed Falsesmt_enabled true Processor SMT enabled Falsesmt_threads 2 Processor SMT threads Falsestate enable Processor state Falsetype PowerPC_POWER6 Processor type False查看CPU是否64位#prtconf -cCPU Type: 64-bit内存信息:#lsattr -El mem0ent_mem_cap I/O memory entitlement in Kbytes Falsegoodsize 63744 Amount of usable physical memory in Mbytes False mem_exp_factor Memory expansion factor Falsesize 63744 Total amount of physical memory in Mbytes Falsevar_mem_weight Variable memory capacity weight False查看该机当前由哪台HMC管理#lsrsrc IBM.ManagementServerResource Persistent Attributes for IBM.ManagementServer resource 1:Name= "123.123.123.9"Hostname= "123.123.123.9"ManagerType= "HMC"LocalHostname= "123.123.234.132"ClusterTM= "9078-160"ClusterSNum= ""ActivePeerDomain = ""NodeNameList= {"testdb1"}型号、序列号、内存统一信息:#lsattr -El sys0fwversion IBM,EL350_085 Firmware version and revision levels False modelname IBM,8204-E8A Machine name Falserealmem 65273856 Amount of usable physical memory in Kbytes False systemid IBM,0206***** Hardware system identifier False二、查看磁盘信息:#lspvhdisk0 00cb01e637be5983 rootvg activehdisk1 00cb01e6dd9045e6 rootvg active#lspathEnabled hdisk0 sas0Enabled hdisk1 sas0Available ses0 sas0Available ses1 sas0列出所有磁盘设备#lsdev -Cc diskhdisk0 Available 02-08-00 SAS Disk Drivehdisk1 Available 02-08-00 SAS Disk Drive查看磁盘容量#bootinfo -s hdisk0140013查看磁盘属性#lsattr -El hdisk0reserve_policy no_reserve Reserve Policy Truesize_in_mb 146800 Size in Megabytes False查看磁盘物理插槽信息#lscfg -vpl hdisk0hdisk0 U78A0.001.DNWK9W6-P2-D3 SAS Disk Drive (146800 MB)Hardware Location Code......U78A0.001.DNWK9W6-P2-D3以上命令适用于现场查看,需要查看哪些硬盘,就执行几条命令,但是当需要用户帮忙采集信息,而系统磁盘数量未知的情况下就难以胜任了,以下脚本列出本机所有磁盘信息并对每个磁盘执行bootinfo -s查看磁盘容量,执行lsattr -El查看磁盘属性、执行lscfg -vpl查看磁盘物理插槽、lspv查看磁盘pv信息等。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

AIX 性能调优-内存、CPU篇
sar -P ALL cpu使用情况
sar -a 文件访问情况
dirblk/s 定位文件时被目录访问守护进程读取的快(512b)的个数
iget/s i节点查找系统进程被调用次数
lookuppn/s 目录查找进程找到v节点,并获取路径名的次数
sar -b buffer的活动情况,包括传输、访问、和命中率
bread/s、bwrit/s 块IO操作的数量
lread/s、lwrit/s 逻辑IO请求的个数
pread/s、pwrit/s 裸设备IO操作数量
%rcache、%rwrit cache命中率,计算共式为:((lreads-breads)/lreads)*100
sar -c 系统调用情况
exec/s、fork/s 调用和执行系统调用总数
sread/s、swrit/s read/writ 系统调用次数
rchar/s、wchar/s 被read/writ系统调用的字符数量
scall/s 系统调用总数
sar -k 内核进程活动情况
kexit/s 中断的内核进程数
kproc-ov/s 由于进程数的限制无法创建内核进程的次数
ksched/s 被作业分派的内核进程数
sar -m 消息队列和信号灯活动情况
msg/s IPC消息队列活动情况
sema/s 信号灯活动情况
sar -d 磁盘读写情况
sar -q 队列统计信息
run-sz 内核线程处于运行队列的平均数
%runocc 最近时间段运行队列占用百分比
swpq-sz 内核线程等待页面调度的平均数
%swpocc 交换队列最近活动情况
sar -r 页面调度信息
cycle/s 每秒中页面置换次数
fault/s 每秒中page fault次数
slots 在页空间中空闲页数量
odio/s 每秒中不使用页面空间的磁盘io数
sar -v 进程、内核线程、i节点、和文件表的状态
sar-w 上下文切换次数
sar -y tty设备活动情况
canch/s tty输入队列中规范的字符数
mdmin/s tty modem 中断
outch/s 输出队列字符数
rawch/s 输入队列字符数
revin/s tty接收中断
xmtin/s tty传输中断
如果CPU的使用率接近100%(usr+system),可以视为是CPU瓶颈。

而如果相当大的时间都花费在IO等待上,那就意味着cpu执行受到了磁盘IO的限制,
而IO瓶颈可能来自于文件访问或者没有足够的内存来分配页面。

注意:系统花费在等待远程文件访问的时间不会记入io 等待时间,如果CPU和IO等待的时间都相当的低,但是响应时间又不是很满意,那应该确认系统
花费多少时间在等待远程io,一直一来aix下没有命令对远程io进行分析,只能通过跟踪数据来观察。

vmstat
vmstat命令报告内核线程,虚拟内存、磁盘、陷阱、和CPU活动情况。

Kthr 线程活动情况
r 运行队列
b 等待队列
memory 虚拟和实际内存使用情况
avm 活动的虚拟页面
fre 空闲的页面,当系统内存大于64MB时,最小值MINFREE为120frames,当内存小于64MB时,最小值为内存以MB计的两倍
MINFREE和MAXFREE值可以通过vmtune命令来查看
page page fault和page活动情况,当在内存里分配一个页面时(非NFS或者永久文件页面),其被视为工作页面,工作页面通常包括应用堆栈、
数据和其他的共享内存段。

因此当一个程序栈或者数据区域需要增长时,内存会被被
访问,vvm会从ram和页面空间所在设备分配空间。

这就意味着
在内存耗尽之前,页面空间会被使用。

re 页面输入输出列表,每秒中内存回收数量,当页面处于空闲列表且没有被再利用,它就会被回收应为没有新的IO会初始化它,也包括那些没有完成的IO操作但又被VMM使用预先读取算法调入内存的页面。

pi 从页面空间page in的页面
po 从页面空间page out的页面
fr 页面空闲(页面重置)
sr 页面被页面调度算法扫描次数
cy 页面调度算法进行调度的时钟周期
faults 陷阱和系统中断率
in 设备中断
sy 系统调用
cs 内核线程上下文切换
CPU cpu使用情况
usr 用户进程
sys 系统进程
id cpu空闲时间
wa 等待磁盘IO时间
准则:
r<5,b≈0,
如果fre<MINFREE,将会出现连续不断的页面调度,将导致系统性能问题。

对于page列,re,pi,po,cy维持于比较稳定的状态,PI率不超过5,如果有pagin发生,那么关联页面必须先进行pageout
在内存相对紧张的环境下pagein会强制对不同的页面进行steal操作。

如果系统正在读一个大批的永久页面,你也许可以看到po和pi列
会出现不一致的增长,这种情景并不一定表明系统负载过重,但是有必要对应用程序的数据访问模式进行见检查。

在稳定的情况下,扫描率和重置率几乎相等,在
多个进程处理使用不同的页面的情况下,页面会更加不稳定和杂乱,这时扫描率可能会比重置率高出。

faults列,in,sy,cs会不断跳跃,这里没有明确的限制,唯一的就是这些值最少大于100
cpu列,us,sys,id和wa也是不确定的,最理想的状态是使cpu处于100%工作状态,单这只适合单用户的情况下。

如果在多用户环境中us+sys》80,进程就会在运行队列中花费等待时间,响应时间和吞吐量就会下降。

wa>40表明磁盘io没有也许存在不合理的平衡,或者对磁盘操作比较频繁。

相关文档
最新文档