当前位置: 首页 > 图文教程 > 操作系统 > Unix/Linux > Linux 操作系统跑Linux慢的分析

Unix/Linux
Linux crontab定时执行任务 命令格式与详细例子
linux 查看用户及用户组的方法
让Linux系统有效防御ARP攻击的实用技巧
Linux 常用软件列表
linux wget 一个强大的下载命令
linux 常用脚本、命令
linux 磁盘配额 简单介绍
Linux服务器架设笔记 Squid服务器配置
ubuntu intel 集成显卡安装
ubuntu 9.04 X3100 显卡开启3D特效
Ubuntu 8.10 Server Ruby 的安装方法
Ubuntu root帐户密码修改
ubuntu下apt-get 命令参数
Ubuntu Linux下实现QQ的三种方式
Ubuntu 8.04中建立PHP+MySQL环境
Ubuntu常用软件大全
Ubuntu系统下安装Aircrack-ng
Ubuntu实现FTP功能
ubuntu 字体美化实现方法
ubuntu下netbeans汉字显示残缺问题

Unix/Linux 中的 Linux 操作系统跑Linux慢的分析


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-01   浏览: 38 ::
收藏到网摘: n/a

挺详细的。是好东东。
  iostat的默认参数是td默认参数将被完全替代,例c(terminal, disk, and CPU)。如,iostat -d将只反 映磁盘的如果任何其他的选项被指定,这个统计结果。   语法:   基本语法: iostat interval count   option - 让你指定所。x 选项给出了完整的统计需信息的设备,像磁盘、cpu或结果(gives the extended 者终端(-d , -c , -t or -tdc )   statistic)。   interval - 在两个samples之间的时间(秒)。   count - 就是需要统计几次   例子:   $ iostat -xtc 5 2   extended disk statistics tty cpu   disk r/s w/s Kr/s Kw/s wait actv svc_t %w %b tintout us sy wt id   sd0 2.6 3.0 20.7 22.7 0.1 0.2 59.2 6 19 0 84 3 85 11 0   sd1 4.2 1.0 33.5 8.0 0.0 0.2 47.2 2 23   sd2 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0   sd3 10.2 1.6 51.4 12.8 0.1 0.3 31.2 3 31   The fields have the following meanings:   disk name of the disk   r/s reads per second   w/s writes per second   Kr/s kilobytes read per second   Kw/s kilobytes written per second   wait average number of transactions waiting for service (Q length)   actv average number of transactions actively   being serviced (removed from the   queue but not yet   completed)   %w percent of time there are transactions waiting   for service (queue non-empty)   %b percent of time the disk is busy (transactions   in progress)   Results and Solutions:   从iostat输出结果中需要注意的值:   Reads/writes per second (r/s , w/s)   Percentage busy (%b)   Service time (svc_t)   如果磁盘显示长时间的高reads/writ同时average service time (svc_t)也远es,并且磁盘的percentage busy (%b)也远大于5%,大于30   milliseconds,这以下的措施需要被执行:   1.)调整应用,令其使用磁盘i/o更加cache 有效率,可以通过修改磁盘队列、使用应用服务器的  2.)将文件系统分布到2个或多个磁盘上,并使用volumemanager/disksuite的条带化特点  3.) 增加系统参数值,values for inode cache ,如inode cache , ufs_ninode。ufs_ninode , which Increase the system parameter   is Number of inodes to be held iUFS), not on a per-file system basisn memory. Inodes are cached globally (for   4.) 将文件系统移到更快的磁盘/控制器,或者用更好的设备来代替   vmstat - vmstat反映?)和cpu的活动情况 了进程的虚拟内存、虚拟内存、磁盘、trap(是不是翻译成中断?  在多cpu系统中,vmsta果没有选项,vmstat显示一t在输出结果中平均了cpu数量。行虚拟内存活动的概要 For per-process statistics .如  结果,是从系统启动时开始的。   语法:   vmstat interval count   option - 让你指定所需的信息类型etc. ,例如 paging -p , cache -c ,.interrupt -i   如果没有指定选项,将会显示进程、内存、页、磁盘、中断和cpu信息   interval - 同iostat   count - 同iostat   例子   The following command displays a summary of whatthe system   is doing every five seconds.   example% vmstat 5   procs memory page disk faults cpu   r b w swap free re mf pi p fr desr s0 s1 s2 s3 in sy cs us sy id   0 0 0 11456 4120 1 41 19 1 3 0 2 0 4 0 0 48 112 130 4 14 82   0 0 1 10132 4280 0 444 0 0 0 0 0 23 0 0 211 230144 3 35 62   0 0 1 10132 4616 0 0 20 0 0 0 0 0 19 0 0 150 172 146 3 33 64   0 0 1 10132 5292 0 09 0 0 0 0 0 21 0 0 165 105 130 1 21 78   The fields of vmstat's display are   procs   r in run queue   b blocked for resources I/O, paging etc.   w swapped   memory (in Kbytes)   swap - amount of swap space currently available   free - size of the free list   page ( in units per second).   re page reclaims - see -S option for how this field is modified.   mf minor faults - see -S option for how this field is modified.   pi kilobytes paged in   po kilobytes paged out   fr kilobytes freed   de anticipated short-term memoryshortfall (Kbytes)   sr pages scanned by clock algorithm   disk ( operations per second )   There are slots for up to four disks, labeled with a single letter and number.  The letter indicatesthe type of disk (s = SCSI,i = IPI, etc) . The number is  the logical unit number.   faults   in (non clock) device interrupts   sy system calls   cs CPU context switches   cpu - breakdown of pan a ercentage usage of CPU time.On multiprocessors this is   verage across all p