发布网友 发布时间:2022-05-17 20:07
共1个回答
热心网友 时间:2023-11-05 11:32
今天针对apache2.0.55的web服务器进行了一次并发的测试.使用的测试工具就是ab.这个软件就是apache自己带的软件全名叫-ApacheHTTPserverbenchmarkingtool.这次测试的主要目的就是看在加入了modsecurity后.对系统和页面的影响.测试设备:[root@apache2]#cat/proc/cpuinfoprocessor:0vendor_id:GenuineIntelcpufamily:15model:2modelname:Intel(R)Xeon(TM)CPU2.40GHzstepping:9cpuMHz:2392.090cachesize:512KBphysicalid:0siblings:2runqueue:0fdiv_bug:nohlt_bug:nof00f_bug:nocoma_bug:nofpu:yesfpu_exception:yescpuidlevel:2wp:yesflags:fpuvmedepsetscmsrpaemcecx8apicsepmtrrpgemcacmovpatpse36clflushdtsacpimmxfxsrssesse2sshttmbogomips:4771.02processor:1vendor_id:GenuineIntelcpufamily:15model:2modelname:Intel(R)Xeon(TM)CPU2.40GHzstepping:9cpuMHz:2392.090cachesize:512KBphysicalid:0siblings:2runqueue:0fdiv_bug:nohlt_bug:nof00f_bug:nocoma_bug:nofpu:yesfpu_exception:yescpuidlevel:2wp:yesflags:fpuvmedepsetscmsrpaemcecx8apicsepmtrrpgemcacmovpatpse36clflushdtsacpimmxfxsrssesse2sshttmbogomips:4771.02processor:2vendor_id:GenuineIntelcpufamily:15model:2modelname:Intel(R)Xeon(TM)CPU2.40GHzstepping:9cpuMHz:2392.090cachesize:512KBphysicalid:3siblings:2runqueue:2fdiv_bug:nohlt_bug:nof00f_bug:nocoma_bug:nofpu:yesfpu_exception:yescpuidlevel:2wp:yesflags:fpuvmedepsetscmsrpaemcecx8apicsepmtrrpgemcacmovpatpse36clflushdtsacpimmxfxsrssesse2sshttmbogomips:4771.02processor:3vendor_id:GenuineIntelcpufamily:15model:2modelname:Intel(R)Xeon(TM)CPU2.40GHzstepping:9cpuMHz:2392.090cachesize:512KBphysicalid:3siblings:2runqueue:2fdiv_bug:nohlt_bug:nof00f_bug:nocoma_bug:nofpu:yesfpu_exception:yescpuidlevel:2wp:yesflags:fpuvmedepsetscmsrpaemcecx8apicsepmtrrpgemcacmovpatpse36clflushdtsacpimmxfxsrssesse2sshttmbogomips:4771.02[root@apache2]#[root@proc]#catmeminfototal:used:free:shared:buffers:cached:Mem:1049460736974082048753786880144801792554790912Swap:20974346241591173121938317312MemTotal:1024864kBMemFree:73612kBMemShared:0kBBuffers:141408kBCached:519308kBSwapCached:22480kBActive:578528kBActiveAnon:390320kBActiveCache:188208kBInact_dirty:114164kBInact_laundry:19136kBInact_clean:15672kBInact_target:145500kBHighTotal:130496kBHighFree:25924kBLowTotal:894368kBLowFree:47688kBSwapTotal:2048276kBSwapFree:1892888kBCommitLimit:2560708kBCommitted_AS:1342084kBHugePages_Total:0HugePages_Free:0Hugepagesize:2048kB[root@proc]#测试命令以及方法:事先关闭modsecurity模块.然后执行下面语句:[root@bin]#ab-n10000-c1000\127.0.0.1:80/5/index.php?customerid=1%20or%20customerid=2ThisisApacheBench,Version2.0.40-devapache-2.0Copyright(c)1996AdamTwiss,ZeusTechnologyLtd,-sd]medianmaxConnect:014204.802999Processing:91137262907.01522018185Waiting:3980433939.4910615250Total:91137402904.51522018253Percentageoftherequestsservedwithinacertaintime(ms)50%1522066%1523675%1524180%1524590%1526195%1526998%1529299%15297100%18253(longestrequest)[root@bin]#从上面的数据来看基本上是没有太多的区别.这个结果叫我感觉非常满意.能够叫我有更坚定的信心来写完这个文档了:)追问您好。。。所以要怎么做呢