ImageVerifierCode 换一换
格式:PPT , 页数:24 ,大小:288KB ,
资源ID:2721619      下载积分:20 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.docduoduo.com/d-2721619.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录   微博登录 

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(Linux操作系统11-优化07389.ppt)为本站会员(dreamzhangning)主动上传,道客多多仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知道客多多(发送邮件至docduoduo@163.com或直接QQ联系客服),我们立即给予删除!

Linux操作系统11-优化07389.ppt

1、Acegene IT Co. Ltd.,1,Linux操作系统 系统优化,Acegene IT Co. Ltd.,2,Acegene IT Co. Ltd.,3,内容提要,Performance concepts and measurement tools: CPU Memory Disk I/O Network Process Profiling Kernel & Applications,Measurement Tools,Linux has measurement tools common to UNIX platforms: System Activity Reporter: sar

2、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 time: %idle Executing user code: %user Executing sy

3、stem 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/2004 CPU %user %nice %system %idle int

4、r/s all 19.50 0.00 31.50 49.00 111.000 27.00 0.00 42.00 31.00 111.001 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.71 97.14 02:02:38 AM all 2

5、.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 %idle5.73 0.00 17.16 77.11 avg-cpu: %user %nice %sys %idle4.62 0.0

6、0 27.18 68.21 avg-cpu: %user %nice %sys %idle9.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 contiguous set of p

7、ages 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,Measuring Sw

8、ap,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 (not page

9、d),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 MemFr

10、ee: Total free memory LowFree: Free memory below 1GB physical Buffers: Linux Buffer Cache Cached: Linux Page Cache BigFree: Free bigpages memory,Measuring Memory Usage,No Free Memory?,free command reports a very low number, should I be worried Its OK if Linux buffer or page cache are big Look in -/+

11、 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 ,Acegene IT Co. Ltd.,16,Measuring Disk I/O,You should monitor the I/O across all devices and look for slow devices using: sar, iostat, vm

12、stat Archive collected statistics for comparison,Acegene IT Co. Ltd.,17,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,sar Fla

13、gs,-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,Acegene IT Co. Ltd.,19,Process Specific,Specific process is a suspect: System call trace: strace p Library call trace: ltrace p Det

14、ailed process 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 -efm,Acegene IT Co. Ltd.,20,What Does the Kernel Do?,Its possible to profile the kernel and identify

15、where its spending 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:/ IT Co. Ltd

16、.,21,System Wide,RDA (Remote Diagnostic Agent) http:/ Lshw (Hardware Lister) http:/ IT Co. Ltd.,22,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,A,Acegene IT Co. Ltd.,24,练习,执行下列命令 sar , vmstat /proc/cpuinfo , mpstat , top /proc/meminfo , /proc/slabinfo iostat, sar iptraf, netstat, mii-tool strace , ltrace, lsof,

本站链接:文库   一言   我酷   合作


客服QQ:2549714901微博号:道客多多官方知乎号:道客多多

经营许可证编号: 粤ICP备2021046453号世界地图

道客多多©版权所有2020-2025营业执照举报