我的地盘我做主! 博客:http://tester2test.cnblogs.com/   msn:win_soft@163.com

Application Center Test知识点滴积累

上一篇 / 下一篇  2007-06-07 14:30:40 / 个人分类:其他

B8E1e@"O"~_+DR1x ?6b0Application Center Test 在测试运行中自动监视 HTTP 性能统计信息,但性能计数器必须在测试运行之前明确进行配置。

dE9R"q)N a4h r9hO0 51Testing软件测试网2UkT Cv8Xr9M2u O

请检查 ACTTrace.log 文件和报告,并确保不存在以下错误:
sn;Q3zG4qM ]0脚本错误
(rCMT g,wO0DNS 错误 51Testing软件测试网2O;p Oajc H7|T^
套接字连接错误 51Testing软件测试网f5EyGm8e
HTTP 错误 51Testing软件测试网dP:R4M.kW_)S w
如有必要,请在重新运行测试之前改正其中的错误。

?3u,B2`'} Y Q&\0

6vZ1R}a0
9gp `L [V6nj/NC#Q0dcomcnfg.exe 启动 DCOM 配置工具51Testing软件测试网[Jd^s)ex

Q aO4r9B0^)N051Testing软件测试网#[0oM4E$Z,D H)F
计算页面性能的公式
$@`{2v Y`0以下公式通过测量每个请求所需的处理器周期数来量化 Web 应用程序的性能。该公式用所消耗的周期数除以所处理的请求数。51Testing软件测试网%@4B2AJ v1x.r&N{d1l

51Testing软件测试网 ?Z;O#do ^+E

(sum of processor speed x processor use)51Testing软件测试网\1Q8H7B.?1L'@D
________________________________________  = cost, in cycles/request (or Hz/rps)
YA4O9g$G?:`0     number of requests per second51Testing软件测试网3a$b@y _ y(g#N
例如,在应力测试中,ASP 页面的最大容量可达每秒 800 个请求,同时 Web 服务器的处理器使用率为 85%。如果 Web 服务器的处理器频率为 700 MHz(每秒 700,000,000 周期),可以使用以下公式来计算页面的成本:

"|AY4Yc^$z_0

uZ'lv&M0((4 x 700 000 000 cycles/s) x 0.85) 51Testing软件测试网~!yXu0B W5l~e
___________________________________ = 2 975 000 cycles/request51Testing软件测试网,as*Svw{7er*wG
         800 requests/s51Testing软件测试网h%M.y Wd,\)w_
计算页面性能的 VBScript 代码
[q"r_'y B6uX+S-r0使用以下 VBScript 函数计算成本:

L6hi0Zs G2WOxb0 51Testing软件测试网 W6bq Oe

 
!me]&@i0'''''''''''''''''''''''''''''''''''''''''''''''''''''''
:S^+RMQv0' Function to return the cost of a page, based on 51Testing软件测试网Q-QY FJ#aPyYn
' stress test values and Web server/cluster hardware.
B,{/`N7nG\gah!JM0'51Testing软件测试网Ca}5u'j o
' Returns: page cost, in millions of cycles per request51Testing软件测试网B[\I.R#Z l
'
Z Zu`0e`N0Function GetPageCost(iSumOfProcessorSpeeds, _
$sB%kr'T jn#I0                  fAverageProcessorUse, iAverageRPS)51Testing软件测试网9q#o(Uu wT
   Dim iSpentCyclesPerSecond

Wnq.s%v/H!~!m1W0 51Testing软件测试网#Z`Op(d ye4I\;f

   ' calculate the number of cycles used over the testing period51Testing软件测试网T4B(]Y0g5UiP|
   iSpentCyclesPerSecond = iSumOfProcessorSpeeds _ 51Testing软件测试网'T6?5|+g @h5Bi1[ ~
                              * fAverageProcessorUse

"r;Y-}juXR;`0 51Testing软件测试网"@HEqw o

   ' calculate the amount of work performed by the Web server
+| w1d"V ?1@5|;zx4Rq0   If (iAverageRPS > 0) Then51Testing软件测试网vb+Dp9K I
      GetPageCost = iSpentCyclesPerSecond / iAverageRPS
l7n L-_ [)OU(\-IE0   Else51Testing软件测试网#QjW:JlT
      GetPageCost = 051Testing软件测试网,P,U+Sb4p2x!H Ut
   End If
K5V.VQuTH#b*U0End Function
#r9Gb3^ ~C0 51Testing软件测试网)|Z"^ S}!L!q
使用页面成本的示例
5SNGB9|ZfWA7\zs0了解页面成本有许多用途。

ON v ^$Es0

-Q3Gi*}*BW$M0最显而易见的用途是比较两个不同页面的性能,或者比较同一页面在调整前后的成本。

nNSK)U X0 51Testing软件测试网 @1dMb%|SY

特别是当测试对站点中的所有页面进行请求时,可以通过成本初步估计是否需要随着要处理的通信量的增加、CPU 使用率的更改(或者同时处理两者)添加附加硬件。 51Testing软件测试网g4A*q e5e

51Testing软件测试网`E3P2O7cZ#O;Iy3t

在前面的示例中,需要多大的处理器速度才能保证处理两倍的站点通信量,同时使处理器的使用率保持在 40% 左右,以便可以轻松处理至少达到 3200 rp 的临时负载增长?51Testing软件测试网:y9E L#J8pk c&D,Y

51Testing软件测试网WL*Oe1r$c0L+t$QNd

以下计算表明需要的处理器速度大约为 11900 MHz:

j'I#wmfV,[+R J0

O2[[ qW!@F`0                            page cost x target RPS
j$[u)xkQ+c1a ?0estimated processor speed = ______________________51Testing软件测试网Ry[Yh-D3TC'GZ
                                 processor use

7|1fS`VD{ w0 51Testing软件测试网|`z/K3FK&f.J

                            2 975 000 cycles/request x 1600 requests/s51Testing软件测试网h2exXn(c2J
estimated processor speed = __________________________________________51Testing软件测试网t;r#` UJLu.T
                                                0.40

m.Gq-x7tLafz0 51Testing软件测试网;`QtoY9?_)R j

estimated processor speed =  11 900 000 000 cycles/s

6|/M/ht@0b0

2Ru$Yb#C-C0number of 700 MHz processors needed = 11 900 MHz / 700 MHz = 1751Testing软件测试网 P l0B T%@ |R7G
新的性能目标要求 Web 服务器群集中有大约 17 个处理器,而原来只需 4 个。再次强调,这些估计仅当处理器速度是限制 Web 应用程序性能的因素时才有意义。51Testing软件测试网^-L3v$?%Z8G

L9{3{5u3nC"S HknbV)Fy0 

6i/d4`9@)z ^i#P `0
Q;b&O5Mh j051Testing软件测试网g R)d V8CM+iW
测试者家园 2006-07-13 13:31 发表评论
51Testing软件测试网Tllb-d%H;?-mk
51Testing软件测试网H"\w8H yYi){0A2Tg
Link URL: http://www.cnblogs.com/tester2test/archive/2006/07/13/449809.html

TAG:

 

评分:0

我来说两句

日历

« 2024-03-12  
     12
3456789
10111213141516
17181920212223
24252627282930
31      

数据统计

  • 访问量: 269120
  • 日志数: 689
  • 建立时间: 2006-12-05
  • 更新时间: 2009-04-15

RSS订阅

Open Toolbar