??xml version="1.0" encoding="utf-8" standalone="yes"?>久久久久久久久久久国产,中文字幕在线一区免费,亚洲一区二区在线免费看http://www.aygfsteel.com/kelly859/archive/2012/11/28/392137.htmlmaxchenmaxchenWed, 28 Nov 2012 06:59:00 GMThttp://www.aygfsteel.com/kelly859/archive/2012/11/28/392137.htmlhttp://www.aygfsteel.com/kelly859/comments/392137.htmlhttp://www.aygfsteel.com/kelly859/archive/2012/11/28/392137.html#Feedback0http://www.aygfsteel.com/kelly859/comments/commentRss/392137.htmlhttp://www.aygfsteel.com/kelly859/services/trackbacks/392137.html技术项?/span> - Linux|卡中断使单?/span>CPUq蝲

By Steve Mushero

 

Linux内核在性能斚w已经l历了很长一D|间的考验Q尤其是2.6/3.x内核。然而,在高IOQ尤其是|络斚w的情况下Q对中断的处理可能成为问题。我们已l?/span> 在拥有一个或多个饱和1Gbps|卡的高性能pȝ上发现过q个问题Q近来在有许多小包ƈ发(大约10000packets/secondQ超载的虚拟Z 也发Cq个问题?/span>

原因很清楚:在最单的模式中,内核通过g中断的方式来处理每个来自于网卡的包。但是随着 数据包速率的增长,带来的中断渐渐超q了单个cpu可处理的范围。单cpu概念很重要,pȝ理员对此往往认识不。在一个普通的4-16核的pȝ中,?/span> 为整?/span>cpu的用率?/span>6-25%左右q且pȝ看上d正常Q所以一个过载的内核很难被发玎ͼ。但是系l将q行很慢Qƈ且会在没有告警,没有dmesg?/span> 志,没有明显征兆的情况下严重丢包?/span>

但是你?/span>top查看多个cpu模式(q行topQ接着键入1)Ӟ%si 列(pȝ中断Q或?/span>mpstat命o?/span> irq?/span>(mpstat -P ALL 1)Q在一些繁忙的pȝ中你会发C断明昑־高,通过l进一?/span>mpstat使用Q你会看到哪?/span>cpu或者哪个设备存在问题?/span>

你需要一个较新版本的mpstatQ可以运?/span>-I 模式Q用以列?/span>irq负蝲Q运行如下命令:

mpstat -I SUM -P ALL 1

5000/U?/span> 有点J忙Q?/span> 1?/span>-2?/span>/U相当高了?/span>

q行如下命o来确认那个设?/span>/目D负蝲Q?/span>

mpstat -I CPU -P ALL 1

q个输出很难被阅读,但是你可以跟t正的列用来确认哪个中断导致负载,例如Q?/span>15Q?/span>19Q?/span>995. 你也可以定义你想查看?/span>cpu

mpstat -I CPU -P 3 1 # 3 ?/span>top,htop中可以定位不同的cpu。(top?/span>mpstat都是?/span>0开始,htop是从1开始计敎ͼ

记录下中断数Q你可以查看中断表 Q?/span>"cat /proc/interrupts" 扑ֈmpstat's得到的数字,你可以发现是哪个讑֤在用中断。这个文件也指示了用该中断?/span>#可以告诉你是什么导致过载?/span>

需要做什么呢Q?/span>

首先Q确认你是否q行irqbalanceQ这个是nice守护q程它会自动?/span>cpu间扩展中断。在J忙的系l中很重要,其是两块网卡,因ؓ默认cpu0 处理所有中断,pȝ很容易过载?/span>irqbalance扩散q些中断用以降低负蝲。ؓ了性能最大化Q你可以手动qq些中断套接字和超U程׃n内核?/span> 散,但是通常没必要这么麻烦?/span>

但是即扩展了中断,某块|卡q是可能D某一?/span>cpuq蝲。这取决于你的网卡和驱动Q但通常有两U有效的Ҏ来防止这L事情发生?/span>

W一U是多网卡队列,有些Intel|卡可以这么做。如果他们有4个队列,可以有四个cpu内核同时处理不同的中断用以分散负载。通常驱动会自动这么做Q你也可以通过mpstat命o来确认?/span>

W二U,q且通常也是更加重要的,|卡驱动选项——'IRQ coalescing'Q中断请求合q。这个选项有着强大的功能,允许|卡在调用中断请求前~存C数据包,从而ؓpȝ节约大量的时间和负蝲。D个例子: 如果|卡~存10个包Q那?/span>cpu负蝲大U降?/span>90%。这个功能通常?/span>ethtool工具来控Ӟ使用'-c/-C'参数Q但是有些驱动要求在驱动初次 加蝲时就做好相关讄。如何设|需要查看本机文档。D个例子,有些|卡Q譬如我们用的Intel|卡Q就?/span>automatic模式可以Ҏ负蝲自动做到 最优化?/span>

NC Logo EN Blue S_20111104最后,像我们在虚拟机中看到的一些驱动,它们不支持多队列或者中断请求合q。这U情况下Q一旦处理中断的cpuJ忙Q就会生性能瓉Q除非你更换讑֤或者驱动?/span>

q是一个复杂的区域Qƈ不广Zh知,但有些不错的技术真的可以提高繁忙系l的性能。此外,一些额外的针对性监控,可以帮助到查扑֒诊断q些难以发现的问题?/span>

 

本文?/span> Steve Mushero, 联合创始人兼首席执行官发表于2012q?/span>4?/span>25?/span>

 

作者简介:

Steve Mushero

云络创始人,首席技术官

Steve Mushero先生拥有过20q在各行业的Q国际性的技术管理经验。他曄担Q土豆|的首席技术官Q负?/span>Intermind的高U管理系l,?/span>Beyond Access Communications ?/span> AirReview担Q首席架构师。他?/span>Managing White-Collar Job Migration to Asia一书的作者,多项专利的发明者?/span>

 

 

云络|络U技Q上P有限公司持有最l解释权

 

转自http://wenku.baidu.com/view/38a764b8f121dd36a32d828e.html

NC Logo EN Blue S_20111104



maxchen 2012-11-28 14:59 发表评论
]]>
Linux iostat监测IO状?/title><link>http://www.aygfsteel.com/kelly859/archive/2012/05/01/377093.html</link><dc:creator>maxchen</dc:creator><author>maxchen</author><pubDate>Mon, 30 Apr 2012 17:41:00 GMT</pubDate><guid>http://www.aygfsteel.com/kelly859/archive/2012/05/01/377093.html</guid><wfw:comment>http://www.aygfsteel.com/kelly859/comments/377093.html</wfw:comment><comments>http://www.aygfsteel.com/kelly859/archive/2012/05/01/377093.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/kelly859/comments/commentRss/377093.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/kelly859/services/trackbacks/377093.html</trackback:ping><description><![CDATA[<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 12px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial, Helvetica, sans-serif; text-indent: 28px; text-align: justify; color: #333333; line-height: 22px; background-color: #ffffff; ">Linuxpȝ出现了性能问题Q一般我们可以通过top、iostat、free、vmstat{命令来查看初步定位问题。其中iostat可以l我们提供丰富的IO状态数据?/p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 12px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial, Helvetica, sans-serif; text-indent: 28px; text-align: justify; color: #333333; line-height: 22px; background-color: #ffffff; ">1. 基本使用</p><pre style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial, Helvetica, sans-serif; color: #333333; line-height: 22px; background-color: #ffffff; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 12px; margin-left: 0px; padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px; font-family: Fixedsys, 'Courier New', Courier, monospace; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #222222; border-left-width: 6px; border-left-style: solid; border-left-color: #1664d9; color: #00cc00; font-size: 1em; line-height: normal; overflow-x: scroll; overflow-y: scroll; width: 582px; ">$iostat -d -k 1 10</div> </pre><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 12px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial, Helvetica, sans-serif; text-indent: 28px; text-align: justify; color: #333333; line-height: 22px; background-color: #ffffff; ">参数 -d 表示Q显C备(盘Q用状态;-k某些使用block为单位的列强制用Kilobytes为单位;1 10表示Q数据显C每?U刷Cơ,共显C?0ơ?/p><pre style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial, Helvetica, sans-serif; color: #333333; line-height: 22px; background-color: #ffffff; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 12px; margin-left: 0px; padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px; font-family: Fixedsys, 'Courier New', Courier, monospace; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #222222; border-left-width: 6px; border-left-style: solid; border-left-color: #1664d9; color: #00cc00; font-size: 1em; line-height: normal; overflow-x: scroll; overflow-y: scroll; width: 582px; ">$iostat -d -k 1 10 Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtn sda 39.29 21.14 1.44 441339807 29990031 sda1 0.00 0.00 0.00 1623 523 sda2 1.32 1.43 4.54 29834273 94827104 sda3 6.30 0.85 24.95 17816289 520725244 sda5 0.85 0.46 3.40 9543503 70970116 sda6 0.00 0.00 0.00 550 236 sda7 0.00 0.00 0.00 406 0 sda8 0.00 0.00 0.00 406 0 sda9 0.00 0.00 0.00 406 0 sda10 60.68 18.35 71.43 383002263 1490928140 Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtn sda 327.55 5159.18 102.04 5056 100 sda1 0.00 0.00 0.00 0 0 </div> </pre><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 12px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial, Helvetica, sans-serif; text-indent: 28px; text-align: justify; color: #333333; line-height: 22px; background-color: #ffffff; ">tpsQ该讑֤每秒的传输次敎ͼIndicate the number of transfers per second that were issued to the device.Q?#8220;一ơ传?#8221;意思是“一ơI/Oh”。多个逻辑h可能会被合ƈ?#8220;一ơI/Oh”?#8220;一ơ传?#8221;h的大是未知的?/p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 12px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial, Helvetica, sans-serif; text-indent: 28px; text-align: justify; color: #333333; line-height: 22px; background-color: #ffffff; ">kB_read/sQ每U从讑֤Qdrive expressedQ读取的数据量;kB_wrtn/sQ每U向讑֤Qdrive expressedQ写入的数据量;kB_readQ读取的L据量QkB_wrtnQ写入的L量数据量Q这些单位都为Kilobytes?/p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 12px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial, Helvetica, sans-serif; text-indent: 28px; text-align: justify; color: #333333; line-height: 22px; background-color: #ffffff; ">上面的例子中Q我们可以看到磁盘sda以及它的各个分区的统计数据,当时l计的磁盘总TPS?9.29Q下面是各个分区的TPS。(因ؓ是瞬间|所以总TPSq不严格{于各个分区TPS的dQ?/p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 12px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial, Helvetica, sans-serif; text-indent: 28px; text-align: justify; color: #333333; line-height: 22px; background-color: #ffffff; ">2. -x 参数</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 12px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial, Helvetica, sans-serif; text-indent: 28px; text-align: justify; color: #333333; line-height: 22px; background-color: #ffffff; ">使用-x参数我们可以获得更多l计信息?/p><pre style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial, Helvetica, sans-serif; color: #333333; line-height: 22px; background-color: #ffffff; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 12px; margin-left: 0px; padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px; font-family: Fixedsys, 'Courier New', Courier, monospace; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #222222; border-left-width: 6px; border-left-style: solid; border-left-color: #1664d9; color: #00cc00; font-size: 1em; line-height: normal; overflow-x: scroll; overflow-y: scroll; width: 582px; ">iostat -d -x -k 1 10 Device: rrqm/s wrqm/s r/s w/s rsec/s wsec/s rkB/s wkB/s avgrq-sz avgqu-sz await svctm %util sda 1.56 28.31 7.80 31.49 42.51 2.92 21.26 1.46 1.16 0.03 0.79 2.62 10.28 Device: rrqm/s wrqm/s r/s w/s rsec/s wsec/s rkB/s wkB/s avgrq-sz avgqu-sz await svctm %util sda 2.00 20.00 381.00 7.00 12320.00 216.00 6160.00 108.00 32.31 1.75 4.50 2.17 84.20 </div> </pre><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 12px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial, Helvetica, sans-serif; text-indent: 28px; text-align: justify; color: #333333; line-height: 22px; background-color: #ffffff; ">rrqm/sQ每U这个设备相关的dh有多被Merge了(当系l调用需要读取数据的时候,VFS请求发到各个FSQ如果FS发现不同的读取请求读取的是相同Block的数据,FS会将q个h合ƈMergeQ;wrqm/sQ每U这个设备相关的写入h有多被Merge了?/p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 12px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial, Helvetica, sans-serif; text-indent: 28px; text-align: justify; color: #333333; line-height: 22px; background-color: #ffffff; ">rsec/sQ每U读取的扇区敎ͼwsec/Q每U写入的扇区数。r/sQThe number of read requests that were issued to the device per secondQw/sQThe number of write requests that were issued to the device per secondQ?/p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 12px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial, Helvetica, sans-serif; text-indent: 28px; text-align: justify; color: #333333; line-height: 22px; background-color: #ffffff; ">awaitQ每一个IOh的处理的q_旉Q单位是微秒毫秒Q。这里可以理解ؓIO的响应时_一般地pȝIO响应旉应该低于5msQ如果大?0ms比较大了?/p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 12px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial, Helvetica, sans-serif; text-indent: 28px; text-align: justify; color: #333333; line-height: 22px; background-color: #ffffff; ">%utilQ在l计旉内所有处理IO旉Q除以dl计旉。例如,如果l计间隔1U,该设备有0.8U在处理IOQ?.2U闲|,那么该设备的%util = 0.8/1 = 80%Q所以该参数暗示了设备的J忙E度。一般地Q如果该参数?00%表示讑֤已经接近满负药行了Q当然如果是多磁盘,即%util?00%Q因为磁盘的q发能力Q所以磁盘用未必就C瓉Q?/p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 12px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial, Helvetica, sans-serif; text-indent: 28px; text-align: justify; color: #333333; line-height: 22px; background-color: #ffffff; ">3. -c 参数</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 12px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial, Helvetica, sans-serif; text-indent: 28px; text-align: justify; color: #333333; line-height: 22px; background-color: #ffffff; ">iostatq可以用来获取cpu部分状态|</p><pre style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial, Helvetica, sans-serif; color: #333333; line-height: 22px; background-color: #ffffff; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 12px; margin-left: 0px; padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px; font-family: Fixedsys, 'Courier New', Courier, monospace; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #222222; border-left-width: 6px; border-left-style: solid; border-left-color: #1664d9; color: #00cc00; font-size: 1em; line-height: normal; overflow-x: scroll; overflow-y: scroll; width: 582px; "><strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial, Helvetica, sans-serif; ">iostat -c 1 10</strong> avg-cpu: %user %nice %sys %iowait %idle 1.98 0.00 0.35 11.45 86.22 avg-cpu: %user %nice %sys %iowait %idle 1.62 0.00 0.25 34.46 63.67</div> </pre><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 12px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial, Helvetica, sans-serif; text-indent: 28px; text-align: justify; color: #333333; line-height: 22px; background-color: #ffffff; ">4. 常见用法</p><pre style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial, Helvetica, sans-serif; color: #333333; line-height: 22px; background-color: #ffffff; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 12px; margin-left: 0px; padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px; font-family: Fixedsys, 'Courier New', Courier, monospace; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #222222; border-left-width: 6px; border-left-style: solid; border-left-color: #1664d9; color: #00cc00; font-size: 1em; line-height: normal; overflow-x: scroll; overflow-y: scroll; width: 582px; ">$iostat -d -k 1 10 #查看TPS和吞吐量信息 iostat -d -x -k 1 10 #查看讑֤使用率(%utilQ、响应时_awaitQ?iostat -c 1 10 #查看cpu状?</div> </pre><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 12px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial, Helvetica, sans-serif; text-indent: 28px; text-align: justify; color: #333333; line-height: 22px; background-color: #ffffff; ">5. 实例分析</p><pre style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial, Helvetica, sans-serif; color: #333333; line-height: 22px; background-color: #ffffff; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 12px; margin-left: 0px; padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px; font-family: Fixedsys, 'Courier New', Courier, monospace; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #222222; border-left-width: 6px; border-left-style: solid; border-left-color: #1664d9; color: #00cc00; font-size: 1em; line-height: normal; overflow-x: scroll; overflow-y: scroll; width: 582px; ">$$iostat -d -k 1 |grep sda10 Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtn sda10 60.72 18.95 71.53 395637647 1493241908 sda10 299.02 4266.67 129.41 4352 132 sda10 483.84 4589.90 4117.17 4544 4076 sda10 218.00 3360.00 100.00 3360 100 sda10 546.00 8784.00 124.00 8784 124 sda10 827.00 13232.00 136.00 13232 136</div> </pre><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 12px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial, Helvetica, sans-serif; text-indent: 28px; text-align: justify; color: #333333; line-height: 22px; background-color: #ffffff; ">上面看到Q磁盘每U传输次数^均约400Q每U磁盘读取约5MBQ写入约1MB?/p><pre style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial, Helvetica, sans-serif; color: #333333; line-height: 22px; background-color: #ffffff; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 12px; margin-left: 0px; padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px; font-family: Fixedsys, 'Courier New', Courier, monospace; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #222222; border-left-width: 6px; border-left-style: solid; border-left-color: #1664d9; color: #00cc00; font-size: 1em; line-height: normal; overflow-x: scroll; overflow-y: scroll; width: 582px; ">iostat -d -x -k 1 Device: rrqm/s wrqm/s r/s w/s rsec/s wsec/s rkB/s wkB/s avgrq-sz avgqu-sz await svctm %util sda 1.56 28.31 7.84 31.50 43.65 3.16 21.82 1.58 1.19 0.03 0.80 2.61 10.29 sda 1.98 24.75 419.80 6.93 13465.35 253.47 6732.67 126.73 32.15 2.00 4.70 2.00 85.25 sda 3.06 41.84 444.90 54.08 14204.08 2048.98 7102.04 1024.49 32.57 2.10 4.21 1.85 92.24</div> </pre><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 12px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial, Helvetica, sans-serif; text-indent: 28px; text-align: justify; color: #333333; line-height: 22px; background-color: #ffffff; ">可以看到盘的^均响应时?lt;5msQ磁盘用率>80。磁盘响应正常,但是已经很繁忙了?/p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 12px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial, Helvetica, sans-serif; text-indent: 28px; text-align: justify; color: #333333; line-height: 22px; background-color: #ffffff; ">参考文献:</p><ol style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 55px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial, Helvetica, sans-serif; color: #333333; line-height: 22px; background-color: #ffffff; "><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Linux man iostat</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><a style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #0054b3; outline-style: none; outline-width: initial; outline-color: initial; ">How Linux iostat computes its results</a></li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><a style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #0054b3; outline-style: none; outline-width: initial; outline-color: initial; ">Linux iostat<br /></a><br />原文地址Q?a >http://www.orczhou.com/index.php/2010/03/iostat-detail/</a></li></ol><img src ="http://www.aygfsteel.com/kelly859/aggbug/377093.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/kelly859/" target="_blank">maxchen</a> 2012-05-01 01:41 <a href="http://www.aygfsteel.com/kelly859/archive/2012/05/01/377093.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>linux下根?proc/stat计算CPU使用情况法详解http://www.aygfsteel.com/kelly859/archive/2012/05/01/377092.htmlmaxchenmaxchenMon, 30 Apr 2012 16:39:00 GMThttp://www.aygfsteel.com/kelly859/archive/2012/05/01/377092.htmlhttp://www.aygfsteel.com/kelly859/comments/377092.htmlhttp://www.aygfsteel.com/kelly859/archive/2012/05/01/377092.html#Feedback0http://www.aygfsteel.com/kelly859/comments/commentRss/377092.htmlhttp://www.aygfsteel.com/kelly859/services/trackbacks/377092.html阅读全文

maxchen 2012-05-01 00:39 发表评论
]]>
Vmstat命o详解http://www.aygfsteel.com/kelly859/archive/2012/05/01/377091.htmlmaxchenmaxchenMon, 30 Apr 2012 16:25:00 GMThttp://www.aygfsteel.com/kelly859/archive/2012/05/01/377091.htmlhttp://www.aygfsteel.com/kelly859/comments/377091.htmlhttp://www.aygfsteel.com/kelly859/archive/2012/05/01/377091.html#Feedback0http://www.aygfsteel.com/kelly859/comments/commentRss/377091.htmlhttp://www.aygfsteel.com/kelly859/services/trackbacks/377091.html阅读全文

maxchen 2012-05-01 00:25 发表评论
]]>
理解Load Average做好压力试http://www.aygfsteel.com/kelly859/archive/2012/04/30/377090.htmlmaxchenmaxchenMon, 30 Apr 2012 15:25:00 GMThttp://www.aygfsteel.com/kelly859/archive/2012/04/30/377090.htmlhttp://www.aygfsteel.com/kelly859/comments/377090.htmlhttp://www.aygfsteel.com/kelly859/archive/2012/04/30/377090.html#Feedback0http://www.aygfsteel.com/kelly859/comments/commentRss/377090.htmlhttp://www.aygfsteel.com/kelly859/services/trackbacks/377090.html
SIP的第四期l束了,因ؓ控制{略的丰富,早先的的压力试l果已经无法反映在高q发和高压力?/span>SIP的运行状况,因此需要重C压力试。跟在测试h员后面做了快一周的压力试Q压力测试的报告也正式出炉,本来也就是告一D落Q但W二天测试h员说要修Ҏ告,׃q次作压力测试的同学是第一ơ作Q有一个指标没有注意,因此需要修改几个测试结果。那个没有注意的指标是load averageQ他和我一样开始只是注意了CPUQ内存的使用状况Q而没有太注意q个指标Q这个指标与他们通常的限Ӟ10左右Q有差别。重新测试的l果׃q个指标被要求压低,最后的报告昄不如原来的好看。自׃没有深入q压力测试,但是觉得不搞明白对将来机器配|和扩容都会有媄响,因此去问?/span>DBA?/span>SAQ得到的l果相差很大Q看来不得不自己LN题的Ҏ所在了?/span>

       通过下面的几个部分的了解Q可以一步一步的扑ևLoad Average在压力测试中真正的作用?/span>

CPU旉?/span>

       Z提高E序执行效率Q大家在很多应用中都采用了多U程模式Q这样可以将原来的序列化执行变ؓq行执行QQ务的分解以及q行执行能够极大地提高程序的q行效率。但q都是代码别的表现Q而硬件是如何支持的呢Q那p?/span>CPU的时间片模式来说明这一切。程序的M指o的执行往往都会要竞?/span>CPUq个最宝贵的资源,不论你的E序分成了多个U程L行不同的dQ他们都必须排队{待获取q个资源来计和处理命o。先看看?/span>CPU的情c下面两图描qC旉片模式和非时间片模式下的U程执行的情况:


?/span> 1 非时间片U程执行情况


?/span> 2 非时间片U程执行情况

       在图一中可以看刎ͼMU程如果都排队等?/span>CPU资源的获取,那么所谓的多线E就没有M实际意义。图二中?/span>CPU Manager只是我虚拟的一个角Ԍ由它来分配和理CPU的用状况,此时多线E将会在q行q程中都有机会得?/span>CPU资源Q也真正实现了在?/span>CPU的情况下实现多线Eƈ行处理?/span>

       ?/span>CPU的情况只是单CPU的扩展,当所有的CPU都满负荷q作的时候,׃Ҏ一?/span>CPU采用旉片的方式来提高效率?/span>

       ?/span>Linux的内核处理过E中Q每一个进E默认会有一个固定的旉片来执行命oQ默认ؓ1/100U)Q这D|间内q程被分配到CPUQ然后独占用。如果用完Q同时未到时间片的规定时_那么׃动放?/span>CPU的占用,如果到时间片未完成工作Q那?/span>CPU的用权也会被收回,q程会被中断挂L待下一个时间片?/span>

CPU利用率和Load Average的区?/span>

       压力试不仅需要对业务场景的ƈ发用L压力参数作模拟,同时也需要在压力试q程中随时关注机器的性能情况Q来保压力试的有效性。当服务器长期处于一U超负荷的情况下q行Q所能接收的压力q不是我们所认ؓ的可接受的压力。就好比目l理在给一个h估工作量的时候,每天都让q个人工?/span>12个小Ӟ那么所制定的项目计划就不是一个合理的计划Q那个hq早会垮掉,而媄响整体的目q度?/span>

CPU利用率在q去常常被我们这些外行认为是判断机器是否已经C满负L一个标准,看到50%-60%的用率p为机器就已经压到了界了?/span>CPU利用率,֐思义是对于CPU的用状况,q是对一个时间段?/span>CPU使用状况的统计,通过q个指标可以看出在某一个时间段?/span>CPU被占用的情况Q如果被占用旉很高Q那么就需要考虑CPU是否已经处于负药作,长期负药作对于机器本w来说是一U损宻I因此必须?/span>CPU的利用率控制在一定的比例下,以保证机器的正常q作?/span>

Load Average?/span>CPU?/span>LoadQ它所包含的信息不?/span>CPU的用率状况Q而是在一D|间内CPU正在处理以及{待CPU处理的进E数之和的统计信息,也就?/span>CPU使用队列的长度的l计信息。ؓ什么要l计q个信息Q这个信息的对于压力试的媄响究竟是怎么LQ那通过一个类比来解释CPU利用率和Load Average的区别以及对于压力测试的指导意义?/span>

我们?/span>CPUq比ؓ电话亭,每一个进E都是一个需要打电话的h。现在一共有4个电话亭Q就好比我们的机器有4核)Q有10个h需要打电话。现在用电话的规则是管理员会按照顺序给每一个h轮流分配1分钟的用电话时_如果使用者在1分钟内用完毕,那么可以立刻电话用权q还l管理员Q如果到?/span>1分钟电话使用者还没有使用完毕Q那么需要重新排队,{待再次分配使用?/span>


?/span> 3 电话使用场景

       上图中对于用电话的用户又作了一ơ分c,1min的代表这些用者占用电话时间小于等?/span>1minQ?/span>2min表示使用者占用电话时间小于等?/span>2minQ以此类推。根据电话用规则,1min的用户只需要得Cơ分配即可完成通话Q而其他两cȝ户需要排队两ơ到三次?/span>

       电话的利用率 = sum (active use cpu time)/period

每一个分配到电话的用者用电话时间的d去除以统计的旉Dc这里需要注意的是是使用电话的时间d(sum(active use cpu time))Q这与占用时间的d(sum(occupy cpu time))是有区别的。(例如一个用户得C一分钟的用权Q在10U钟内打了电话,然后L询号码本׃20U钟Q再用剩下的30U打了另一个电话,那么占用了电?/span>1分钟Q实际只是用了40U)

电话?/span>Average Load体现的是在某一l计旉D内Q所有用电话的人加上等待电话分配的Z个^均统计?/span>

电话利用率的l计能够反映的是电话被用的情况Q当电话长期处于被用而没有的到够的旉休息间歇Q那么对于电话硬件来说是一U超负荷的运作,需要调整用频度。而电?/span>Average Load却从另一个角度来展现对于电话使用状态的描述Q?/span>Average Load高说明对于电话资源的竞争越Ȁ烈,电话资源比较短缺。对于资源的甌和维护其实也是需要很大的成本Q所以在q种?/span>Average Load的情况下电话资源的长?#8220;热竞?#8221;也是对于g的一U损実?/span>

低利用率的情况下是否会有?/span>Load Average的情况生呢Q理解占有时间和使用旉可以知道,当分配时间片以后Q是否用完全取决于使用者,因此完全可能出现低利用率?/span>Load Average的情c由此来看,仅仅?/span>CPU的用率来判?/span>CPU是否处于一U超负荷的工作状态还是不够的Q必ȝ?/span>Load Average来全局的看CPU的用情况和甌情况?/span>

所以回q头来再看测试部对于Load Average的要求,在我们机器ؓ8?/span>CPU的情况下Q控制在10 Load左右Q也是每一?/span>CPU正在处理一个请求,同时q有2个在{待处理。看了看|上很多人的介绍一般来?/span>Load单的计算是2* CPU个数减去1-2左右Q这个只是网上看来的Q未必是一个标准)?/span>

补充几点Q?/span>

1Q对?/span>CPU利用率和CPU Load Average的结果来判断性能问题。首先低CPU利用率不表明CPU不是瓉Q竞?/span>CPU的队列长期保持较长也?/span>CPU负L一U表现。对于应用来说可能会去花旉?/span>I/O,Socket{方面,那么可以考虑是否后这些硬件的速度影响了整体的效率?/span>

q里最好的h范例是我在试中发现的一个现象:SIP当前在处理过E中Qؓ了提高处理效率,控制策略以及计C息都攄?/span>Memcached Cache里面Q当我将Memcached Cache配置扩容一倍以后,CPU的利用率以及Load都有所下降Q其实也是在处理Q务的q程中,{待Socket的返回对?/span>CPU的竞争也产生了媄响?/span>

2Q未来多CPU~程的重要性。现在服务器?/span>CPU都是?/span>CPU了,我们的服务器处理能力已经不再按照摩尔定律来发展。就我上面提到的电话亭场景来看,对于三种不同旉需求的用户来说Q采用不同的分配序Q我们可看到?/span>Load Average׃有不同。假设我们统?/span>Load的时间段?/span>2分钟Q如果将电话分配的顺序按照:1min的用P2min的用P3min的用h分配Q那么我们的Load Average会最低,采用其他序会有不同的l果。所以未来的?/span>CPU~程可以更好的提?/span>CPU的利用率Q让E序跑的更快?/span>

以上所提到的内Ҏ必都是很准确或者正,如果有Q何的偏差也请大家指出Q可以纠正一些不清楚的概c?br />

原文转至文初的blogjavaQ?/span>http://www.aygfsteel.com/cenwenchu/archive/2008/06/30/211712.html 



maxchen 2012-04-30 23:25 发表评论
]]>
Linux Load average负蝲详细解释http://www.aygfsteel.com/kelly859/archive/2012/04/30/377089.htmlmaxchenmaxchenMon, 30 Apr 2012 15:18:00 GMThttp://www.aygfsteel.com/kelly859/archive/2012/04/30/377089.htmlhttp://www.aygfsteel.com/kelly859/comments/377089.htmlhttp://www.aygfsteel.com/kelly859/archive/2012/04/30/377089.html#Feedback0http://www.aygfsteel.com/kelly859/comments/commentRss/377089.htmlhttp://www.aygfsteel.com/kelly859/services/trackbacks/377089.html更有说服力的文章Q?/span>http://dongyajun.iteye.com/blog/645553 

我们知道判断一个系l的负蝲可以使用topQuptime{命令去查看Q它分别记录了一分钟、五分钟、以及十五分钟的pȝq_负蝲?nbsp;
  你可能对?Linux 的负载均?load averages)已有了充分的了解。负载均值在 uptime 或?top 命o中可以看刎ͼ它们可能会显C成q个样子Q?nbsp;
  
Shell代码  收藏代码
  1. load average: 0.090.050.01  

  很多Zq样理解负蝲均|三个数分别代表不同时间段的系l^均负?一分钟、五 分钟、以及十五分?Q它们的数字当然是越越好。数字越高,说明服务器的负蝲?大,q也可能是服务器出现某种问题的信受?nbsp;
  而事实不完全如此Q是什么因素构成了负蝲均值的大小Q以及如何区分它们目前的状况?“?#8221;q是“p糕”?什么时候应该注意哪些不正常的数? 
回答q些问题之前Q首先需要了解下q些数D后的些知识。我们先用最单的例子说明Q?一台只配备一块单核处理器的服务器?nbsp;

行Rq桥 

一只单核的处理器可以Ş象得比喻成一条单车道。设想下Q你现在需要收取这条道路的q桥 ?— 忙于处理那些要q桥的R辆。你首先当然需要了解些信息Q例如R辆的载重、以?q有多少车辆正在{待q桥。如果前面没有R辆在{待Q那么你可以告诉后面的司机通过?如果车辆众多Q那么需要告知他们可能需要稍{一会?nbsp;
  因此Q需要些特定的代可C目前的车流情况Q例如: 
  0.00 表示目前桥面上没有Q何的车流?实际上这U情况与 0.00 ?1.00 之间是相同的Q总而言之很通畅Q过往的R辆可以丝毫不用等待的通过?nbsp;
  1.00 表示刚好是在q桥的承受范围内?q种情况不算p糕Q只是R会有些堵,不过q种情况可能会造成交通越来越慢?nbsp;
  过 1.00Q那么说明这座桥已经出负荷Q交通严重的拥堵?那么情况有多p糕? 例如 2.00 的情况说明R已l超Z桥所能承受的一倍,那么有多余q桥一倍的车辆正在焦急的{待?.00 的话情况更不妙了,说明q桥基本上已经快承受不了,q有出桥负载两倍多的R辆正在等待?nbsp;
  上面的情况和处理器的负蝲情况非常怼。一辆汽车的q桥旉好比是处理器处理某U程 的实际时间。Unix pȝ定义的进E运行时长ؓ所有处理器内核的处理时间加上线E?在队列中{待的时间?nbsp;
  和收q桥费的理员一P你当然希望你的汽?操作)不会被焦急的{待。所以,理想状?下,都希望负载^均值小?1.00 。当然不排除部分峰g过 1.00Q但长此以往保持q?个状态,p明会有问题,q时候你应该会很焦急?nbsp;
 “所以你说的理想负荷?1.00 ?” 
  嗯,q种情况其实q不完全正确。负?1.00 说明pȝ已经没有剩余的资源了。在实际情况?Q有l验的系l管理员都会这条线划在 0.70Q?nbsp;
  “需要进行调查法?#8221;Q?如果长期你的pȝ负蝲?0.70 上下Q那么你需要在事情变得更糟p之前,׃旉了解其原因?nbsp;
  “现在p修复法则”Q?.00 ?如果你的服务器系l负载长期徘徊于 1.00Q那么就应该马上解决q个问题。否则,你将半夜接到你上司的电话Q这可不是g令h愉快的事情?nbsp;
  “凌晨三点半锻Dn体法?#8221;Q?.00?如果你的服务器负载超q了 5.00 q个数字Q那么你失M的睡眠,q得在会议中说明q情况发生的原因QM千万不要让它发生?nbsp;
  那么多个处理器呢?我的均值是 3.00Q但是系l运行正? 
  哇喔Q你有四个处理器的主?那么它的负蝲均值在 3.00 是很正常的?nbsp;
  在多处理器系l中Q负载均值是Z内核的数量决定的。以 100% 负蝲计算Q?.00 表示单个处理器,?2.00 则说明有两个双处理器Q那?4.00 p明主机具有四个处理器?nbsp;
  回到我们上面有关车辆q桥的比喅R?.00 我说q是“一条单车道的道?#8221;。那么在单R?1.00 情况中,说明q桥梁已l被车塞满了。而在双处理器pȝ中,q意味着多出了一倍的 负蝲Q也是说还?50% 的剩余系l资?— 因ؓq有另外条R道可以通行?nbsp;
  所以,单处理器已经在负载的情况下,双处理器的负载满额的情况?2.00Q它q有一倍的资源可以利用?nbsp;

多核与多处理?/strong> 

    先脱M主题Q我们来讨论下多核心处理器与多处理器的区别。从性能的角度上理解Q一C 机拥有多核心的处理器与另台拥有同h目的处理性能基本上可以认为是相差无几。当然实?情况会复杂得多,不同数量的缓存、处理器的频率等因素都可能造成性能的差异?nbsp;
  但即便这些因素造成的实际性能E有不同Q其实系l还是以处理器的核心数量计算负蝲均?。这使我们有了两个新的法则:
  “有多核心即为有多少负荷”法则Q?在多核处理中Q你的系l均g应该高于处理器核心的L量?nbsp;
“核心的核?#8221;法则Q?核心分布在分别几个单个物理处理中q不重要Q其实两颗四核的处理?{于 四个双核处理?{于 八个单处理器。所以,它应该有八个处理器内核?nbsp;

  审视我们自己 
  让我们再来看?uptime 的输?nbsp;
  
Shell代码  收藏代码
  1. ~ $ uptime  
  2.   23:05 up 14 days, 6:087 users, load averages: 0.65 0.42 0.36  

  q是个双核处理器Q从l果也说明有很多的空闲资源。实际情冉|即便它的峰g?1.7Q我也从来没有考虑q它的负载问题?nbsp;
  那么Q怎么会有三个数字的确让h困扰。我们知道,0.65?.42?.36 分别说明上一分钟、最后五分钟以及最后十五分钟的pȝ负蝲均倹{那么这又带来了一个问题: 
  我们以哪个数字ؓ?一分钟?五分?q是十五分钟? 
  其实对于q些数字我们已经谈论了很多,我认Z应该着g五分钟或者十五分钟的q_?倹{坦白讲Q如果前一分钟的负载情冉| 1.00Q那么仍可以说明认定服务器情况还是正常的?但是如果十五分钟的数g然保持在 1.00Q那么就值得注意?/span>(Ҏ我的l验Q这时候你应该增加处理器的数量??/span> 
  那么我如何得知我的系l装备了多少核心的处理器? 
  ?Linux 下,可以使用 
  
Shell代码  收藏代码
  1. cat /proc/cpuinfo  

  获取你系l上的每个处理器的信息。如果你只想得到数字Q那么就使用下面的命令: 
  
Shell代码  收藏代码
  1. grep 'model name' /proc/cpuinfo | wc -l  



maxchen 2012-04-30 23:18 发表评论
]]>
Linux服务器性能评估与优?/title><link>http://www.aygfsteel.com/kelly859/archive/2012/04/30/377086.html</link><dc:creator>maxchen</dc:creator><author>maxchen</author><pubDate>Mon, 30 Apr 2012 14:41:00 GMT</pubDate><guid>http://www.aygfsteel.com/kelly859/archive/2012/04/30/377086.html</guid><wfw:comment>http://www.aygfsteel.com/kelly859/comments/377086.html</wfw:comment><comments>http://www.aygfsteel.com/kelly859/archive/2012/04/30/377086.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/kelly859/comments/commentRss/377086.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/kelly859/services/trackbacks/377086.html</trackback:ping><description><![CDATA[     摘要: 原文地址Qhttp://www.517sou.net/Article/104.aspx 一、媄响Linux服务器性能的因?nbsp;1. 操作pȝU?nbsp;Ø       CPUØ       内存Ø&n...  <a href='http://www.aygfsteel.com/kelly859/archive/2012/04/30/377086.html'>阅读全文</a><img src ="http://www.aygfsteel.com/kelly859/aggbug/377086.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/kelly859/" target="_blank">maxchen</a> 2012-04-30 22:41 <a href="http://www.aygfsteel.com/kelly859/archive/2012/04/30/377086.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>SUSE常用软g安装http://www.aygfsteel.com/kelly859/archive/2012/04/25/376530.htmlmaxchenmaxchenTue, 24 Apr 2012 16:50:00 GMThttp://www.aygfsteel.com/kelly859/archive/2012/04/25/376530.htmlhttp://www.aygfsteel.com/kelly859/comments/376530.htmlhttp://www.aygfsteel.com/kelly859/archive/2012/04/25/376530.html#Feedback0http://www.aygfsteel.com/kelly859/comments/commentRss/376530.htmlhttp://www.aygfsteel.com/kelly859/services/trackbacks/376530.html
安装lrzsz
mkdir -p /usr/src/tools
cd /home/ryan/tools
wget http://down1.chinaunix.net/distfiles/lrzsz-0.12.20.tar.gz
tar zxvf lrzsz-0.12.20.tar.gz
cd lrzsz-0.12.20
./configure --prefix=/usr/local/lrzsz
make
make install
cd /usr/bin 
ln -s /usr/local/lrzsz/bin/lrz rz   
ln -s /usr/local/lrzsz/bin/lsz sz
rz

安装tomcat&resin

vi  catalina.sh 
JAVA_OPTS="$JAVA_OPTS -Xms2048m -Xmx2048m -Xmn512m -XX:PermSize=64M -Xss1000k -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=70"
JAVA_OPTS="$JAVA_OPTS -Xloggc:jvm.log -XX:+PrintGCTimeStamps -XX:+PrintGCApplicationStoppedTime -XX:+PrintGCDetails"
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=5000 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Djava.rmi.server.hostname=192.168.227.2"

SUSE修改hostname
vi /etc/HOSTNAME
192.168.227.2
vi /etc/hosts
192.168.227.2   localhost

修改IP地址
vi /etc/sysconfig/network/ifcfg-eth0
IPADDR=192.168.80.200
NETMASK=255.255.255.0
BROADCAST=192.168.80.255
GATEWAY=192.168.80.2
STARTMODE=onboot
BOOTPROTO=dhcp
USERCONTROL=no
FIREWALL=no

安装sysbench
wget http://nchc.dl.sourceforge.net/project/sysbench/sysbench/0.4.12/sysbench-0.4.12.tar.gz
tar -zxvf sysbench-0.4.12.tar.gz
cp /usr/bin/libtool ./
./configure --with-mysql-includes=/usr/local/mysql/include --with-mysql-libs=/usr/local/mysql/lib
make&make install

挂在׃n目录
mount -t cifs //192.168.80.1/share/data/share -o username=maxchen,password=123456
umount -l /data/share




maxchen 2012-04-25 00:50 发表评论
]]>
վ֩ģ壺 ˱| | | ˫| | | | Ѿ| ɽ| Դ| | ˮ| ̫| | ƽ| | ʯ̨| ͨ| | | | | | | ǧ| ƽ| | | ɽ| Զ| | | ƽ| | ʡ| | ɽ| | | | ĵ|