<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic An M/M/n queuing model simulation in Intel® Moderncode for Parallel Architectures</title>
    <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/An-M-M-n-queuing-model-simulation/m-p/943660#M5085</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;An M/M/n queuing model simulation with Object Pascal and my Thread Pool Engine - version 1.02&lt;/P&gt;

&lt;P&gt;You can download it from:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://pages.videotron.com/aminer/" target="_blank"&gt;http://pages.videotron.com/aminer/&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Read more bellow...&lt;/P&gt;

&lt;P&gt;Author: Amine Moulay Ramdane&lt;/P&gt;

&lt;P&gt;Description:&lt;/P&gt;

&lt;P&gt;It's harder and sometimes impossible to get analytical results about waiting times and queue length for general interarrival and service distributions; so, it's important to be able to estimate these quantities by observing the results of simulation.&lt;/P&gt;

&lt;P&gt;It's very easy in Object Pascal to simulate a sequence of arrival times with a given interarrival distribution.&lt;/P&gt;

&lt;P&gt;Look at the examples MM1.pas( M/M/1 queuing model) and MMn.pas(M/M/n - n: number of servers -) inside the zip file:&lt;/P&gt;

&lt;P&gt;---------------------------&lt;/P&gt;

&lt;P&gt;InterArrivals:=TExponentialDistribution.Create(420623,1.0/3.0);&lt;/P&gt;

&lt;P&gt;ServiceTimes:=TExponentialDistribution.Create(220623,1.0/4.0);&lt;/P&gt;

&lt;P&gt;currtime:=0.0;&lt;/P&gt;

&lt;P&gt;for i:=1 to simnumber&lt;/P&gt;

&lt;P&gt;do&lt;/P&gt;

&lt;P&gt;begin&lt;/P&gt;

&lt;P&gt;obj:=TJob.create;&lt;/P&gt;

&lt;P&gt;obj.simnumber:=simnumber;&lt;/P&gt;

&lt;P&gt;obj.number:=i;&lt;/P&gt;

&lt;P&gt;currtime:=currtime+InterArrivals.Sample;&lt;/P&gt;

&lt;P&gt;obj.ArrivalTime:=currtime;&lt;/P&gt;

&lt;P&gt;obj.Servicetime:= ServiceTimes.sample;&lt;/P&gt;

&lt;P&gt;TP.execute(myobj.myproc1,pointer(obj),NORMAL_PRIORITY);&lt;/P&gt;

&lt;P&gt;end;&lt;/P&gt;

&lt;P&gt;-------------------------------------------&lt;/P&gt;

&lt;P&gt;Here we have the InterArrivals object and ServiceTimes object and we are calling InterArrivals.Sample to get our samples from the Exponential Distribution.&lt;/P&gt;

&lt;P&gt;After that we are calling myobj.myproc1 to simulate our M/M/1 queuing model...&lt;/P&gt;

&lt;P&gt;If you look at MM1.pas , you will see that the arrival rate is: 3 and the service rate is 4 , so, this will give us a theoretical value of 1/(4-3) = 1 for one server, and the Object Pascal simulation gave me 1.02 for one server.&lt;/P&gt;

&lt;P&gt;Now i want to talk about themathematical modeling of&lt;BR /&gt;
	queuing networks , if you have noticed in a webserver&lt;BR /&gt;
	that uses a distributed database&amp;nbsp; , the database&lt;BR /&gt;
	have to be modeled as a queuing system with an&lt;BR /&gt;
	hyperexponential service, but this will complicate the&lt;BR /&gt;
	mathematical modeling of the&amp;nbsp; webserver since the&lt;BR /&gt;
	database&amp;nbsp; have to be modeled as an M/G/1 queuing system,&lt;BR /&gt;
	so we have to simplify the mathematical modeling , so if&lt;BR /&gt;
	for exemple the database's write transactions takes in average&lt;BR /&gt;
	much more time than a database's read transaction so we have&lt;BR /&gt;
	to choose the worst case scenario , that means we have to choose&lt;BR /&gt;
	the rate of the database's write transactions as the rate&lt;BR /&gt;
	of the arrival to the&amp;nbsp; queuing system of the database&amp;nbsp; so&lt;BR /&gt;
	that&amp;nbsp; the database can be modeled as an M/M/1 queuing system&lt;BR /&gt;
	&amp;nbsp;(M: means markovian), so that the webserver can finally be&lt;BR /&gt;
	modeled as two M/M/1&amp;nbsp; queuing system in series, one for&lt;BR /&gt;
	the database and one for the internet network.&lt;/P&gt;

&lt;P&gt;But there is still a problem, if we want to also resolve the&lt;BR /&gt;
	worst case scenario when for exemple thousands of custumers&lt;BR /&gt;
	arrive at the same time to the webserver.. so the webserver&lt;BR /&gt;
	have to be modeled taking into acount this worst case scenario...&lt;/P&gt;

&lt;P&gt;Here is the matematical modeling of an M/M/1 queuing system:&lt;/P&gt;

&lt;P&gt;We already know that to satisfy a Poisson process we must&lt;BR /&gt;
	have that N(t1)- N(t0), N(t2)- N(t1) etc. must be independant&lt;BR /&gt;
	that means the counting increments must be independant.&lt;/P&gt;

&lt;P&gt;We have the following relation between the Poisson law&lt;BR /&gt;
	and Exponential law:&lt;/P&gt;

&lt;P&gt;the expected value E(X exponential) = 1 / E(X poisson)&lt;/P&gt;

&lt;P&gt;so if the arrival is poissonian then the interarrivals are&lt;BR /&gt;
	exponential..&lt;/P&gt;

&lt;P&gt;Now i will calculate the expected mean waiting time and&lt;BR /&gt;
	mean number of custumers in the queuing system:&lt;/P&gt;

&lt;P&gt;The Little law says that the waiting time in the queuing system:&lt;/P&gt;

&lt;P&gt;Ws = Ls/lambda&lt;/P&gt;

&lt;P&gt;And the waiting time in the queue of the queuing system is:&lt;/P&gt;

&lt;P&gt;Wq = Ws - 1/Mu&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;nbsp; Ls/lambda - 1/Mu&lt;/P&gt;

&lt;P&gt;And the Little law gives us the expected mean number of custumers in the&lt;BR /&gt;
	queue:&lt;/P&gt;

&lt;P&gt;Lq = Wq*lambda =&amp;nbsp; Ls - Phi&amp;nbsp; et Phi = lamda/Mu&lt;/P&gt;

&lt;P&gt;That implies:&lt;/P&gt;

&lt;P&gt;Ls - Lq = Phi&lt;/P&gt;

&lt;P&gt;&lt;BR /&gt;
	When the system is in a stationary state , the balance equations gives:&lt;/P&gt;

&lt;P&gt;State&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rate in = rate out&lt;/P&gt;

&lt;P&gt;state 0:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Mu * P1 = lambda*P0&lt;BR /&gt;
	state 1:&amp;nbsp; lambda*P0 + Mu*P2 = lambda*P1 + Mu*P1&lt;BR /&gt;
	state 2:&amp;nbsp; lambda*P1 + Mu*P3 = lambda*P2 + Mu*P2&lt;BR /&gt;
	...&lt;BR /&gt;
	state n:&amp;nbsp; lambda*Pn-1 + Mu*Pn+1 = lambda*Pn + Mu*Pn&lt;/P&gt;

&lt;P&gt;&lt;BR /&gt;
	And that gives us the following balance equations:&lt;/P&gt;

&lt;P&gt;lambda * P0 = Mu*P1&amp;nbsp;&amp;nbsp; &amp;lt;=&amp;gt;&amp;nbsp; P1 = (lambda/Mu)*P0&lt;/P&gt;

&lt;P&gt;lambda * P1 = Mu*P2&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;=&amp;gt;&amp;nbsp; P1 = (lambda/Mu)^2*P0&lt;/P&gt;

&lt;P&gt;lambda * P2 = Mu*P3&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;=&amp;gt;&amp;nbsp; P1 = (lambda/Mu)^3*P0&lt;/P&gt;

&lt;P&gt;...&lt;/P&gt;

&lt;P&gt;lambda * Pn-1 = Mu*Pn&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;=&amp;gt;&amp;nbsp; P_n = (lambda/Mu)^k*P0&amp;nbsp; [1]&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Note: P0 means the probality of having zero custumer in the queuing system.&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; and ^ means power.&lt;/P&gt;

&lt;P&gt;&lt;BR /&gt;
	And we have also that:&lt;/P&gt;

&lt;P&gt;Sum(n=0 -&amp;gt; infinite) (Pn) = 1 ,&amp;nbsp; that means the sum of probabilities equal 1&lt;/P&gt;

&lt;P&gt;And&amp;nbsp; [1] gives us:&lt;/P&gt;

&lt;P&gt;Sum(n=0 -&amp;gt; infinite) (Phi^n*P0) =1&lt;/P&gt;

&lt;P&gt;And by resolving the sum of a geometric series that gives us:&lt;/P&gt;

&lt;P&gt;P0 * 1/(1-Phi) = 1 =&amp;gt; P0 = 1 - Phi&amp;nbsp; and Phi &amp;lt; 1&lt;/P&gt;

&lt;P&gt;And [1] gives us:&lt;/P&gt;

&lt;P&gt;Pn = (1-Phi) * Phi^n&lt;/P&gt;

&lt;P&gt;And we have the mean expected number iof custumer in the queuing system is:&lt;/P&gt;

&lt;P&gt;Ls = Sum(n=0 -&amp;gt; infinite) (n*Pn)&lt;/P&gt;

&lt;P&gt;That implies:&lt;/P&gt;

&lt;P&gt;Ls = Sum(n=0 -&amp;gt; infinite) (n*(1-Phi)*Phi^n) = Phi/1-Phi&amp;nbsp;&amp;nbsp; and&amp;nbsp; Phi&amp;lt;1&lt;/P&gt;

&lt;P&gt;and we have the mean expected number of custumers in the queue of the queing system is :&lt;/P&gt;

&lt;P&gt;Lq = Ls -Phi = Phi^2/ (1-Phi)&amp;nbsp; et Phi&amp;lt;1&lt;/P&gt;

&lt;P&gt;&lt;BR /&gt;
	Little law gives us the mean waiting time in the system and in the queue:&lt;/P&gt;

&lt;P&gt;Ws = 1/lambda * Phi/(1-Phi)&amp;nbsp; and Phi&amp;lt;1&lt;/P&gt;

&lt;P&gt;et&lt;/P&gt;

&lt;P&gt;Wq= 1/lambda * Phi^2/(1-Phi)&amp;nbsp; and Phi&amp;lt;1&lt;/P&gt;

&lt;P&gt;&lt;BR /&gt;
	I have just read the following page, look at the the USL&lt;/P&gt;

&lt;P&gt;(Universal Law of Computational Scalability) of Dr. Gunther,&lt;BR /&gt;
	he wrote this: (See: &lt;A href="http://en.wikipedia.org/wiki/Neil_J._Gunther" target="_blank"&gt;http://en.wikipedia.org/wiki/Neil_J._Gunther&lt;/A&gt; )&lt;/P&gt;

&lt;P&gt;--------------&lt;/P&gt;

&lt;P&gt;The relative capacity C(N) of a computational platform is given by:&lt;/P&gt;

&lt;P&gt;C(N)&amp;nbsp; =&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; N&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ------------------------------------------&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 + α (N - 1) + ß N (N - 1)&lt;/P&gt;

&lt;P&gt;where N represents either the number of physical processors&lt;BR /&gt;
	in the hardware configuration or the number of users driving the&lt;BR /&gt;
	software application. The parameters α and ß represent respectively&lt;BR /&gt;
	the levels of contention (e.g., queueing for shared resources) and&lt;BR /&gt;
	coherency delay (i.e., latency for data to become consistent) in the&lt;BR /&gt;
	system. The ß parameter also quantifies the retrograde throughput&lt;BR /&gt;
	seen in many stress tests but not accounted for in either Amdahl's law&lt;BR /&gt;
	or event-based simulations.&lt;/P&gt;

&lt;P&gt;----------&lt;/P&gt;

&lt;P&gt;His website: &lt;A href="http://www.perfdynamics.com/" target="_blank"&gt;http://www.perfdynamics.com/&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;If you read carefully , you will see that Dr. Gunther is using this&lt;BR /&gt;
	model to predict scalability after he simulates a relatively small&lt;BR /&gt;
	number of vusers in LoadRunner ( because of licensing costs, it's&lt;BR /&gt;
	cost-effective)&amp;nbsp; and after that he finds the coefficients of the&lt;BR /&gt;
	2nd-degree polynomial (quadratic equation) and then transform&lt;BR /&gt;
	those coefficients back to the USL parameters using the α = b - a&lt;BR /&gt;
	and ß = a.&lt;/P&gt;

&lt;P&gt;And then he is extrapolating with the USL model to higher loads&lt;BR /&gt;
	to predict scalability.&lt;/P&gt;

&lt;P&gt;He is also applying the model to webservers&amp;nbsp; with heterogeneous&lt;BR /&gt;
	workloads. like in the following page:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://perfdynamics.blogspot.com/2009/04/assessing-usl-scalability-wi" target="_blank"&gt;http://perfdynamics.blogspot.com/2009/04/assessing-usl-scalability-wi&lt;/A&gt;.&lt;/P&gt;

&lt;P&gt;Now&amp;nbsp; my question follows:&lt;/P&gt;

&lt;P&gt;Suppose we have obtained a small number of&amp;nbsp; measured load-points&lt;BR /&gt;
	with Loadrunner or others tools, and we calculated the USL equation&lt;BR /&gt;
	to predict scalability of a webserver , how the USL model can predict&lt;BR /&gt;
	if the scalability/performance is limited by the network bandwidth&lt;BR /&gt;
	and not the server ?&amp;nbsp; I think USL can not predict this.&lt;/P&gt;

&lt;P&gt;When we are modeling webservers , we&amp;nbsp; have to include&lt;BR /&gt;
	the network node in our network queuig model (that includes&lt;BR /&gt;
	the computer server queue) , and since the service in the&lt;BR /&gt;
	computer server is comprised of multiple services (when we&lt;BR /&gt;
	are using htmls , databases etc.) the network queue will not&lt;BR /&gt;
	be markovian in its service , and we have to model the network&lt;BR /&gt;
	queue as an M/G/1 and this will complicate the mathematical&lt;BR /&gt;
	analytical modeling...&lt;/P&gt;

&lt;P&gt;So,&amp;nbsp; i think the best way is to use a webserver stress tool&lt;BR /&gt;
	like&amp;nbsp; &lt;A href="http://fwptt.sourceforge.net/" target="_blank"&gt;http://fwptt.sourceforge.net/&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;You can even test the webserver&amp;nbsp; with an heterogeneous&lt;BR /&gt;
	workloads by starting multiple fwtpp processes, and&lt;BR /&gt;
	you should increase the number of threads to 5 and after&lt;BR /&gt;
	that to 10 threads, 15 ... and so on until the webserver&lt;BR /&gt;
	applications stops responding propperly(and this will inform&lt;BR /&gt;
	on the maximum number of users that you can have in the same time...)&lt;BR /&gt;
	and as you are stress testing you can even see (by testing/measuring&lt;BR /&gt;
	it) if the network bandwidth is not the bottleneck... and this can&lt;BR /&gt;
	not be done by the USL model.&lt;/P&gt;

&lt;P&gt;We already know that to satisfy a Poisson process we must&lt;BR /&gt;
	have that N(t1)- N(t0), N(t2)- N(t1) etc. must be independant&lt;BR /&gt;
	that means the counting increments must be independant.&lt;/P&gt;

&lt;P&gt;We have the following relation between the Poisson law&lt;BR /&gt;
	and Exponential law:&lt;/P&gt;

&lt;P&gt;the expected value E(X exponential) = 1 / E(X poisson)&lt;/P&gt;

&lt;P&gt;and if the arrival is poissonian then the interarrivals are&lt;BR /&gt;
	exponential..&lt;/P&gt;

&lt;P&gt;Now what about a webserver ?&lt;/P&gt;

&lt;P&gt;I have read the following paper:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.google.com/viewer?a=v&amp;amp;q=cache:JFYCp_dSPP4J:citeseerx.ist" target="_blank"&gt;http://docs.google.com/viewer?a=v&amp;amp;q=cache:JFYCp_dSPP4J:citeseerx.ist&lt;/A&gt;.&lt;/P&gt;

&lt;P&gt;And it says that a simple model with M/M/1/k with FCFS discipline&lt;BR /&gt;
	can predict webserver performance quite well..&lt;/P&gt;

&lt;P&gt;Hence,&amp;nbsp; i think we can model our webserver over internet&lt;BR /&gt;
	with 3 queues connected as a Jackson Network like this&lt;/P&gt;

&lt;P&gt;A -&amp;gt;&amp;nbsp; M/M/1 Server Queue -&amp;gt; M/M/1 Network queue -&amp;gt; M/M/1 Client -&amp;gt; A&lt;/P&gt;

&lt;P&gt;A: is the arrival rate&lt;/P&gt;

&lt;P&gt;and we have the following:&lt;/P&gt;

&lt;P&gt;Ni: number of jobs in each queue&lt;BR /&gt;
	Ui: utilization of each&amp;nbsp; queue&lt;/P&gt;

&lt;P&gt;Ni =&amp;nbsp; Ui / (1-Ui)&lt;/P&gt;

&lt;P&gt;Adding all the Ni in each individual queue will give the&lt;BR /&gt;
	average number of jobs in&amp;nbsp; the entire queuing network.&lt;/P&gt;

&lt;P&gt;After that we apply the Little formula:&lt;/P&gt;

&lt;P&gt;A: network arrival rate&lt;BR /&gt;
	T: average response time&lt;/P&gt;

&lt;P&gt;N = A*T&amp;nbsp; =&amp;gt; T = N / A&lt;/P&gt;

&lt;P&gt;And after that from the mathematical analytical equation&lt;BR /&gt;
	we can simulate the jackson queuing network that model our&lt;BR /&gt;
	webservers...&lt;/P&gt;

&lt;P&gt;Now there is still an important question that i have:&lt;/P&gt;

&lt;P&gt;Our analytical jackson network model can give us insight&lt;BR /&gt;
	on the webservers behavivior.. but the difficulty&amp;nbsp; that i find in&lt;BR /&gt;
	practice is that: suppose we have found the right parametters&lt;BR /&gt;
	that we want to choose, like for example the service rate of&lt;BR /&gt;
	the M/M/1 Server Queue , how , from this service rate, can&lt;BR /&gt;
	we buy the right computer that satisfies the service rate&lt;BR /&gt;
	that we want ?&lt;/P&gt;

&lt;P&gt;We say in OR that:&lt;/P&gt;

&lt;P&gt;"Understanding the behavior of a system is what Queueing Theory&lt;BR /&gt;
	and Little’s Law is all about. But, managing a Queue requires not&lt;BR /&gt;
	just understanding the behavior of a system, but also in-depth&lt;BR /&gt;
	knowledge of how to improve a system - improving both aspects&lt;BR /&gt;
	of Queueing will mean a better, more efficient and cost-effective&lt;BR /&gt;
	system and, more importantly, a much better customer experience."&lt;/P&gt;

&lt;P&gt;I wrote before that:&lt;/P&gt;

&lt;P&gt;---&lt;/P&gt;

&lt;P&gt;"It says that a simple model with M/M/1/k with FCFS discipline&lt;BR /&gt;
	can predict webserver performance quite well..&lt;BR /&gt;
	Hence,&amp;nbsp; i think we can model our webserver over internet&lt;BR /&gt;
	with 3 queues connected as a Jackson Network like this&lt;BR /&gt;
	A -&amp;gt; M/M/1 Server Queue -&amp;gt; M/M/1 Network queue -&amp;gt; M/M/1 Client -&amp;gt; A&lt;/P&gt;

&lt;P&gt;A: the arrival rate&lt;BR /&gt;
	and we have the following:&lt;BR /&gt;
	Ni: number of jobs in each queue&lt;BR /&gt;
	Ui: utilization of each&amp;nbsp; queue&lt;/P&gt;

&lt;P&gt;Ni =&amp;nbsp; Ui / (1-Ui)&lt;/P&gt;

&lt;P&gt;Adding all the Ni in each individual queue will give the&lt;BR /&gt;
	average number of jobs in&amp;nbsp; the entire queuing network.&lt;BR /&gt;
	After that we apply the Little formula:&lt;/P&gt;

&lt;P&gt;A: network arrival rate&lt;BR /&gt;
	T: average response time&lt;/P&gt;

&lt;P&gt;N = A*T&amp;nbsp; =&amp;gt; T = N / A&lt;/P&gt;

&lt;P&gt;And after that from the mathematical analytical equation&lt;BR /&gt;
	we can simulate the jackson queuing"&lt;/P&gt;

&lt;P&gt;--&lt;/P&gt;

&lt;P&gt;As you have noticed , this mathematical model of&lt;BR /&gt;
	this jackson network does in fact take into account&lt;BR /&gt;
	the&amp;nbsp; M/M/1 Network queue node , the USL model can not&lt;BR /&gt;
	do this... and with this performance data from the mathematical&lt;BR /&gt;
	analytical model simulation&amp;nbsp; we can for example validate&lt;BR /&gt;
	the performance data of the fwptt stress webserver simulation..&lt;/P&gt;

&lt;P&gt;But you have to take into account worst cases and the&lt;BR /&gt;
	peak traffic loads...&lt;/P&gt;

&lt;P&gt;Let for example we have a a webserver hosting html pages&lt;BR /&gt;
	and it is receiving 1000000 HTTP operations&lt;BR /&gt;
	per day with an average file&amp;nbsp; size of 10 KB.&lt;/P&gt;

&lt;P&gt;What would be the network bandwidth required for this website&lt;BR /&gt;
	considering peak traffic if the peak traffic load from past&lt;BR /&gt;
	observations was four times greater than average loads?&lt;/P&gt;

&lt;P&gt;Required bandwidth is solved by the following equation:&lt;/P&gt;

&lt;P&gt;HTTP op/sec x average file size or&lt;/P&gt;

&lt;P&gt;1000000 HTTP ops per day =1000000/24 = 41,667 op/hour =&lt;BR /&gt;
	41,667/3600= 11.6 HTTP ops/sec&lt;/P&gt;

&lt;P&gt;The needed bandwidth is&lt;/P&gt;

&lt;P&gt;11.6 HTTP ops/sec X 10 KB/HTTP op = 116 KB/sec = 928 Kbps.&lt;/P&gt;

&lt;P&gt;If we assume a protocol overhead of 20% then the actual throughput&lt;BR /&gt;
	required is 928 Kbps X 1.2 = 1,114 Kbps.&lt;/P&gt;

&lt;P&gt;However if peak loads, as i&amp;nbsp; said before, is as much as&lt;BR /&gt;
	4 times greater, the bandwidth required to handle spikes&lt;BR /&gt;
	would be 4 X 1,114 Kbps = 4.456 Mbps.&lt;/P&gt;

&lt;P&gt;So you have to think also about the cost of this line...&lt;/P&gt;

&lt;P&gt;I will add the following:&lt;/P&gt;

&lt;P&gt;As you have noticed i said that:&lt;/P&gt;

&lt;P&gt;"As you have noticed , this mathematical model of&lt;BR /&gt;
	this jackson network does in fact take into account&lt;BR /&gt;
	the&amp;nbsp; M/M/1 Network queue node , the USL model can not&lt;BR /&gt;
	do this... and with this performance data from the mathematical&lt;BR /&gt;
	analytical model simulation&amp;nbsp; we can for example validate&lt;BR /&gt;
	the performance data of the fwptt stress webserver simulation.."&lt;/P&gt;

&lt;P&gt;and i said that:&lt;/P&gt;

&lt;P&gt;"Hence,&amp;nbsp; i think we can model our webserver over internet&lt;BR /&gt;
	with 3 queues connected as a Jackson Network like this&lt;BR /&gt;
	An M/M/1 Server Queue -&amp;gt; M/M/1 Network queue -&amp;gt; M/M/1 Client queue"&lt;/P&gt;

&lt;P&gt;And of course on Capacity Planning for Enterprise Datacenters&lt;BR /&gt;
	and Websites , you can mirror many computer servers and load&lt;BR /&gt;
	balance between them with a software... to make the system much&lt;BR /&gt;
	FASTER, and this will be modeled as a jackson network like this:&lt;/P&gt;

&lt;P&gt;A -&amp;gt; M/M/n Server Queue -&amp;gt; M/M/1 Network queue -&amp;gt; M/M/1 Client -&amp;gt; A&lt;/P&gt;

&lt;P&gt;A: the arrival rate to the system&lt;/P&gt;

&lt;P&gt;But there is still an important thing , as i have showed before&lt;BR /&gt;
	on my calculations:&lt;/P&gt;

&lt;P&gt;"However if peak loads, as i said before, is as much as&lt;BR /&gt;
	4 times greater, the bandwidth required to handle spikes&lt;BR /&gt;
	it would be 4 X 1,114 Kbps = 4.456 Mbps.&lt;/P&gt;

&lt;P&gt;So you have to think also about the cost of this line..."&lt;/P&gt;

&lt;P&gt;I think that you have also to take into account the knee utilisation&lt;BR /&gt;
	of your M/M/n Servers Queues, if for example the number of computer&lt;BR /&gt;
	servers is 8 and the Knee is 74%&amp;nbsp; that means that in our previous&lt;BR /&gt;
	example the bandwidth must equal to:&lt;/P&gt;

&lt;P&gt;74% X 4.456 Mbps =&amp;nbsp; 3.297 Mbps.&lt;/P&gt;

&lt;P&gt;Cause as you know, above this Knee of 74% for 8 servers&lt;BR /&gt;
	the curve of the waiting time does grow quickly ..&lt;/P&gt;

&lt;P&gt;And we have to take into account the cost of the line ...&lt;/P&gt;

&lt;P&gt;Let us take another example:&lt;/P&gt;

&lt;P&gt;In the network node of the Jackson network, there is three&lt;BR /&gt;
	main parameters that are responsable for its performance:&lt;BR /&gt;
	latency, bandwidth and utilization.&lt;/P&gt;

&lt;P&gt;Now, if for example you take a look at my provider&lt;/P&gt;

&lt;P&gt;&lt;A href="http://www.videotron.com/service/internet-services/internet-access/hi" target="_blank"&gt;http://www.videotron.com/service/internet-services/internet-access/hi&lt;/A&gt;.&lt;/P&gt;

&lt;P&gt;My upload network speed is clearly 820 Kbs =&amp;gt; 102.5 Kbytes/sec&lt;/P&gt;

&lt;P&gt;Hence, if the average file size on my web site is for&lt;BR /&gt;
	example 25 Kbyte and the protocol overhead is 20%, that&lt;BR /&gt;
	means that the file size will be in average:&lt;/P&gt;

&lt;P&gt;&amp;nbsp;25 * 120% =&amp;nbsp; 30 Kbyte&lt;/P&gt;

&lt;P&gt;And if the Knee of the M/M/1 queuing node in our Jackson network&lt;BR /&gt;
	is 50%, then the bandwidth available will be reduced to&lt;BR /&gt;
	102.5 Kbytes/sec * 50% = 51.25 Kbytes/sec&lt;/P&gt;

&lt;P&gt;If the download speed of the client is for example 7.5 Mbps,&lt;BR /&gt;
	that means that the file can be retrieved in no more than&lt;BR /&gt;
	30 / 51.25 = 0.585 second = 585 milliseconds.&lt;/P&gt;

&lt;P&gt;But if we assume for example that a typical web visitor&lt;BR /&gt;
	to my web site is spending 585 milliseconds retrieving the&lt;BR /&gt;
	page and 60 seconds reading the HTML page THEN each client&lt;BR /&gt;
	on average only requires:&lt;/P&gt;

&lt;P&gt;0.585 / (0.585 + 60) = 9.6% of the bandwidth that is allocated to&lt;BR /&gt;
	it..&lt;/P&gt;

&lt;P&gt;but in practice i think we have to consider the worst case&lt;BR /&gt;
	scenarios..&lt;/P&gt;

&lt;P&gt;So, since we can support a constraint of no more than 5 seconds&lt;BR /&gt;
	in the T (average response time), that means:&lt;/P&gt;

&lt;P&gt;585 ms * X = 5000 milliseconds =&amp;gt; X =&amp;nbsp; 8.54&lt;/P&gt;

&lt;P&gt;Hence, in worst case , my network node can not support more&lt;BR /&gt;
	than 8.54 users in the same time...&lt;/P&gt;

&lt;P&gt;So, on *average* my network node can support:&lt;/P&gt;

&lt;P&gt;(8.54&amp;nbsp; * 86400) / 5 =&amp;nbsp; 147571 users per day&lt;/P&gt;

&lt;P&gt;I wrote before that:&lt;/P&gt;

&lt;P&gt;--&lt;BR /&gt;
	And of course on Capacity Planning for Enterprise Datacenters&lt;BR /&gt;
	and Websites , you can mirror many computer servers and load&lt;BR /&gt;
	balance between them with a software... to make the system much&lt;BR /&gt;
	FASTER, and this will be modeled as a Jackson network like this:&lt;/P&gt;

&lt;P&gt;(1)&lt;/P&gt;

&lt;P&gt;A -&amp;gt; M/M/n Server Queue -&amp;gt; M/M/1 Network queue -&amp;gt;&lt;BR /&gt;
	-&amp;gt; M/M/1 Client queue -&amp;gt; A&lt;/P&gt;

&lt;P&gt;A: the arrival rate to the system"&lt;/P&gt;

&lt;P&gt;--&lt;/P&gt;

&lt;P&gt;We know also from an operational law of queuing theory that:&lt;/P&gt;

&lt;P&gt;(2) the rate of job leaving any stable node must equal&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; its arrival rate.&lt;/P&gt;

&lt;P&gt;(2) is from the Equivalence property.&lt;/P&gt;

&lt;P&gt;Equivalence property: Assume that a service facility with&lt;BR /&gt;
	s servers and infinite queue has a Poisson input with&lt;BR /&gt;
	parameter lambda and the same exponential service-time&lt;BR /&gt;
	distribution with parameter Mu for each server (the M/M/s model),&lt;BR /&gt;
	where s * Mu &amp;gt; lambda. Then the steady-state output of&lt;BR /&gt;
	this service facility is also poisson process with parameter&lt;BR /&gt;
	lambda.&lt;/P&gt;

&lt;P&gt;We know for an M/M/c queue that:&lt;/P&gt;

&lt;P&gt;Note: try to add servers with almost the same hardware&lt;BR /&gt;
	configuration...&lt;/P&gt;

&lt;P&gt;C(c, U) = Erlang formula = P(c) / (1 - Utilization)&lt;/P&gt;

&lt;P&gt;note:&amp;nbsp; c the number of servers..&lt;/P&gt;

&lt;P&gt;P(c): means the probability that all the servers are busy&lt;/P&gt;

&lt;P&gt;P(0): means the probability that there is no waiting time in the&lt;BR /&gt;
	queue, that means also: AT LEAST one server among the C servers&lt;BR /&gt;
	are not busy...&lt;/P&gt;

&lt;P&gt;The average waiting time in the 'queue' =&lt;BR /&gt;
	C(c,U) / (service rate x c x (1 - Utilization))&amp;nbsp;&amp;nbsp; (3)&lt;/P&gt;

&lt;P&gt;It's approximatly equal to:&lt;/P&gt;

&lt;P&gt;Utilization^C/(service rate x (1 - Utilization^C)&lt;/P&gt;

&lt;P&gt;Note: ^ means power&lt;/P&gt;

&lt;P&gt;This approximation is exact for the M/M/1 and M/M/2 models,&lt;BR /&gt;
	but 'slightly' lower than the result in (3) if c &amp;gt; 2&lt;/P&gt;

&lt;P&gt;and&lt;/P&gt;

&lt;P&gt;Utilization = Density of circulation / C (number of servers)&lt;/P&gt;

&lt;P&gt;Note: ^ means power()&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; and C means the number of servers&lt;/P&gt;

&lt;P&gt;Response time = The average waiting time in the 'queue' +&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (1 / service rate)&lt;/P&gt;

&lt;P&gt;average numbers of users in the system = service rate x response time&lt;BR /&gt;
	average number of users in queue = service rate x average waiting&lt;BR /&gt;
	time&lt;BR /&gt;
	in the 'queue'&lt;/P&gt;

&lt;P&gt;Now as i said before:&lt;/P&gt;

&lt;P&gt;--&lt;BR /&gt;
	So the equation for&lt;/P&gt;

&lt;P&gt;Ni: number of jobs in each queue&lt;BR /&gt;
	Ui: utilization of each&amp;nbsp; queue&lt;/P&gt;

&lt;P&gt;Ni =&amp;nbsp; Ui / (1-Ui)&lt;/P&gt;

&lt;P&gt;Adding all the Ni in each individual queue will give the&lt;BR /&gt;
	average number of jobs in&amp;nbsp; the entire queuing network.&lt;/P&gt;

&lt;P&gt;After that we apply the Little formula:&lt;/P&gt;

&lt;P&gt;A: network arrival rate&lt;BR /&gt;
	T: average response time&lt;/P&gt;

&lt;P&gt;N = A*T&amp;nbsp; =&amp;gt; T = N / A&lt;/P&gt;

&lt;P&gt;And after that from the mathematical analytical equation&lt;BR /&gt;
	we can simulate the jackson queuing network that model our&lt;BR /&gt;
	webservers...&lt;/P&gt;

&lt;P&gt;---&lt;/P&gt;

&lt;P&gt;If we try to calculate the Ni =&amp;nbsp; Ui / (1-Ui) in&lt;BR /&gt;
	the Jackson network, and from the operational law (2) above&lt;BR /&gt;
	this will give us:&lt;/P&gt;

&lt;P&gt;Ns for the M/M/n Server queue is:&lt;/P&gt;

&lt;P&gt;(DC / n) / (1&amp;nbsp; - (DC/n))&lt;/P&gt;

&lt;P&gt;and DC = Ss / A =&amp;gt; Ns = ((Ss/A)/n) / (1 -((Ss/A)/n))&lt;/P&gt;

&lt;P&gt;Ss: service rate at the queuing server.&lt;BR /&gt;
	A: Arrival rate to the jackson network&lt;/P&gt;

&lt;P&gt;DC: is the Density of circulation&lt;BR /&gt;
	n: number of servers&lt;/P&gt;

&lt;P&gt;And Nn for the M/M/1 Network queue is:&lt;/P&gt;

&lt;P&gt;and Utilization in the M/M/1 network queue = Sn / A&lt;BR /&gt;
	this imply that =&amp;gt; Nn = (Sn/A) / (1 -(Sn/A))&lt;/P&gt;

&lt;P&gt;Nn: number of jobs in the M/M/1 network queue node&lt;BR /&gt;
	Un:&amp;nbsp; Utilization in the network queue node&lt;BR /&gt;
	Sn: service rate at the queuiNg server.&lt;BR /&gt;
	A: Arrival rate to the jackson network&lt;/P&gt;

&lt;P&gt;And Nc for the M/M/1 Client queue node is:&lt;/P&gt;

&lt;P&gt;and Uc=&amp;nbsp; Sc / (F/5)&lt;BR /&gt;
	this imply that =&amp;gt; Nc = (Sc/(F/5)) / (1 -(Sc/(F/5)))&lt;BR /&gt;
	Note: F/5, if for example the rate is one file every 5 seconds.&lt;/P&gt;

&lt;P&gt;Nc: number of jobs in the M/M/1 client queue node&lt;BR /&gt;
	Uc:&amp;nbsp; Utilization in the M/M/1 client queue node&lt;BR /&gt;
	Sc: service rate at the queuiNg server.&lt;BR /&gt;
	A: Arrival rate to the Jackson network&lt;BR /&gt;
	F: Average file size&lt;/P&gt;

&lt;P&gt;Adding all the Ni in each individual queue will&lt;BR /&gt;
	give the average number of jobs in&amp;nbsp; the entire&lt;BR /&gt;
	queuing network that is equal to:&lt;/P&gt;

&lt;P&gt;Ni = Nn + Ns + Nc&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; = (((Ss/A)/n) / (1 -((Ss/A)/n)) + (Sn/A) / (1 -(Sn/A))&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; + (Sc/(F/5)) / (1 -(Sc/(F/5)))&lt;/P&gt;

&lt;P&gt;After that we apply the Little formula:&lt;/P&gt;

&lt;P&gt;A: network arrival rate&lt;BR /&gt;
	T: average response time&lt;/P&gt;

&lt;P&gt;N = A*T&amp;nbsp; =&amp;gt; T = N / A&lt;/P&gt;

&lt;P&gt;this imply that the T(the average response time in the Jackson&lt;BR /&gt;
	network)&lt;BR /&gt;
	is:&lt;/P&gt;

&lt;P&gt;Ni = Nn + Ns + Nc&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; = (((Ss/A)/n) / (1 -((Ss/A)/n)) + (Sn/A) / (1 -(Sn/A))&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; + (Sc/(F/5)) / (1 -(Sc/(F/5)))&lt;/P&gt;

&lt;P&gt;Now finally we have our mathematical analytic equation&lt;BR /&gt;
	and we can begin to simulate our Enteprise webserver&lt;BR /&gt;
	and also validate the performance data with the fwptt stress&lt;BR /&gt;
	webserver simulation tool...&lt;/P&gt;

&lt;P&gt;And don't forget what i have said about USL:&lt;/P&gt;

&lt;P&gt;"Suppose we have obtained a small number of&amp;nbsp; measured&lt;BR /&gt;
	load-points with Loadrunner or others tools, and we&lt;BR /&gt;
	calculated the USL equation to predict scalability of&lt;BR /&gt;
	a webserver , how the USL model can predict if the&lt;BR /&gt;
	scalability/performance is limited by the network bandwidth&lt;BR /&gt;
	and not the server ?&amp;nbsp; I think USL can not predict this."&lt;/P&gt;

&lt;P&gt;Also i wrote about USL that:&lt;/P&gt;

&lt;P&gt;"As you have noticed , this mathematical model of&lt;BR /&gt;
	this jackson network does in fact take into account&lt;BR /&gt;
	the&amp;nbsp; M/M/1 Network queue node , the USL model can not&lt;BR /&gt;
	do this... and with this performance data from the mathematical&lt;BR /&gt;
	analytical model simulation&amp;nbsp; we can for example validate&lt;BR /&gt;
	the performance data of the fwptt stress webserver simulation.."&lt;/P&gt;

&lt;P&gt;If you have noticed i have tried to show also that one&lt;BR /&gt;
	of the principal objectives is to control and manage&lt;BR /&gt;
	the *Quality* of the system or process, i wrote in my&lt;BR /&gt;
	post the following:&lt;/P&gt;

&lt;P&gt;---&lt;/P&gt;

&lt;P&gt;this imply that the T(the average response time in the Jackson&lt;BR /&gt;
	network)&lt;BR /&gt;
	is:&lt;/P&gt;

&lt;P&gt;Ni = Nn + Ns + Nc&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; = (((Ss/A)/n) / (1 -((Ss/A)/n)) + (Sn/A) / (1 -(Sn/A))&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; + (Sc/(F/5)) / (1 -(Sc/(F/5)))&lt;/P&gt;

&lt;P&gt;Now finally we have our mathematical analytic equation&lt;BR /&gt;
	and we can begin to simulate our Enteprise webserver&lt;BR /&gt;
	and also validate the performance data with the fwptt stress&lt;BR /&gt;
	webserver simulation tool...&lt;/P&gt;

&lt;P&gt;---&lt;/P&gt;

&lt;P&gt;So, as you have noticed you can simulate our enterprise&lt;BR /&gt;
	webserver with this mathematical analytical equation and&lt;BR /&gt;
	validate the data collected by fwptt stress webserrer tool&lt;BR /&gt;
	and try to keep T( the average response time of your HTTP requests)&lt;BR /&gt;
	bellow or equal to 5 seconds, and see also if your webserver&lt;BR /&gt;
	is scaling,&amp;nbsp; and we call this also Quality control using OR&lt;BR /&gt;
	(operational research).&lt;/P&gt;

&lt;P&gt;In quality management, quality can also be maintained and&lt;BR /&gt;
	improved through the detection and reduction of process&lt;BR /&gt;
	variation. Where statistical techniques as ANOVA and others&lt;BR /&gt;
	can be used..&lt;/P&gt;

&lt;P&gt;The ANOVA method , for example, analyses the variation in&lt;BR /&gt;
	the data set to discover the amount of variation that can&lt;BR /&gt;
	be attributed to each factor.. etc.&lt;/P&gt;

&lt;P&gt;There is still an important thing..&lt;/P&gt;

&lt;P&gt;As you have noticed, i have finally arrived to the following&lt;BR /&gt;
	mathematical model of our Jackson network that model an Enterprise&lt;BR /&gt;
	website:&lt;/P&gt;

&lt;P&gt;Ni = Nn + Ns + Nc&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; = (((Ss/A)/n) / (1 -((Ss/A)/n)) + (Sn/A) / (1 -(Sn/A))&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; + (Sc/(F/5)) / (1 -(Sc/(F/5)))&lt;/P&gt;

&lt;P&gt;T: is the average response time..&lt;/P&gt;

&lt;P&gt;So read it carefully an you will notice that this mathematical&lt;BR /&gt;
	model also can simulate and predict an intranet website behavior&lt;BR /&gt;
	or an internet website..&lt;/P&gt;

&lt;P&gt;First look at the first factor (((Ss/A)/n) / (1 -((Ss/A)/n))&lt;BR /&gt;
	in our mathematical model,&amp;nbsp; as you have noticed as&lt;BR /&gt;
	n (number of servers) grows this will make the denominator&lt;BR /&gt;
	grow rapidly and this will make (((Ss/A)/n) / (1 -((Ss/A)/n))&lt;BR /&gt;
	smaller, that's good for the response time...&lt;/P&gt;

&lt;P&gt;Now let's look at the other factors in this mathematical&lt;BR /&gt;
	model:&lt;/P&gt;

&lt;P&gt;IF the system is an Intranet, and for example the local&lt;BR /&gt;
	area network Sn is faster than the multiserver, that means:&lt;/P&gt;

&lt;P&gt;We have Sn &amp;gt;&amp;gt; Ss, and that means =&amp;gt; Ss /A &amp;gt;&amp;gt; Ss /A =&amp;gt; that the&lt;BR /&gt;
	Knee in the server side can be reached more quickly than the&lt;BR /&gt;
	Knee in the network node of our Jackson network, so that&lt;BR /&gt;
	the bottleneck becomes the server node.&lt;/P&gt;

&lt;P&gt;In the other hand if:&lt;/P&gt;

&lt;P&gt;Ss &amp;gt;&amp;gt; Sn =&amp;gt; Ss /A &amp;gt;&amp;gt; Sn / A =&amp;gt; the Knee in the M/M/1 network&lt;BR /&gt;
	node can be reached more quickly, so that the network node in&lt;BR /&gt;
	the Jackson network becomes the bottleneck.&lt;/P&gt;

&lt;P&gt;Availability:&lt;/P&gt;

&lt;P&gt;&lt;BR /&gt;
	The demand for high availability and reliability of computer and&lt;BR /&gt;
	software systems has led to a formal verification of such systems.&lt;/P&gt;

&lt;P&gt;There are two principal approaches to formal verification:&lt;BR /&gt;
	model checking and theorem proving.&lt;/P&gt;

&lt;P&gt;And i wrote about Petri Nets and how to model parallel&lt;BR /&gt;
	programs and how to exploit verification tools as Tina to verify&lt;BR /&gt;
	the properties such as liveleness of the system.&lt;/P&gt;

&lt;P&gt;Please take a look at my other article about Petri Nets:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://pages.videotron.com/aminer/PetriNet/formal.htm" target="_blank"&gt;http://pages.videotron.com/aminer/PetriNet/formal.htm&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;And by using Petri Net and Tina you can make your system&lt;BR /&gt;
	more reliable , and if it's more reliable then the system&lt;BR /&gt;
	will have higher availability.&lt;/P&gt;

&lt;P&gt;There are important factors to take into consideration when&lt;BR /&gt;
	building systems, factors such us&amp;nbsp; availability and&lt;BR /&gt;
	efficiency(scalability etc....).&lt;/P&gt;

&lt;P&gt;System availability is also calculated by modeling the system&lt;BR /&gt;
	as an interconnection of parts in series and parallel.&lt;/P&gt;

&lt;P&gt;The availability A&amp;nbsp; of a system is calculated like this&lt;/P&gt;

&lt;P&gt;A =&amp;nbsp; MTBF / (MTBF + MTTR)&lt;/P&gt;

&lt;P&gt;MTBF: Mean time between failure&lt;BR /&gt;
	MTTR :Mean time to repair&lt;/P&gt;

&lt;P&gt;and the MTTR is composed of:&lt;/P&gt;

&lt;P&gt;time to respond to the failure + time to find&lt;BR /&gt;
	the problem + time to correct the problem + time&lt;BR /&gt;
	to verify that the system is working corretly.&lt;/P&gt;

&lt;P&gt;Now if the interconnected parts are parallel , the equation&lt;BR /&gt;
	that we use to calculate the availability is:&lt;/P&gt;

&lt;P&gt;A = 1- (U1 * U2 * U3 * ... * Un)&amp;nbsp; (1)&lt;/P&gt;

&lt;P&gt;Ui: is the non-availability of the component part of the system...&lt;/P&gt;

&lt;P&gt;The availability of a system composed of interconnected parts in&lt;BR /&gt;
	series is:&lt;/P&gt;

&lt;P&gt;A =&amp;nbsp; A1 * A2 * ... *&amp;nbsp; An&amp;nbsp; (2)&lt;/P&gt;

&lt;P&gt;Now as you have noticed i have modeled an enterprise website&lt;BR /&gt;
	as a Jackson network, and i have said before that:&lt;/P&gt;

&lt;P&gt;--&lt;/P&gt;

&lt;P&gt;And of course on Capacity Planning for Enterprise Datacenters&lt;BR /&gt;
	and Websites , you can mirror many computer servers and load&lt;BR /&gt;
	balance between them with a software... to make the system much&lt;BR /&gt;
	FASTER, and this will be modeled as a jackson network like this:&lt;/P&gt;

&lt;P&gt;A -&amp;gt; M/M/n Server Queue -&amp;gt; M/M/1 Network queue -&amp;gt; M/M/1 Client -&amp;gt; A&lt;/P&gt;

&lt;P&gt;A: the arrival rate to the system&lt;/P&gt;

&lt;P&gt;--&lt;/P&gt;

&lt;P&gt;As you have noticed i wrote "FASTER" but i didn't spook&lt;BR /&gt;
	about the AVAILABILITY,&amp;nbsp; you will notice that you can not just&lt;BR /&gt;
	make your system more EFFICIENT and FASTER&amp;nbsp; , but also&lt;BR /&gt;
	you can higher the AVAILABILITY of your system by mirroring&lt;BR /&gt;
	many servers...&lt;/P&gt;

&lt;P&gt;I have also wrote before that:&lt;/P&gt;

&lt;P&gt;---&lt;/P&gt;

&lt;P&gt;"If you have noticed i have tried to show also that one&lt;BR /&gt;
	of the principal objectives is to control and manage&lt;BR /&gt;
	the *Quality* of the system or process, i wrote in my&lt;BR /&gt;
	previous post the following:&lt;/P&gt;

&lt;P&gt;this imply that the T(the average response time in the Jackson&lt;BR /&gt;
	network)&lt;BR /&gt;
	is:&lt;/P&gt;

&lt;P&gt;T = Ni /A = (Nn + Ns + Nc) /A&lt;BR /&gt;
	= (((Ss/A)/n) / (1 -((Ss/A)/n)) + (Sn/A) / (1 -(Sn/A))&lt;BR /&gt;
	+ (Sc/A) / (1 -(Sn/A))) / A&lt;/P&gt;

&lt;P&gt;Now finally we have our mathematical analytic equation&lt;BR /&gt;
	and we can begin to simulate our Enteprise webserver&lt;BR /&gt;
	and also validate the performance data with the fwptt stress&lt;BR /&gt;
	webserver simulation tool...&lt;/P&gt;

&lt;P&gt;So, as you have noticed you can simulate our enterprise&lt;BR /&gt;
	webserver with this mathematical analytical equation and&lt;BR /&gt;
	validate the data collected by fwptt stress webserrer tool&lt;BR /&gt;
	and try to keep T( the average response time of your HTTP requests)&lt;BR /&gt;
	bellow or equal to 5 seconds, and see also if your webserver&lt;BR /&gt;
	is scaling,&amp;nbsp; and we call this also Quality control using OR&lt;BR /&gt;
	(operational research).&lt;/P&gt;

&lt;P&gt;In quality management, quality can also be maintained and&lt;BR /&gt;
	improved through the detection and reduction of process&lt;BR /&gt;
	variation. Where statistical techniques as ANOVA and others&lt;BR /&gt;
	can be used.. "&lt;/P&gt;

&lt;P&gt;---&lt;/P&gt;

&lt;P&gt;We have many mathematical tools that we can use in Quality control,&lt;BR /&gt;
	example: Correlation, Regression , ANOVA etc.&lt;/P&gt;

&lt;P&gt;ANOVA is a powerfull and important mathematic tool in&lt;BR /&gt;
	Quality control , by calculating the p-value in Excel or other&lt;BR /&gt;
	statistical tools , this will give us an important information like&lt;BR /&gt;
	if one or more variables have a significant effect on other&lt;BR /&gt;
	variables. If for example the p-value&amp;nbsp; &amp;lt;=&amp;nbsp; 0.05 (or if F &amp;gt; critical F value)&lt;BR /&gt;
	this imply that the null hypothesis is rejected , and the factor (or factors)&lt;BR /&gt;
	has in fact an effect..&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Regards,&lt;BR /&gt;
	Amine Moulay Ramdane.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 21 Dec 2013 18:42:34 GMT</pubDate>
    <dc:creator>aminer10</dc:creator>
    <dc:date>2013-12-21T18:42:34Z</dc:date>
    <item>
      <title>An M/M/n queuing model simulation</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/An-M-M-n-queuing-model-simulation/m-p/943660#M5085</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;An M/M/n queuing model simulation with Object Pascal and my Thread Pool Engine - version 1.02&lt;/P&gt;

&lt;P&gt;You can download it from:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://pages.videotron.com/aminer/" target="_blank"&gt;http://pages.videotron.com/aminer/&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Read more bellow...&lt;/P&gt;

&lt;P&gt;Author: Amine Moulay Ramdane&lt;/P&gt;

&lt;P&gt;Description:&lt;/P&gt;

&lt;P&gt;It's harder and sometimes impossible to get analytical results about waiting times and queue length for general interarrival and service distributions; so, it's important to be able to estimate these quantities by observing the results of simulation.&lt;/P&gt;

&lt;P&gt;It's very easy in Object Pascal to simulate a sequence of arrival times with a given interarrival distribution.&lt;/P&gt;

&lt;P&gt;Look at the examples MM1.pas( M/M/1 queuing model) and MMn.pas(M/M/n - n: number of servers -) inside the zip file:&lt;/P&gt;

&lt;P&gt;---------------------------&lt;/P&gt;

&lt;P&gt;InterArrivals:=TExponentialDistribution.Create(420623,1.0/3.0);&lt;/P&gt;

&lt;P&gt;ServiceTimes:=TExponentialDistribution.Create(220623,1.0/4.0);&lt;/P&gt;

&lt;P&gt;currtime:=0.0;&lt;/P&gt;

&lt;P&gt;for i:=1 to simnumber&lt;/P&gt;

&lt;P&gt;do&lt;/P&gt;

&lt;P&gt;begin&lt;/P&gt;

&lt;P&gt;obj:=TJob.create;&lt;/P&gt;

&lt;P&gt;obj.simnumber:=simnumber;&lt;/P&gt;

&lt;P&gt;obj.number:=i;&lt;/P&gt;

&lt;P&gt;currtime:=currtime+InterArrivals.Sample;&lt;/P&gt;

&lt;P&gt;obj.ArrivalTime:=currtime;&lt;/P&gt;

&lt;P&gt;obj.Servicetime:= ServiceTimes.sample;&lt;/P&gt;

&lt;P&gt;TP.execute(myobj.myproc1,pointer(obj),NORMAL_PRIORITY);&lt;/P&gt;

&lt;P&gt;end;&lt;/P&gt;

&lt;P&gt;-------------------------------------------&lt;/P&gt;

&lt;P&gt;Here we have the InterArrivals object and ServiceTimes object and we are calling InterArrivals.Sample to get our samples from the Exponential Distribution.&lt;/P&gt;

&lt;P&gt;After that we are calling myobj.myproc1 to simulate our M/M/1 queuing model...&lt;/P&gt;

&lt;P&gt;If you look at MM1.pas , you will see that the arrival rate is: 3 and the service rate is 4 , so, this will give us a theoretical value of 1/(4-3) = 1 for one server, and the Object Pascal simulation gave me 1.02 for one server.&lt;/P&gt;

&lt;P&gt;Now i want to talk about themathematical modeling of&lt;BR /&gt;
	queuing networks , if you have noticed in a webserver&lt;BR /&gt;
	that uses a distributed database&amp;nbsp; , the database&lt;BR /&gt;
	have to be modeled as a queuing system with an&lt;BR /&gt;
	hyperexponential service, but this will complicate the&lt;BR /&gt;
	mathematical modeling of the&amp;nbsp; webserver since the&lt;BR /&gt;
	database&amp;nbsp; have to be modeled as an M/G/1 queuing system,&lt;BR /&gt;
	so we have to simplify the mathematical modeling , so if&lt;BR /&gt;
	for exemple the database's write transactions takes in average&lt;BR /&gt;
	much more time than a database's read transaction so we have&lt;BR /&gt;
	to choose the worst case scenario , that means we have to choose&lt;BR /&gt;
	the rate of the database's write transactions as the rate&lt;BR /&gt;
	of the arrival to the&amp;nbsp; queuing system of the database&amp;nbsp; so&lt;BR /&gt;
	that&amp;nbsp; the database can be modeled as an M/M/1 queuing system&lt;BR /&gt;
	&amp;nbsp;(M: means markovian), so that the webserver can finally be&lt;BR /&gt;
	modeled as two M/M/1&amp;nbsp; queuing system in series, one for&lt;BR /&gt;
	the database and one for the internet network.&lt;/P&gt;

&lt;P&gt;But there is still a problem, if we want to also resolve the&lt;BR /&gt;
	worst case scenario when for exemple thousands of custumers&lt;BR /&gt;
	arrive at the same time to the webserver.. so the webserver&lt;BR /&gt;
	have to be modeled taking into acount this worst case scenario...&lt;/P&gt;

&lt;P&gt;Here is the matematical modeling of an M/M/1 queuing system:&lt;/P&gt;

&lt;P&gt;We already know that to satisfy a Poisson process we must&lt;BR /&gt;
	have that N(t1)- N(t0), N(t2)- N(t1) etc. must be independant&lt;BR /&gt;
	that means the counting increments must be independant.&lt;/P&gt;

&lt;P&gt;We have the following relation between the Poisson law&lt;BR /&gt;
	and Exponential law:&lt;/P&gt;

&lt;P&gt;the expected value E(X exponential) = 1 / E(X poisson)&lt;/P&gt;

&lt;P&gt;so if the arrival is poissonian then the interarrivals are&lt;BR /&gt;
	exponential..&lt;/P&gt;

&lt;P&gt;Now i will calculate the expected mean waiting time and&lt;BR /&gt;
	mean number of custumers in the queuing system:&lt;/P&gt;

&lt;P&gt;The Little law says that the waiting time in the queuing system:&lt;/P&gt;

&lt;P&gt;Ws = Ls/lambda&lt;/P&gt;

&lt;P&gt;And the waiting time in the queue of the queuing system is:&lt;/P&gt;

&lt;P&gt;Wq = Ws - 1/Mu&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;nbsp; Ls/lambda - 1/Mu&lt;/P&gt;

&lt;P&gt;And the Little law gives us the expected mean number of custumers in the&lt;BR /&gt;
	queue:&lt;/P&gt;

&lt;P&gt;Lq = Wq*lambda =&amp;nbsp; Ls - Phi&amp;nbsp; et Phi = lamda/Mu&lt;/P&gt;

&lt;P&gt;That implies:&lt;/P&gt;

&lt;P&gt;Ls - Lq = Phi&lt;/P&gt;

&lt;P&gt;&lt;BR /&gt;
	When the system is in a stationary state , the balance equations gives:&lt;/P&gt;

&lt;P&gt;State&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rate in = rate out&lt;/P&gt;

&lt;P&gt;state 0:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Mu * P1 = lambda*P0&lt;BR /&gt;
	state 1:&amp;nbsp; lambda*P0 + Mu*P2 = lambda*P1 + Mu*P1&lt;BR /&gt;
	state 2:&amp;nbsp; lambda*P1 + Mu*P3 = lambda*P2 + Mu*P2&lt;BR /&gt;
	...&lt;BR /&gt;
	state n:&amp;nbsp; lambda*Pn-1 + Mu*Pn+1 = lambda*Pn + Mu*Pn&lt;/P&gt;

&lt;P&gt;&lt;BR /&gt;
	And that gives us the following balance equations:&lt;/P&gt;

&lt;P&gt;lambda * P0 = Mu*P1&amp;nbsp;&amp;nbsp; &amp;lt;=&amp;gt;&amp;nbsp; P1 = (lambda/Mu)*P0&lt;/P&gt;

&lt;P&gt;lambda * P1 = Mu*P2&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;=&amp;gt;&amp;nbsp; P1 = (lambda/Mu)^2*P0&lt;/P&gt;

&lt;P&gt;lambda * P2 = Mu*P3&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;=&amp;gt;&amp;nbsp; P1 = (lambda/Mu)^3*P0&lt;/P&gt;

&lt;P&gt;...&lt;/P&gt;

&lt;P&gt;lambda * Pn-1 = Mu*Pn&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;=&amp;gt;&amp;nbsp; P_n = (lambda/Mu)^k*P0&amp;nbsp; [1]&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Note: P0 means the probality of having zero custumer in the queuing system.&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; and ^ means power.&lt;/P&gt;

&lt;P&gt;&lt;BR /&gt;
	And we have also that:&lt;/P&gt;

&lt;P&gt;Sum(n=0 -&amp;gt; infinite) (Pn) = 1 ,&amp;nbsp; that means the sum of probabilities equal 1&lt;/P&gt;

&lt;P&gt;And&amp;nbsp; [1] gives us:&lt;/P&gt;

&lt;P&gt;Sum(n=0 -&amp;gt; infinite) (Phi^n*P0) =1&lt;/P&gt;

&lt;P&gt;And by resolving the sum of a geometric series that gives us:&lt;/P&gt;

&lt;P&gt;P0 * 1/(1-Phi) = 1 =&amp;gt; P0 = 1 - Phi&amp;nbsp; and Phi &amp;lt; 1&lt;/P&gt;

&lt;P&gt;And [1] gives us:&lt;/P&gt;

&lt;P&gt;Pn = (1-Phi) * Phi^n&lt;/P&gt;

&lt;P&gt;And we have the mean expected number iof custumer in the queuing system is:&lt;/P&gt;

&lt;P&gt;Ls = Sum(n=0 -&amp;gt; infinite) (n*Pn)&lt;/P&gt;

&lt;P&gt;That implies:&lt;/P&gt;

&lt;P&gt;Ls = Sum(n=0 -&amp;gt; infinite) (n*(1-Phi)*Phi^n) = Phi/1-Phi&amp;nbsp;&amp;nbsp; and&amp;nbsp; Phi&amp;lt;1&lt;/P&gt;

&lt;P&gt;and we have the mean expected number of custumers in the queue of the queing system is :&lt;/P&gt;

&lt;P&gt;Lq = Ls -Phi = Phi^2/ (1-Phi)&amp;nbsp; et Phi&amp;lt;1&lt;/P&gt;

&lt;P&gt;&lt;BR /&gt;
	Little law gives us the mean waiting time in the system and in the queue:&lt;/P&gt;

&lt;P&gt;Ws = 1/lambda * Phi/(1-Phi)&amp;nbsp; and Phi&amp;lt;1&lt;/P&gt;

&lt;P&gt;et&lt;/P&gt;

&lt;P&gt;Wq= 1/lambda * Phi^2/(1-Phi)&amp;nbsp; and Phi&amp;lt;1&lt;/P&gt;

&lt;P&gt;&lt;BR /&gt;
	I have just read the following page, look at the the USL&lt;/P&gt;

&lt;P&gt;(Universal Law of Computational Scalability) of Dr. Gunther,&lt;BR /&gt;
	he wrote this: (See: &lt;A href="http://en.wikipedia.org/wiki/Neil_J._Gunther" target="_blank"&gt;http://en.wikipedia.org/wiki/Neil_J._Gunther&lt;/A&gt; )&lt;/P&gt;

&lt;P&gt;--------------&lt;/P&gt;

&lt;P&gt;The relative capacity C(N) of a computational platform is given by:&lt;/P&gt;

&lt;P&gt;C(N)&amp;nbsp; =&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; N&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ------------------------------------------&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 + α (N - 1) + ß N (N - 1)&lt;/P&gt;

&lt;P&gt;where N represents either the number of physical processors&lt;BR /&gt;
	in the hardware configuration or the number of users driving the&lt;BR /&gt;
	software application. The parameters α and ß represent respectively&lt;BR /&gt;
	the levels of contention (e.g., queueing for shared resources) and&lt;BR /&gt;
	coherency delay (i.e., latency for data to become consistent) in the&lt;BR /&gt;
	system. The ß parameter also quantifies the retrograde throughput&lt;BR /&gt;
	seen in many stress tests but not accounted for in either Amdahl's law&lt;BR /&gt;
	or event-based simulations.&lt;/P&gt;

&lt;P&gt;----------&lt;/P&gt;

&lt;P&gt;His website: &lt;A href="http://www.perfdynamics.com/" target="_blank"&gt;http://www.perfdynamics.com/&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;If you read carefully , you will see that Dr. Gunther is using this&lt;BR /&gt;
	model to predict scalability after he simulates a relatively small&lt;BR /&gt;
	number of vusers in LoadRunner ( because of licensing costs, it's&lt;BR /&gt;
	cost-effective)&amp;nbsp; and after that he finds the coefficients of the&lt;BR /&gt;
	2nd-degree polynomial (quadratic equation) and then transform&lt;BR /&gt;
	those coefficients back to the USL parameters using the α = b - a&lt;BR /&gt;
	and ß = a.&lt;/P&gt;

&lt;P&gt;And then he is extrapolating with the USL model to higher loads&lt;BR /&gt;
	to predict scalability.&lt;/P&gt;

&lt;P&gt;He is also applying the model to webservers&amp;nbsp; with heterogeneous&lt;BR /&gt;
	workloads. like in the following page:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://perfdynamics.blogspot.com/2009/04/assessing-usl-scalability-wi" target="_blank"&gt;http://perfdynamics.blogspot.com/2009/04/assessing-usl-scalability-wi&lt;/A&gt;.&lt;/P&gt;

&lt;P&gt;Now&amp;nbsp; my question follows:&lt;/P&gt;

&lt;P&gt;Suppose we have obtained a small number of&amp;nbsp; measured load-points&lt;BR /&gt;
	with Loadrunner or others tools, and we calculated the USL equation&lt;BR /&gt;
	to predict scalability of a webserver , how the USL model can predict&lt;BR /&gt;
	if the scalability/performance is limited by the network bandwidth&lt;BR /&gt;
	and not the server ?&amp;nbsp; I think USL can not predict this.&lt;/P&gt;

&lt;P&gt;When we are modeling webservers , we&amp;nbsp; have to include&lt;BR /&gt;
	the network node in our network queuig model (that includes&lt;BR /&gt;
	the computer server queue) , and since the service in the&lt;BR /&gt;
	computer server is comprised of multiple services (when we&lt;BR /&gt;
	are using htmls , databases etc.) the network queue will not&lt;BR /&gt;
	be markovian in its service , and we have to model the network&lt;BR /&gt;
	queue as an M/G/1 and this will complicate the mathematical&lt;BR /&gt;
	analytical modeling...&lt;/P&gt;

&lt;P&gt;So,&amp;nbsp; i think the best way is to use a webserver stress tool&lt;BR /&gt;
	like&amp;nbsp; &lt;A href="http://fwptt.sourceforge.net/" target="_blank"&gt;http://fwptt.sourceforge.net/&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;You can even test the webserver&amp;nbsp; with an heterogeneous&lt;BR /&gt;
	workloads by starting multiple fwtpp processes, and&lt;BR /&gt;
	you should increase the number of threads to 5 and after&lt;BR /&gt;
	that to 10 threads, 15 ... and so on until the webserver&lt;BR /&gt;
	applications stops responding propperly(and this will inform&lt;BR /&gt;
	on the maximum number of users that you can have in the same time...)&lt;BR /&gt;
	and as you are stress testing you can even see (by testing/measuring&lt;BR /&gt;
	it) if the network bandwidth is not the bottleneck... and this can&lt;BR /&gt;
	not be done by the USL model.&lt;/P&gt;

&lt;P&gt;We already know that to satisfy a Poisson process we must&lt;BR /&gt;
	have that N(t1)- N(t0), N(t2)- N(t1) etc. must be independant&lt;BR /&gt;
	that means the counting increments must be independant.&lt;/P&gt;

&lt;P&gt;We have the following relation between the Poisson law&lt;BR /&gt;
	and Exponential law:&lt;/P&gt;

&lt;P&gt;the expected value E(X exponential) = 1 / E(X poisson)&lt;/P&gt;

&lt;P&gt;and if the arrival is poissonian then the interarrivals are&lt;BR /&gt;
	exponential..&lt;/P&gt;

&lt;P&gt;Now what about a webserver ?&lt;/P&gt;

&lt;P&gt;I have read the following paper:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.google.com/viewer?a=v&amp;amp;q=cache:JFYCp_dSPP4J:citeseerx.ist" target="_blank"&gt;http://docs.google.com/viewer?a=v&amp;amp;q=cache:JFYCp_dSPP4J:citeseerx.ist&lt;/A&gt;.&lt;/P&gt;

&lt;P&gt;And it says that a simple model with M/M/1/k with FCFS discipline&lt;BR /&gt;
	can predict webserver performance quite well..&lt;/P&gt;

&lt;P&gt;Hence,&amp;nbsp; i think we can model our webserver over internet&lt;BR /&gt;
	with 3 queues connected as a Jackson Network like this&lt;/P&gt;

&lt;P&gt;A -&amp;gt;&amp;nbsp; M/M/1 Server Queue -&amp;gt; M/M/1 Network queue -&amp;gt; M/M/1 Client -&amp;gt; A&lt;/P&gt;

&lt;P&gt;A: is the arrival rate&lt;/P&gt;

&lt;P&gt;and we have the following:&lt;/P&gt;

&lt;P&gt;Ni: number of jobs in each queue&lt;BR /&gt;
	Ui: utilization of each&amp;nbsp; queue&lt;/P&gt;

&lt;P&gt;Ni =&amp;nbsp; Ui / (1-Ui)&lt;/P&gt;

&lt;P&gt;Adding all the Ni in each individual queue will give the&lt;BR /&gt;
	average number of jobs in&amp;nbsp; the entire queuing network.&lt;/P&gt;

&lt;P&gt;After that we apply the Little formula:&lt;/P&gt;

&lt;P&gt;A: network arrival rate&lt;BR /&gt;
	T: average response time&lt;/P&gt;

&lt;P&gt;N = A*T&amp;nbsp; =&amp;gt; T = N / A&lt;/P&gt;

&lt;P&gt;And after that from the mathematical analytical equation&lt;BR /&gt;
	we can simulate the jackson queuing network that model our&lt;BR /&gt;
	webservers...&lt;/P&gt;

&lt;P&gt;Now there is still an important question that i have:&lt;/P&gt;

&lt;P&gt;Our analytical jackson network model can give us insight&lt;BR /&gt;
	on the webservers behavivior.. but the difficulty&amp;nbsp; that i find in&lt;BR /&gt;
	practice is that: suppose we have found the right parametters&lt;BR /&gt;
	that we want to choose, like for example the service rate of&lt;BR /&gt;
	the M/M/1 Server Queue , how , from this service rate, can&lt;BR /&gt;
	we buy the right computer that satisfies the service rate&lt;BR /&gt;
	that we want ?&lt;/P&gt;

&lt;P&gt;We say in OR that:&lt;/P&gt;

&lt;P&gt;"Understanding the behavior of a system is what Queueing Theory&lt;BR /&gt;
	and Little’s Law is all about. But, managing a Queue requires not&lt;BR /&gt;
	just understanding the behavior of a system, but also in-depth&lt;BR /&gt;
	knowledge of how to improve a system - improving both aspects&lt;BR /&gt;
	of Queueing will mean a better, more efficient and cost-effective&lt;BR /&gt;
	system and, more importantly, a much better customer experience."&lt;/P&gt;

&lt;P&gt;I wrote before that:&lt;/P&gt;

&lt;P&gt;---&lt;/P&gt;

&lt;P&gt;"It says that a simple model with M/M/1/k with FCFS discipline&lt;BR /&gt;
	can predict webserver performance quite well..&lt;BR /&gt;
	Hence,&amp;nbsp; i think we can model our webserver over internet&lt;BR /&gt;
	with 3 queues connected as a Jackson Network like this&lt;BR /&gt;
	A -&amp;gt; M/M/1 Server Queue -&amp;gt; M/M/1 Network queue -&amp;gt; M/M/1 Client -&amp;gt; A&lt;/P&gt;

&lt;P&gt;A: the arrival rate&lt;BR /&gt;
	and we have the following:&lt;BR /&gt;
	Ni: number of jobs in each queue&lt;BR /&gt;
	Ui: utilization of each&amp;nbsp; queue&lt;/P&gt;

&lt;P&gt;Ni =&amp;nbsp; Ui / (1-Ui)&lt;/P&gt;

&lt;P&gt;Adding all the Ni in each individual queue will give the&lt;BR /&gt;
	average number of jobs in&amp;nbsp; the entire queuing network.&lt;BR /&gt;
	After that we apply the Little formula:&lt;/P&gt;

&lt;P&gt;A: network arrival rate&lt;BR /&gt;
	T: average response time&lt;/P&gt;

&lt;P&gt;N = A*T&amp;nbsp; =&amp;gt; T = N / A&lt;/P&gt;

&lt;P&gt;And after that from the mathematical analytical equation&lt;BR /&gt;
	we can simulate the jackson queuing"&lt;/P&gt;

&lt;P&gt;--&lt;/P&gt;

&lt;P&gt;As you have noticed , this mathematical model of&lt;BR /&gt;
	this jackson network does in fact take into account&lt;BR /&gt;
	the&amp;nbsp; M/M/1 Network queue node , the USL model can not&lt;BR /&gt;
	do this... and with this performance data from the mathematical&lt;BR /&gt;
	analytical model simulation&amp;nbsp; we can for example validate&lt;BR /&gt;
	the performance data of the fwptt stress webserver simulation..&lt;/P&gt;

&lt;P&gt;But you have to take into account worst cases and the&lt;BR /&gt;
	peak traffic loads...&lt;/P&gt;

&lt;P&gt;Let for example we have a a webserver hosting html pages&lt;BR /&gt;
	and it is receiving 1000000 HTTP operations&lt;BR /&gt;
	per day with an average file&amp;nbsp; size of 10 KB.&lt;/P&gt;

&lt;P&gt;What would be the network bandwidth required for this website&lt;BR /&gt;
	considering peak traffic if the peak traffic load from past&lt;BR /&gt;
	observations was four times greater than average loads?&lt;/P&gt;

&lt;P&gt;Required bandwidth is solved by the following equation:&lt;/P&gt;

&lt;P&gt;HTTP op/sec x average file size or&lt;/P&gt;

&lt;P&gt;1000000 HTTP ops per day =1000000/24 = 41,667 op/hour =&lt;BR /&gt;
	41,667/3600= 11.6 HTTP ops/sec&lt;/P&gt;

&lt;P&gt;The needed bandwidth is&lt;/P&gt;

&lt;P&gt;11.6 HTTP ops/sec X 10 KB/HTTP op = 116 KB/sec = 928 Kbps.&lt;/P&gt;

&lt;P&gt;If we assume a protocol overhead of 20% then the actual throughput&lt;BR /&gt;
	required is 928 Kbps X 1.2 = 1,114 Kbps.&lt;/P&gt;

&lt;P&gt;However if peak loads, as i&amp;nbsp; said before, is as much as&lt;BR /&gt;
	4 times greater, the bandwidth required to handle spikes&lt;BR /&gt;
	would be 4 X 1,114 Kbps = 4.456 Mbps.&lt;/P&gt;

&lt;P&gt;So you have to think also about the cost of this line...&lt;/P&gt;

&lt;P&gt;I will add the following:&lt;/P&gt;

&lt;P&gt;As you have noticed i said that:&lt;/P&gt;

&lt;P&gt;"As you have noticed , this mathematical model of&lt;BR /&gt;
	this jackson network does in fact take into account&lt;BR /&gt;
	the&amp;nbsp; M/M/1 Network queue node , the USL model can not&lt;BR /&gt;
	do this... and with this performance data from the mathematical&lt;BR /&gt;
	analytical model simulation&amp;nbsp; we can for example validate&lt;BR /&gt;
	the performance data of the fwptt stress webserver simulation.."&lt;/P&gt;

&lt;P&gt;and i said that:&lt;/P&gt;

&lt;P&gt;"Hence,&amp;nbsp; i think we can model our webserver over internet&lt;BR /&gt;
	with 3 queues connected as a Jackson Network like this&lt;BR /&gt;
	An M/M/1 Server Queue -&amp;gt; M/M/1 Network queue -&amp;gt; M/M/1 Client queue"&lt;/P&gt;

&lt;P&gt;And of course on Capacity Planning for Enterprise Datacenters&lt;BR /&gt;
	and Websites , you can mirror many computer servers and load&lt;BR /&gt;
	balance between them with a software... to make the system much&lt;BR /&gt;
	FASTER, and this will be modeled as a jackson network like this:&lt;/P&gt;

&lt;P&gt;A -&amp;gt; M/M/n Server Queue -&amp;gt; M/M/1 Network queue -&amp;gt; M/M/1 Client -&amp;gt; A&lt;/P&gt;

&lt;P&gt;A: the arrival rate to the system&lt;/P&gt;

&lt;P&gt;But there is still an important thing , as i have showed before&lt;BR /&gt;
	on my calculations:&lt;/P&gt;

&lt;P&gt;"However if peak loads, as i said before, is as much as&lt;BR /&gt;
	4 times greater, the bandwidth required to handle spikes&lt;BR /&gt;
	it would be 4 X 1,114 Kbps = 4.456 Mbps.&lt;/P&gt;

&lt;P&gt;So you have to think also about the cost of this line..."&lt;/P&gt;

&lt;P&gt;I think that you have also to take into account the knee utilisation&lt;BR /&gt;
	of your M/M/n Servers Queues, if for example the number of computer&lt;BR /&gt;
	servers is 8 and the Knee is 74%&amp;nbsp; that means that in our previous&lt;BR /&gt;
	example the bandwidth must equal to:&lt;/P&gt;

&lt;P&gt;74% X 4.456 Mbps =&amp;nbsp; 3.297 Mbps.&lt;/P&gt;

&lt;P&gt;Cause as you know, above this Knee of 74% for 8 servers&lt;BR /&gt;
	the curve of the waiting time does grow quickly ..&lt;/P&gt;

&lt;P&gt;And we have to take into account the cost of the line ...&lt;/P&gt;

&lt;P&gt;Let us take another example:&lt;/P&gt;

&lt;P&gt;In the network node of the Jackson network, there is three&lt;BR /&gt;
	main parameters that are responsable for its performance:&lt;BR /&gt;
	latency, bandwidth and utilization.&lt;/P&gt;

&lt;P&gt;Now, if for example you take a look at my provider&lt;/P&gt;

&lt;P&gt;&lt;A href="http://www.videotron.com/service/internet-services/internet-access/hi" target="_blank"&gt;http://www.videotron.com/service/internet-services/internet-access/hi&lt;/A&gt;.&lt;/P&gt;

&lt;P&gt;My upload network speed is clearly 820 Kbs =&amp;gt; 102.5 Kbytes/sec&lt;/P&gt;

&lt;P&gt;Hence, if the average file size on my web site is for&lt;BR /&gt;
	example 25 Kbyte and the protocol overhead is 20%, that&lt;BR /&gt;
	means that the file size will be in average:&lt;/P&gt;

&lt;P&gt;&amp;nbsp;25 * 120% =&amp;nbsp; 30 Kbyte&lt;/P&gt;

&lt;P&gt;And if the Knee of the M/M/1 queuing node in our Jackson network&lt;BR /&gt;
	is 50%, then the bandwidth available will be reduced to&lt;BR /&gt;
	102.5 Kbytes/sec * 50% = 51.25 Kbytes/sec&lt;/P&gt;

&lt;P&gt;If the download speed of the client is for example 7.5 Mbps,&lt;BR /&gt;
	that means that the file can be retrieved in no more than&lt;BR /&gt;
	30 / 51.25 = 0.585 second = 585 milliseconds.&lt;/P&gt;

&lt;P&gt;But if we assume for example that a typical web visitor&lt;BR /&gt;
	to my web site is spending 585 milliseconds retrieving the&lt;BR /&gt;
	page and 60 seconds reading the HTML page THEN each client&lt;BR /&gt;
	on average only requires:&lt;/P&gt;

&lt;P&gt;0.585 / (0.585 + 60) = 9.6% of the bandwidth that is allocated to&lt;BR /&gt;
	it..&lt;/P&gt;

&lt;P&gt;but in practice i think we have to consider the worst case&lt;BR /&gt;
	scenarios..&lt;/P&gt;

&lt;P&gt;So, since we can support a constraint of no more than 5 seconds&lt;BR /&gt;
	in the T (average response time), that means:&lt;/P&gt;

&lt;P&gt;585 ms * X = 5000 milliseconds =&amp;gt; X =&amp;nbsp; 8.54&lt;/P&gt;

&lt;P&gt;Hence, in worst case , my network node can not support more&lt;BR /&gt;
	than 8.54 users in the same time...&lt;/P&gt;

&lt;P&gt;So, on *average* my network node can support:&lt;/P&gt;

&lt;P&gt;(8.54&amp;nbsp; * 86400) / 5 =&amp;nbsp; 147571 users per day&lt;/P&gt;

&lt;P&gt;I wrote before that:&lt;/P&gt;

&lt;P&gt;--&lt;BR /&gt;
	And of course on Capacity Planning for Enterprise Datacenters&lt;BR /&gt;
	and Websites , you can mirror many computer servers and load&lt;BR /&gt;
	balance between them with a software... to make the system much&lt;BR /&gt;
	FASTER, and this will be modeled as a Jackson network like this:&lt;/P&gt;

&lt;P&gt;(1)&lt;/P&gt;

&lt;P&gt;A -&amp;gt; M/M/n Server Queue -&amp;gt; M/M/1 Network queue -&amp;gt;&lt;BR /&gt;
	-&amp;gt; M/M/1 Client queue -&amp;gt; A&lt;/P&gt;

&lt;P&gt;A: the arrival rate to the system"&lt;/P&gt;

&lt;P&gt;--&lt;/P&gt;

&lt;P&gt;We know also from an operational law of queuing theory that:&lt;/P&gt;

&lt;P&gt;(2) the rate of job leaving any stable node must equal&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; its arrival rate.&lt;/P&gt;

&lt;P&gt;(2) is from the Equivalence property.&lt;/P&gt;

&lt;P&gt;Equivalence property: Assume that a service facility with&lt;BR /&gt;
	s servers and infinite queue has a Poisson input with&lt;BR /&gt;
	parameter lambda and the same exponential service-time&lt;BR /&gt;
	distribution with parameter Mu for each server (the M/M/s model),&lt;BR /&gt;
	where s * Mu &amp;gt; lambda. Then the steady-state output of&lt;BR /&gt;
	this service facility is also poisson process with parameter&lt;BR /&gt;
	lambda.&lt;/P&gt;

&lt;P&gt;We know for an M/M/c queue that:&lt;/P&gt;

&lt;P&gt;Note: try to add servers with almost the same hardware&lt;BR /&gt;
	configuration...&lt;/P&gt;

&lt;P&gt;C(c, U) = Erlang formula = P(c) / (1 - Utilization)&lt;/P&gt;

&lt;P&gt;note:&amp;nbsp; c the number of servers..&lt;/P&gt;

&lt;P&gt;P(c): means the probability that all the servers are busy&lt;/P&gt;

&lt;P&gt;P(0): means the probability that there is no waiting time in the&lt;BR /&gt;
	queue, that means also: AT LEAST one server among the C servers&lt;BR /&gt;
	are not busy...&lt;/P&gt;

&lt;P&gt;The average waiting time in the 'queue' =&lt;BR /&gt;
	C(c,U) / (service rate x c x (1 - Utilization))&amp;nbsp;&amp;nbsp; (3)&lt;/P&gt;

&lt;P&gt;It's approximatly equal to:&lt;/P&gt;

&lt;P&gt;Utilization^C/(service rate x (1 - Utilization^C)&lt;/P&gt;

&lt;P&gt;Note: ^ means power&lt;/P&gt;

&lt;P&gt;This approximation is exact for the M/M/1 and M/M/2 models,&lt;BR /&gt;
	but 'slightly' lower than the result in (3) if c &amp;gt; 2&lt;/P&gt;

&lt;P&gt;and&lt;/P&gt;

&lt;P&gt;Utilization = Density of circulation / C (number of servers)&lt;/P&gt;

&lt;P&gt;Note: ^ means power()&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; and C means the number of servers&lt;/P&gt;

&lt;P&gt;Response time = The average waiting time in the 'queue' +&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (1 / service rate)&lt;/P&gt;

&lt;P&gt;average numbers of users in the system = service rate x response time&lt;BR /&gt;
	average number of users in queue = service rate x average waiting&lt;BR /&gt;
	time&lt;BR /&gt;
	in the 'queue'&lt;/P&gt;

&lt;P&gt;Now as i said before:&lt;/P&gt;

&lt;P&gt;--&lt;BR /&gt;
	So the equation for&lt;/P&gt;

&lt;P&gt;Ni: number of jobs in each queue&lt;BR /&gt;
	Ui: utilization of each&amp;nbsp; queue&lt;/P&gt;

&lt;P&gt;Ni =&amp;nbsp; Ui / (1-Ui)&lt;/P&gt;

&lt;P&gt;Adding all the Ni in each individual queue will give the&lt;BR /&gt;
	average number of jobs in&amp;nbsp; the entire queuing network.&lt;/P&gt;

&lt;P&gt;After that we apply the Little formula:&lt;/P&gt;

&lt;P&gt;A: network arrival rate&lt;BR /&gt;
	T: average response time&lt;/P&gt;

&lt;P&gt;N = A*T&amp;nbsp; =&amp;gt; T = N / A&lt;/P&gt;

&lt;P&gt;And after that from the mathematical analytical equation&lt;BR /&gt;
	we can simulate the jackson queuing network that model our&lt;BR /&gt;
	webservers...&lt;/P&gt;

&lt;P&gt;---&lt;/P&gt;

&lt;P&gt;If we try to calculate the Ni =&amp;nbsp; Ui / (1-Ui) in&lt;BR /&gt;
	the Jackson network, and from the operational law (2) above&lt;BR /&gt;
	this will give us:&lt;/P&gt;

&lt;P&gt;Ns for the M/M/n Server queue is:&lt;/P&gt;

&lt;P&gt;(DC / n) / (1&amp;nbsp; - (DC/n))&lt;/P&gt;

&lt;P&gt;and DC = Ss / A =&amp;gt; Ns = ((Ss/A)/n) / (1 -((Ss/A)/n))&lt;/P&gt;

&lt;P&gt;Ss: service rate at the queuing server.&lt;BR /&gt;
	A: Arrival rate to the jackson network&lt;/P&gt;

&lt;P&gt;DC: is the Density of circulation&lt;BR /&gt;
	n: number of servers&lt;/P&gt;

&lt;P&gt;And Nn for the M/M/1 Network queue is:&lt;/P&gt;

&lt;P&gt;and Utilization in the M/M/1 network queue = Sn / A&lt;BR /&gt;
	this imply that =&amp;gt; Nn = (Sn/A) / (1 -(Sn/A))&lt;/P&gt;

&lt;P&gt;Nn: number of jobs in the M/M/1 network queue node&lt;BR /&gt;
	Un:&amp;nbsp; Utilization in the network queue node&lt;BR /&gt;
	Sn: service rate at the queuiNg server.&lt;BR /&gt;
	A: Arrival rate to the jackson network&lt;/P&gt;

&lt;P&gt;And Nc for the M/M/1 Client queue node is:&lt;/P&gt;

&lt;P&gt;and Uc=&amp;nbsp; Sc / (F/5)&lt;BR /&gt;
	this imply that =&amp;gt; Nc = (Sc/(F/5)) / (1 -(Sc/(F/5)))&lt;BR /&gt;
	Note: F/5, if for example the rate is one file every 5 seconds.&lt;/P&gt;

&lt;P&gt;Nc: number of jobs in the M/M/1 client queue node&lt;BR /&gt;
	Uc:&amp;nbsp; Utilization in the M/M/1 client queue node&lt;BR /&gt;
	Sc: service rate at the queuiNg server.&lt;BR /&gt;
	A: Arrival rate to the Jackson network&lt;BR /&gt;
	F: Average file size&lt;/P&gt;

&lt;P&gt;Adding all the Ni in each individual queue will&lt;BR /&gt;
	give the average number of jobs in&amp;nbsp; the entire&lt;BR /&gt;
	queuing network that is equal to:&lt;/P&gt;

&lt;P&gt;Ni = Nn + Ns + Nc&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; = (((Ss/A)/n) / (1 -((Ss/A)/n)) + (Sn/A) / (1 -(Sn/A))&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; + (Sc/(F/5)) / (1 -(Sc/(F/5)))&lt;/P&gt;

&lt;P&gt;After that we apply the Little formula:&lt;/P&gt;

&lt;P&gt;A: network arrival rate&lt;BR /&gt;
	T: average response time&lt;/P&gt;

&lt;P&gt;N = A*T&amp;nbsp; =&amp;gt; T = N / A&lt;/P&gt;

&lt;P&gt;this imply that the T(the average response time in the Jackson&lt;BR /&gt;
	network)&lt;BR /&gt;
	is:&lt;/P&gt;

&lt;P&gt;Ni = Nn + Ns + Nc&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; = (((Ss/A)/n) / (1 -((Ss/A)/n)) + (Sn/A) / (1 -(Sn/A))&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; + (Sc/(F/5)) / (1 -(Sc/(F/5)))&lt;/P&gt;

&lt;P&gt;Now finally we have our mathematical analytic equation&lt;BR /&gt;
	and we can begin to simulate our Enteprise webserver&lt;BR /&gt;
	and also validate the performance data with the fwptt stress&lt;BR /&gt;
	webserver simulation tool...&lt;/P&gt;

&lt;P&gt;And don't forget what i have said about USL:&lt;/P&gt;

&lt;P&gt;"Suppose we have obtained a small number of&amp;nbsp; measured&lt;BR /&gt;
	load-points with Loadrunner or others tools, and we&lt;BR /&gt;
	calculated the USL equation to predict scalability of&lt;BR /&gt;
	a webserver , how the USL model can predict if the&lt;BR /&gt;
	scalability/performance is limited by the network bandwidth&lt;BR /&gt;
	and not the server ?&amp;nbsp; I think USL can not predict this."&lt;/P&gt;

&lt;P&gt;Also i wrote about USL that:&lt;/P&gt;

&lt;P&gt;"As you have noticed , this mathematical model of&lt;BR /&gt;
	this jackson network does in fact take into account&lt;BR /&gt;
	the&amp;nbsp; M/M/1 Network queue node , the USL model can not&lt;BR /&gt;
	do this... and with this performance data from the mathematical&lt;BR /&gt;
	analytical model simulation&amp;nbsp; we can for example validate&lt;BR /&gt;
	the performance data of the fwptt stress webserver simulation.."&lt;/P&gt;

&lt;P&gt;If you have noticed i have tried to show also that one&lt;BR /&gt;
	of the principal objectives is to control and manage&lt;BR /&gt;
	the *Quality* of the system or process, i wrote in my&lt;BR /&gt;
	post the following:&lt;/P&gt;

&lt;P&gt;---&lt;/P&gt;

&lt;P&gt;this imply that the T(the average response time in the Jackson&lt;BR /&gt;
	network)&lt;BR /&gt;
	is:&lt;/P&gt;

&lt;P&gt;Ni = Nn + Ns + Nc&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; = (((Ss/A)/n) / (1 -((Ss/A)/n)) + (Sn/A) / (1 -(Sn/A))&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; + (Sc/(F/5)) / (1 -(Sc/(F/5)))&lt;/P&gt;

&lt;P&gt;Now finally we have our mathematical analytic equation&lt;BR /&gt;
	and we can begin to simulate our Enteprise webserver&lt;BR /&gt;
	and also validate the performance data with the fwptt stress&lt;BR /&gt;
	webserver simulation tool...&lt;/P&gt;

&lt;P&gt;---&lt;/P&gt;

&lt;P&gt;So, as you have noticed you can simulate our enterprise&lt;BR /&gt;
	webserver with this mathematical analytical equation and&lt;BR /&gt;
	validate the data collected by fwptt stress webserrer tool&lt;BR /&gt;
	and try to keep T( the average response time of your HTTP requests)&lt;BR /&gt;
	bellow or equal to 5 seconds, and see also if your webserver&lt;BR /&gt;
	is scaling,&amp;nbsp; and we call this also Quality control using OR&lt;BR /&gt;
	(operational research).&lt;/P&gt;

&lt;P&gt;In quality management, quality can also be maintained and&lt;BR /&gt;
	improved through the detection and reduction of process&lt;BR /&gt;
	variation. Where statistical techniques as ANOVA and others&lt;BR /&gt;
	can be used..&lt;/P&gt;

&lt;P&gt;The ANOVA method , for example, analyses the variation in&lt;BR /&gt;
	the data set to discover the amount of variation that can&lt;BR /&gt;
	be attributed to each factor.. etc.&lt;/P&gt;

&lt;P&gt;There is still an important thing..&lt;/P&gt;

&lt;P&gt;As you have noticed, i have finally arrived to the following&lt;BR /&gt;
	mathematical model of our Jackson network that model an Enterprise&lt;BR /&gt;
	website:&lt;/P&gt;

&lt;P&gt;Ni = Nn + Ns + Nc&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; = (((Ss/A)/n) / (1 -((Ss/A)/n)) + (Sn/A) / (1 -(Sn/A))&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; + (Sc/(F/5)) / (1 -(Sc/(F/5)))&lt;/P&gt;

&lt;P&gt;T: is the average response time..&lt;/P&gt;

&lt;P&gt;So read it carefully an you will notice that this mathematical&lt;BR /&gt;
	model also can simulate and predict an intranet website behavior&lt;BR /&gt;
	or an internet website..&lt;/P&gt;

&lt;P&gt;First look at the first factor (((Ss/A)/n) / (1 -((Ss/A)/n))&lt;BR /&gt;
	in our mathematical model,&amp;nbsp; as you have noticed as&lt;BR /&gt;
	n (number of servers) grows this will make the denominator&lt;BR /&gt;
	grow rapidly and this will make (((Ss/A)/n) / (1 -((Ss/A)/n))&lt;BR /&gt;
	smaller, that's good for the response time...&lt;/P&gt;

&lt;P&gt;Now let's look at the other factors in this mathematical&lt;BR /&gt;
	model:&lt;/P&gt;

&lt;P&gt;IF the system is an Intranet, and for example the local&lt;BR /&gt;
	area network Sn is faster than the multiserver, that means:&lt;/P&gt;

&lt;P&gt;We have Sn &amp;gt;&amp;gt; Ss, and that means =&amp;gt; Ss /A &amp;gt;&amp;gt; Ss /A =&amp;gt; that the&lt;BR /&gt;
	Knee in the server side can be reached more quickly than the&lt;BR /&gt;
	Knee in the network node of our Jackson network, so that&lt;BR /&gt;
	the bottleneck becomes the server node.&lt;/P&gt;

&lt;P&gt;In the other hand if:&lt;/P&gt;

&lt;P&gt;Ss &amp;gt;&amp;gt; Sn =&amp;gt; Ss /A &amp;gt;&amp;gt; Sn / A =&amp;gt; the Knee in the M/M/1 network&lt;BR /&gt;
	node can be reached more quickly, so that the network node in&lt;BR /&gt;
	the Jackson network becomes the bottleneck.&lt;/P&gt;

&lt;P&gt;Availability:&lt;/P&gt;

&lt;P&gt;&lt;BR /&gt;
	The demand for high availability and reliability of computer and&lt;BR /&gt;
	software systems has led to a formal verification of such systems.&lt;/P&gt;

&lt;P&gt;There are two principal approaches to formal verification:&lt;BR /&gt;
	model checking and theorem proving.&lt;/P&gt;

&lt;P&gt;And i wrote about Petri Nets and how to model parallel&lt;BR /&gt;
	programs and how to exploit verification tools as Tina to verify&lt;BR /&gt;
	the properties such as liveleness of the system.&lt;/P&gt;

&lt;P&gt;Please take a look at my other article about Petri Nets:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://pages.videotron.com/aminer/PetriNet/formal.htm" target="_blank"&gt;http://pages.videotron.com/aminer/PetriNet/formal.htm&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;And by using Petri Net and Tina you can make your system&lt;BR /&gt;
	more reliable , and if it's more reliable then the system&lt;BR /&gt;
	will have higher availability.&lt;/P&gt;

&lt;P&gt;There are important factors to take into consideration when&lt;BR /&gt;
	building systems, factors such us&amp;nbsp; availability and&lt;BR /&gt;
	efficiency(scalability etc....).&lt;/P&gt;

&lt;P&gt;System availability is also calculated by modeling the system&lt;BR /&gt;
	as an interconnection of parts in series and parallel.&lt;/P&gt;

&lt;P&gt;The availability A&amp;nbsp; of a system is calculated like this&lt;/P&gt;

&lt;P&gt;A =&amp;nbsp; MTBF / (MTBF + MTTR)&lt;/P&gt;

&lt;P&gt;MTBF: Mean time between failure&lt;BR /&gt;
	MTTR :Mean time to repair&lt;/P&gt;

&lt;P&gt;and the MTTR is composed of:&lt;/P&gt;

&lt;P&gt;time to respond to the failure + time to find&lt;BR /&gt;
	the problem + time to correct the problem + time&lt;BR /&gt;
	to verify that the system is working corretly.&lt;/P&gt;

&lt;P&gt;Now if the interconnected parts are parallel , the equation&lt;BR /&gt;
	that we use to calculate the availability is:&lt;/P&gt;

&lt;P&gt;A = 1- (U1 * U2 * U3 * ... * Un)&amp;nbsp; (1)&lt;/P&gt;

&lt;P&gt;Ui: is the non-availability of the component part of the system...&lt;/P&gt;

&lt;P&gt;The availability of a system composed of interconnected parts in&lt;BR /&gt;
	series is:&lt;/P&gt;

&lt;P&gt;A =&amp;nbsp; A1 * A2 * ... *&amp;nbsp; An&amp;nbsp; (2)&lt;/P&gt;

&lt;P&gt;Now as you have noticed i have modeled an enterprise website&lt;BR /&gt;
	as a Jackson network, and i have said before that:&lt;/P&gt;

&lt;P&gt;--&lt;/P&gt;

&lt;P&gt;And of course on Capacity Planning for Enterprise Datacenters&lt;BR /&gt;
	and Websites , you can mirror many computer servers and load&lt;BR /&gt;
	balance between them with a software... to make the system much&lt;BR /&gt;
	FASTER, and this will be modeled as a jackson network like this:&lt;/P&gt;

&lt;P&gt;A -&amp;gt; M/M/n Server Queue -&amp;gt; M/M/1 Network queue -&amp;gt; M/M/1 Client -&amp;gt; A&lt;/P&gt;

&lt;P&gt;A: the arrival rate to the system&lt;/P&gt;

&lt;P&gt;--&lt;/P&gt;

&lt;P&gt;As you have noticed i wrote "FASTER" but i didn't spook&lt;BR /&gt;
	about the AVAILABILITY,&amp;nbsp; you will notice that you can not just&lt;BR /&gt;
	make your system more EFFICIENT and FASTER&amp;nbsp; , but also&lt;BR /&gt;
	you can higher the AVAILABILITY of your system by mirroring&lt;BR /&gt;
	many servers...&lt;/P&gt;

&lt;P&gt;I have also wrote before that:&lt;/P&gt;

&lt;P&gt;---&lt;/P&gt;

&lt;P&gt;"If you have noticed i have tried to show also that one&lt;BR /&gt;
	of the principal objectives is to control and manage&lt;BR /&gt;
	the *Quality* of the system or process, i wrote in my&lt;BR /&gt;
	previous post the following:&lt;/P&gt;

&lt;P&gt;this imply that the T(the average response time in the Jackson&lt;BR /&gt;
	network)&lt;BR /&gt;
	is:&lt;/P&gt;

&lt;P&gt;T = Ni /A = (Nn + Ns + Nc) /A&lt;BR /&gt;
	= (((Ss/A)/n) / (1 -((Ss/A)/n)) + (Sn/A) / (1 -(Sn/A))&lt;BR /&gt;
	+ (Sc/A) / (1 -(Sn/A))) / A&lt;/P&gt;

&lt;P&gt;Now finally we have our mathematical analytic equation&lt;BR /&gt;
	and we can begin to simulate our Enteprise webserver&lt;BR /&gt;
	and also validate the performance data with the fwptt stress&lt;BR /&gt;
	webserver simulation tool...&lt;/P&gt;

&lt;P&gt;So, as you have noticed you can simulate our enterprise&lt;BR /&gt;
	webserver with this mathematical analytical equation and&lt;BR /&gt;
	validate the data collected by fwptt stress webserrer tool&lt;BR /&gt;
	and try to keep T( the average response time of your HTTP requests)&lt;BR /&gt;
	bellow or equal to 5 seconds, and see also if your webserver&lt;BR /&gt;
	is scaling,&amp;nbsp; and we call this also Quality control using OR&lt;BR /&gt;
	(operational research).&lt;/P&gt;

&lt;P&gt;In quality management, quality can also be maintained and&lt;BR /&gt;
	improved through the detection and reduction of process&lt;BR /&gt;
	variation. Where statistical techniques as ANOVA and others&lt;BR /&gt;
	can be used.. "&lt;/P&gt;

&lt;P&gt;---&lt;/P&gt;

&lt;P&gt;We have many mathematical tools that we can use in Quality control,&lt;BR /&gt;
	example: Correlation, Regression , ANOVA etc.&lt;/P&gt;

&lt;P&gt;ANOVA is a powerfull and important mathematic tool in&lt;BR /&gt;
	Quality control , by calculating the p-value in Excel or other&lt;BR /&gt;
	statistical tools , this will give us an important information like&lt;BR /&gt;
	if one or more variables have a significant effect on other&lt;BR /&gt;
	variables. If for example the p-value&amp;nbsp; &amp;lt;=&amp;nbsp; 0.05 (or if F &amp;gt; critical F value)&lt;BR /&gt;
	this imply that the null hypothesis is rejected , and the factor (or factors)&lt;BR /&gt;
	has in fact an effect..&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Regards,&lt;BR /&gt;
	Amine Moulay Ramdane.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 21 Dec 2013 18:42:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/An-M-M-n-queuing-model-simulation/m-p/943660#M5085</guid>
      <dc:creator>aminer10</dc:creator>
      <dc:date>2013-12-21T18:42:34Z</dc:date>
    </item>
  </channel>
</rss>

