Linux操作系統(tǒng)11-優(yōu)化

上傳人:dfg****19 文檔編號:248269398 上傳時間:2024-10-23 格式:PPT 頁數(shù):23 大?。?94KB
收藏 版權(quán)申訴 舉報 下載
Linux操作系統(tǒng)11-優(yōu)化_第1頁
第1頁 / 共23頁
Linux操作系統(tǒng)11-優(yōu)化_第2頁
第2頁 / 共23頁
Linux操作系統(tǒng)11-優(yōu)化_第3頁
第3頁 / 共23頁

下載文檔到電腦,查找使用更方便

15 積分

下載資源

還剩頁未讀,繼續(xù)閱讀

資源描述:

《Linux操作系統(tǒng)11-優(yōu)化》由會員分享,可在線閱讀,更多相關(guān)《Linux操作系統(tǒng)11-優(yōu)化(23頁珍藏版)》請在裝配圖網(wǎng)上搜索。

1、單擊此處編輯母版標(biāo)題樣式,單擊此處編輯母版文本樣式,第二級,第三級,第四級,第五級,Acegene IT Co.Ltd.,*,Linux,操作系統(tǒng),系統(tǒng)優(yōu)化,周炯,上海艾基信息技術(shù)有限公司,1,Acegene IT Co.Ltd.,內(nèi)容提要,Performance concepts and measurement tools:,CPU,Memory,Disk I/O,Network,Process,Profiling Kernel&Applications,2,Acegene IT Co.Ltd.,Measurement Tools,Linux has measurement tools co

2、mmon toUNIX platforms:,System Activity Reporter:,sar,Historical database,Virtual Memory Statistics:,vmstat,free,I/O Statistics:,iostat,Top Resource Consumers:,top-c,X-based tools:,xosview,gnome-system-monitor,ksysguard,gkrellm,CPU Measurements,Identify the CPU statistics and interpret them:,Idle tim

3、e:%idle,Executing user code:%user,Executing system code:%system,Load average:,runq-sz,Start with,cat/proc/,cpuinfo,Total CPU count/speed,There are several ways to see the same information,for example:CPU activity,CPU Activity-,mpstat,#mpstat-P ,#mpstat-P ALL 1 1,Linux 2.4.21-15.EL(raclinux1)08/04/20

4、04,CPU%user%nice%system%idle intr/s,all 19.50 0.00 31.50 49.00 111.00,0 27.00 0.00 42.00 31.00 111.00,1 12.00 0.00 21.00 67.00 111.00,What is my CPU doing?:,mpstat,CPU Activity-,sar,#,sar,-u 2 3,Linux 2.4.21-15.EL(raclinux1)08/04/2004,02:02:34 AM CPU%user%nice%system%idle,02:02:36 AM all 1.14 0.00 1

5、.71 97.14,02:02:38 AM all 2.62 0.00 3.66 93.72,02:02:40 AM all 0.54 0.00 3.78 95.68,Average:all 1.45 0.00 3.09 95.46,#sar-u ,What is my CPU doing?:,sar,CPU Activity-,iostat,#iostat-c 2 3,Linux 2.4.21-15.EL(raclinux1)08/04/2004,avg-cpu,:%user%nice%sys%idle,5.73 0.00 17.16 77.11,avg-cpu,:%user%nice%sy

6、s%idle,4.62 0.00 27.18 68.21,avg-cpu,:%user%nice%sys%idle,9.55 0.00 35.96 54.49,#iostat-c ,What is my CPU doing?:,iostat,Linux Virtual Memory,Each process is assigned a contiguous address space in virtual memory that maps process memory allocations to the real memory,User address space is a contiguo

7、us set of pages and is limited to 4GB per process,Physical Address Extension(PAE),allows access to more than 4GB of physical memory,RHat,:enterprise kernel(implied SMP),SuSE,:64GB kernel(implied SMP),Swap,Swap space(disk),Physical,memory(RAM),Virtual memory,Swapped-in pages,Swapped-out pages,Measuri

8、ng Swap,How much is available/used?,swapon,-s (cat/proc/swaps),vmstat,so,:,Amount of memory KB/s SWAP OUT to disk,si,:,Amount of memory KB/s SWAP IN from disk,swapd,:Amount of virtual memory KB reserved,Create/Add more?,#,mkswap,/dev/sdc3,fstab,:,/dev/sdc3 swap swap,pri,=42 0 0,Memory Usage,Kernel(n

9、ot paged),Shared memory,Process memory,Process memory,Process memory,Page cache,Buffer cache,Kernel modules,Dynamically adjusted,Paged,Paged/locked,Not paged,Measure memory utilization and paging.Identify the significant memory statistics.,cat/proc/,meminfo,(units KB),MemTotal,:Total physical memory

10、,MemFree,:Total free memory,LowFree,:Free memory below 1GB physical,Buffers,:Linux Buffer Cache,Cached,:Linux Page Cache,BigFree,:Free,bigpages,memory,Measuring Memory Usage,Page out,Page in,No Free Memory?,free,command reports a very low number,should I be worried,Its OK if Linux buffer or page cac

11、he are big,Look in-/+buffer/cache row of,free,for projected free memory,Very useful stat,Memory-,sar,-B,paging statistics,-R,memory statistics,-W,swapping statistics,#sar-B ,#sar-R ,Measuring Disk I/O,You should monitor the I/O across all devices and look for slow devices using:,sar,iostat,vmstat,Ar

12、chive collected statistics for comparison,15,Acegene IT Co.Ltd.,Network Traffic,Check the following sources of network traffic:,Oracle SQL*Net Servicing SQL connections,Interconnect in RAC environment,Network file system,Samba,HTTP server,Start with,sar,-n DEV,iptraf,also very useful,16,Acegene IT C

13、o.Ltd.,sar,Flags,-f read from,sar,historical file,/,var/log/sa,/,-s-e start/end times,-s,hh:mm:ss,-r memory/swap utilization,-c process creation activity,-w context switching activity,Process Specific,Specific process is a suspect:,System call trace:,strace,p,Library call trace:,ltrace,p,Detailed pr

14、ocess statistics:,ps,o,Try:,ps,-e-o,pid,ppid,pcpu,rss,vsz,pri,wchan,cmd,Who has my file open?,lsof,-p,pid,For Process Tree,use,pstree,p,Not seeing a process,its probably a thread,try:,ps,-,ef,m,18,Acegene IT Co.Ltd.,What Does the Kernel Do?,Its possible to profile the kernel and identify where its s

15、pending time:,Boot with,“profile=2,nmi_watchdog,=1”,Either in,Lilo,or Grub or add manually at,boottime,Use,readprofile,-m,Start with,readprofile,-r,(to reset counters),Very easy to use,but useful only if you see high system time.,To profile user applications use,oprofile,http:/,,/,19,Acegene IT Co.L

16、td.,System Wide,RDA(Remote Diagnostic Agent),http:/, Lister),http:/, IT Co.Ltd.,Summary:Linux Monitoring Tools,Overall tools,sar,vmstat,CPU,/proc/,cpuinfo,mpstat,top,Memory,/proc/,meminfo,/proc/,slabinfo,Disk I/O,iostat,sar,Network,iptraf,netstat,mii,-tool,Individual process debugging,strace,ltrace,lsof,21,Acegene IT Co.Ltd.,A,Q,&,Q U E S T I O N S,A N S W E R S,練習(xí),執(zhí)行下列命令,sar,vmstat,/proc/,cpuinfo,mpstat,top,/proc/,meminfo,/proc/,slabinfo,iostat,sar,iptraf,netstat,mii,-tool,strace,ltrace,lsof,23

展開閱讀全文
溫馨提示:
1: 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
2: 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
3.本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
5. 裝配圖網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

最新文檔

相關(guān)資源

更多
正為您匹配相似的精品文檔
關(guān)于我們 - 網(wǎng)站聲明 - 網(wǎng)站地圖 - 資源地圖 - 友情鏈接 - 網(wǎng)站客服 - 聯(lián)系我們

copyright@ 2023-2025  zhuangpeitu.com 裝配圖網(wǎng)版權(quán)所有   聯(lián)系電話:18123376007

備案號:ICP2024067431-1 川公網(wǎng)安備51140202000466號


本站為文檔C2C交易模式,即用戶上傳的文檔直接被用戶下載,本站只是中間服務(wù)平臺,本站所有文檔下載所得的收益歸上傳人(含作者)所有。裝配圖網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對上載內(nèi)容本身不做任何修改或編輯。若文檔所含內(nèi)容侵犯了您的版權(quán)或隱私,請立即通知裝配圖網(wǎng),我們立即給予刪除!