Linux操作系统11-优化.ppt_第1页
Linux操作系统11-优化.ppt_第2页
Linux操作系统11-优化.ppt_第3页
Linux操作系统11-优化.ppt_第4页
Linux操作系统11-优化.ppt_第5页
已阅读5页,还剩18页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

AcegeneITCo.Ltd.,1,Linux操作系统系统优化,AcegeneITCo.Ltd.,2,内容提要,Performanceconceptsandmeasurementtools:CPUMemoryDiskI/ONetworkProcessProfilingKernel&Applications,MeasurementTools,LinuxhasmeasurementtoolscommontoUNIXplatforms:SystemActivityReporter:sarHistoricaldatabaseVirtualMemoryStatistics:vmstat,freeI/OStatistics:iostatTopResourceConsumers:top-cX-basedtools:xosview,gnome-system-monitor,ksysguard,gkrellm,CPUMeasurements,IdentifytheCPUstatisticsandinterpretthem:Idletime:%idleExecutingusercode:%userExecutingsystemcode:%systemLoadaverage:runq-szStartwithcat/proc/cpuinfoTotalCPUcount/speedThereareseveralwaystoseethesameinformation,forexample:CPUactivity,CPUActivity-mpstat,#mpstat-P,#mpstat-PALL11Linux2.4.21-15.EL(raclinux1)08/04/2004CPU%user%nice%system%idleintr/sall19.500.0031.5049.00111.00027.000.0042.0031.00111.00112.000.0021.0067.00111.00,WhatismyCPUdoing?:mpstat,CPUActivity-sar,#sar-u23Linux2.4.21-15.EL(raclinux1)08/04/200402:02:34AMCPU%user%nice%system%idle02:02:36AMall1.140.001.7197.1402:02:38AMall2.620.003.6693.7202:02:40AMall0.540.003.7895.68Average:all1.450.003.0995.46,#sar-u,WhatismyCPUdoing?:sar,CPUActivity-iostat,#iostat-c23Linux2.4.21-15.EL(raclinux1)08/04/2004avg-cpu:%user%nice%sys%idle5.730.0017.1677.11avg-cpu:%user%nice%sys%idle4.620.0027.1868.21avg-cpu:%user%nice%sys%idle9.550.0035.9654.49,#iostat-c,WhatismyCPUdoing?:iostat,LinuxVirtualMemory,EachprocessisassignedacontiguousaddressspaceinvirtualmemorythatmapsprocessmemoryallocationstotherealmemoryUseraddressspaceisacontiguoussetofpagesandislimitedto4GBperprocessPhysicalAddressExtension(PAE),allowsaccesstomorethan4GBofphysicalmemoryRHat:enterprisekernel(impliedSMP)SuSE:64GBkernel(impliedSMP),Swap,Swapspace(disk),Physicalmemory(RAM),Virtualmemory,Swapped-inpages,Swapped-outpages,MeasuringSwap,Howmuchisavailable/used?swapon-s(cat/proc/swaps)vmstatso:AmountofmemoryKB/sSWAPOUTtodisksi:AmountofmemoryKB/sSWAPINfromdiskswapd:AmountofvirtualmemoryKBreservedCreate/Addmore?#mkswap/dev/sdc3fstab:/dev/sdc3swapswappri=4200,MemoryUsage,Kernel(notpaged),Sharedmemory,Processmemory,Processmemory,Processmemory,Pagecache,Buffercache,Kernelmodules,Dynamicallyadjusted,Paged,Paged/locked,Notpaged,Measurememoryutilizationandpaging.Identifythesignificantmemorystatistics.cat/proc/meminfo(unitsKB)MemTotal:TotalphysicalmemoryMemFree:TotalfreememoryLowFree:Freememorybelow1GBphysicalBuffers:LinuxBufferCacheCached:LinuxPageCacheBigFree:Freebigpagesmemory,MeasuringMemoryUsage,NoFreeMemory?,freecommandreportsaverylownumber,shouldIbeworriedItsOKifLinuxbufferorpagecachearebigLookin-/+buffer/cacherowoffreeforprojectedfreememoryVeryusefulstat,Memory-sar,-Bpagingstatistics-Rmemorystatistics-Wswappingstatistics,#sar-B#sar-R,AcegeneITCo.Ltd.,15,MeasuringDiskI/O,YoushouldmonitortheI/Oacrossalldevicesandlookforslowdevicesusing:sar,iostat,vmstatArchivecollectedstatisticsforcomparison,AcegeneITCo.Ltd.,16,NetworkTraffic,Checkthefollowingsourcesofnetworktraffic:OracleSQL*NetServicingSQLconnectionsInterconnectinRACenvironmentNetworkfilesystemSambaHTTPserverStartwithsar-nDEViptrafalsoveryuseful,sarFlags,-freadfromsarhistoricalfile/var/log/sa/-s-estart/endtimes-shh:mm:ss-rmemory/swaputilization-cprocesscreationactivity-wcontextswitchingactivity,AcegeneITCo.Ltd.,18,ProcessSpecific,Specificprocessisasuspect:Systemcalltrace:stracepLibrarycalltrace:ltracepDetailedprocessstatistics:psoTry:ps-e-opid,ppid,pcpu,rss,vsz,pri,wchan,cmdWhohasmyfileopen?lsof-ppidForProcessTree,usepstreepNotseeingaprocess,itsprobablyathread,try:ps-efm,AcegeneITCo.Ltd.,19,WhatDoestheKernelDo?,Itspossibletoprofilethekernelandidentifywhereitsspendingtime:Bootwith“profile=2nmi_watchdog=1”EitherinLiloorGruboraddmanuallyatboottimeUsereadprofile-mStartwithreadprofile-r(toresetcounters)Veryeasytouse,butusefulonlyifyouseehighsystemtime.Toprofileuserapplicationsuseoprofile,AcegeneITCo.Ltd.,20,SystemWide,RDA(RemoteDiagnosticAgent),AcegeneITCo.Ltd.,21,Summary:LinuxMonitoringTools,Overalltoolssar,vmstatCPU/proc/cpuinfo,mpstat,topMemory/proc/meminfo,/proc/slabinfoDiskI/Oiostat,sarNetworki

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论