- About my previous post... - 1 Update
- cmsg cancel <ncc2ml$ed7$2@dont-email.me> - 6 Updates
- Here my other important mathematical deduction - 1 Update
- An important mathematical deduction - 1 Update
- My final post on my mathematical modeling.. - 1 Update
- The correct calculations - 2 Updates
Ramine <ramine@1.1>: Mar 16 03:10PM -0700 Hello........ About my previous post... As you have noticed my dear Sir/Madam that i am a Moor from Morocco and a programmer and as you have noticed that i have learned more operational research, so you have shown me doing mathematical modeling of ecommerce websites and you have shown me deducing more important facts from mathematical modeling and calculations, but i have come to an important subject, you will see that i have posted my important project called "Parallel implementation of Conjugate Gradient Sparse Linear System Solver library version 1.32", this implementation is scalable on Numa architecture and it's cache-aware and Numa-aware, I have designed also another version, please read about them here: https://sites.google.com/site/aminer68/parallel-implementation-of-conjugate-gradient-sparse-linear-system-solver and this one: https://sites.google.com/site/aminer68/scalable-parallel-implementation-of-conjugate-gradient-linear-system-solver-library-that-is-numa-aware-and-cache-aware I am a programmer who specializes in parallel programming. Thank you, Amine Moulay Ramdane. |
bleachbot <bleachbot@httrack.com>: Mar 16 05:50PM +0100 |
bleachbot <bleachbot@httrack.com>: Mar 16 05:57PM +0100 |
bleachbot <bleachbot@httrack.com>: Mar 16 06:36PM +0100 |
bleachbot <bleachbot@httrack.com>: Mar 16 07:02PM +0100 |
bleachbot <bleachbot@httrack.com>: Mar 16 07:22PM +0100 |
bleachbot <bleachbot@httrack.com>: Mar 16 08:08PM +0100 |
Ramine <ramine@1.1>: Mar 16 02:24PM -0700 Hello....... Here my other important mathematical deduction If you read this book that i have read: Performance by Design: Computer Capacity Planning By Example http://www.amazon.com/Performance-Design-Computer-Capacity-Planning/dp/0130906735 I have said the researcher in this book is using Queuing with Multiple-Class Models to model an ecommerce website, but i have not used his method because i have modeled the M/G/c database servers with anhyper-exponential service and i have approximate it with an M/M/c queue(c: is the number of servers), other than that this book don't learn you as i have learned you that the network of the ecommerce website is limited by the slowest node.. Other than that: I have just read the following page, look at the the USL (Universal Law of Computational Scalability) of Dr. Gunther, he wrote this: (See: http://en.wikipedia.org/wiki/Neil_J._Gunther ) -------------- The relative capacity C(N) of a computational platform is given by: C(N) = N ------------------------------------------ 1 + α (N - 1) + ß N (N - 1) where N represents either the number of physical processors in the hardware configuration or the number of users driving the software application. The parameters α and ß represent respectively the levels of contention (e.g., queueing for shared resources) and coherency delay (i.e., latency for data to become consistent) in the system. The ß parameter also quantifies the retrograde throughput seen in many stress tests but not accounted for in either Amdahl's law or event-based simulations. ---------- His website: http://www.perfdynamics.com/ If you read carefully , you will see that Dr. Gunther is using this model to predict scalability after he simulates a relatively small number of vusers in LoadRunner ( because of licensing costs, it's cost-effective) and after that he finds the coefficients of the 2nd-degree polynomial (quadratic equation) and then transform those coefficients back to the USL parameters using the α = b - a and ß = a. And then he is extrapolating with the USL model to higher loads to predict scalability. Now my question follows: Suppose we have obtained a small number of measured load-points with Loadrunner or others tools, and we calculated the USL equation to predict scalability of a webserver , how the USL model can predict if the scalability/performance is limited by the network bandwidth and not the server ? I think USL can not predict this. So USL don't have the power of the Queuing theory that allows us to deduce more facts that are important such us the network is limited by the slowest node as i have learned you on my previous posts. Thank you, Amine Moulay Ramdane. |
Ramine <ramine@1.1>: Mar 16 02:03PM -0700 Hello...... An important mathematical deduction... I will clear something on my mathematical calculations Since i have mathematically modeled a queuing network in Tandem of ecommerce websites.. I have to tell you something important.. Here is the network of the ecommerce websites: A -> M/G/c database servers queue -> M/M/1 Network queue -> M/M/1 Client -> A So as you have noticed the queues are interconnected in Tandem, so this is good, but notice with me that the last queue that is the M/M/1 Client is usually slower than the M/G/c database servers queue that has an hyper-exponential service and it is usually even slower than the M/M/1 Network queue, so my mathematical calculations have showed that the arrival rate A to the network is limited by the slowest queue that is in my example the M/M/1 Client queue, so since the M/G/c data servers queue is the fastest, so no need to optimize and to speed more the M/G/c data servers queue by adding more servers , and that is a very important thing to know, because this mathematical deduction is infered from an operational law of queuing theory states that: The rate of the jobs leaving any stable node must equal its arrival rate and it is infered from the the Knee of the M/M/1 queue that is equal to 50%, so the best way to optimize and to speed this network is by adding more bandwidth on the slowest queue node like the Client node or the Network node, so be smart and don't forget this advise. Also i have said that: Now i hope you have read my previous post titled: "And here is how to do a simulation of the ecommerce websites" Why i have done this mathematical calculations ? To show you what permit exactly mathematical queuing theory , it permit to do a better QoS , and of course that's easy to understand, but it permit also like in the Amdahl law of parallel computing to model the ecommerce websites and to know how much the ecommerce websites can handle of throughput and loads by taking into account the Knee of the Network queue and the Client queue, and it allows us to change theorically the characteristics of the M/G/c queue of the database servers and the Network queue and the Client queue to be able to do calculations before adding empirically more servers or more bandwidth , so that's optimization and that's good for your pocket. But i have come to an interesting post...because this modeling of an ecommerce website with mathematical Queing theory or simulation is not sufficient, because it's necessary also to know how to limit the number of connected internet users on the webserver to be able to control the waiting time of the internet users to not go beyond a not acceptable waiting time, and it's important to give more priority to the write transactions because that's critical for your pocket, because it makes a company make more money, so my idea to realize this requirement, is to use a FIFO synchonization semaphore for each kind of database transactions such us read , write and delete , and you have to do a calculation of the time that the internet users are waiting by computing it, if the time go beyond an acceptable waiting time you will simply not process those internet users and tell them to try to reexecute there transactions again after a certain time... so, this requirement and my solution that i have added is the right tool to make a better QoS and to make your ecommerce website succeed. Here is the book that i have read about capacity planning with mathematical queuing theory, you have to read it: Performance by Design: Computer Capacity Planning By Example http://www.amazon.com/Performance-Design-Computer-Capacity-Planning/dp/0130906735 But the researcher in this book is using Queing with Multiple-Class Models to model an ecommerce website, but i have not used his method because i have modeled the M/G/c database servers with an hyper-exponential service and i have approximate it with an M/M/c queue , please take a look at my two previous posts that have been corrected and that are titled: "Here is the mathematical calculations of a queuing network" and " I have come to an interesting post" To understand more my mathematical modeling of ecommerce websites etc. Thank you, Amine Moulay Ramdane. |
Ramine <ramine@1.1>: Mar 16 01:36PM -0700 Hello..... The previous calculations are correct... Now can we ask ourselves an important question.. What is the very important thing that this mathematical modeling of a queuing network of an ecommerce website that i have done have showed us ? Here is my answer: You have to know that this mathematical modeling that i have done is very important, because it shows also a very important thing, that the arrival rate is is limited by the Client download bandwidth , since the arrival rate must not go beyond the Knee of 50% of the M/M/1 queue of the Client, so the Network of the ecommerce website that i have modeled is limited by the Client download bandwidth, since an operational law of queuing thery states that: The rate of the jobs leaving any stable node must equal its arrival rate. And here is again all my mathematical modeling that i have corrected: Here is the mathematical modeling of a queuing network that is an ecommerce website and its calculations: So, since the network of the those ecommerce websites consist of queues interconnected in Tandem like this: A -> M/G/c database servers queue -> M/M/1 Network queue -> M/M/1 Client -> A The characteristic of the M/M/1 Network queue is: Download speed of 60 Mbps Upload speed up to 30 Mbps; or 12 Mbps in certain areas I have choosen this, look here: http://affaires.videotron.com/web/small-medium-companies/internet-services/internet-access/fibre-hybrid-60 Upload speed of 30 Mbps is equal to 3.75 Mbytes per second. The characteristic of the Client queue is: Download speed of 10 Mbps Upload speed up to 1.6 Mbps Download speed of 10 Mbps is equal to 1.25 Mbytes. The mean size of the the files transfered is: 100 Kbytes Adding the protocol overhead of 20% to the mean size of the files gives 100 Kbytes * 120% = 120 Kbytes And from the empirical tests on my harddisk , the service rates on each server of the M/M/c queue (c: is the number of servers) of the different database transactions of the ecommerce website such us read,write, delete is: 10266 read transactions per second 2053200 write transactions per second 3422 delete transactions per second. and the percentage of the different transactions of the read,write and delete, is: The read transactions are 70% and the write transactions are 20% and the delete transations are 10% So the first moment that is the mean delay of the service of the M/G/c queue of the database servers is: M1 = 0.70 * (1/10266) + 0.20 * (1/2053200) + 0.10 * (1/3422) so, M1 = 0. 0001 So the service rate of the each server in the M/G/c queue of the database servers queue is 10000 transactions per second. And the service rate in the M/M/1 Network queue is: 32 transactions per second And the service rate in the M/M/1 Client queue is: 10.2 transactions per second. So now we have all the necessary numbers to do our calculation, so since the Knee of the M/M/1 Client queue is at 50% so this will give 10.2 transactions per second * 50% = 5.1 transactions per second. So here is all the network: A -> M/G/c database servers queue -> M/M/1 Network queue -> M/M/1 Client -> A So the arrival rate A must not go beyond the Knee of the Client queue that is 5.1 transactions per second , this is equal to 440640 transactions per day, , and the mean waiting time of the overall Network of queues that is in tandem is equal to: The mean waiting time of the M/M/c database servers queue is: D = Phi^c / Mu*(1 - Phi^c) [2] Phi: is the utilization and Mu: is the the service rate in server queue. Phi = U(Density of circulation) / c (number of servers in the M/M/c queue) This is equal then to: Phi = (5.1 /10000) / c =0.00051 /c , so let's take that c, the number of database servers is 2, so, this is equal to 0.00051 /2 = 0.000255 So, D = 0.000255^2 / (10000*(1- 0.000255^2)) = 0.0000000000065025 seconds The mean response time R = D + 1/Mu = 0.0000000000065025 + 1/10000 = 0.0001 second and the mean waiting time of the M/M/1 Network queue is: D = (Phi/Mu) / (1- Phi) and Phi = Lambda / Mu Lambda is the arrival rate A and Mu is the service rate of the M/M/1 queue. this is equal to: Phi = 5.1 / 32 = 0.159375 D = (0.159375/32) / (1-0.159375) = 0.006 seconds. The mean response time R = D + 1/Mu = 0.006 + 1/32 = 0.04 second and the mean waiting time of the M/M/1 Client queue is: D = (Phi/Mu) / (1- Phi) and Phi = Lambda / Mu Lambda is the arrival rate A and Mu is the service rate of the M/M/1 queue. Phi = 5.1 / 10.2 = 0.5 D = (0.5/10.2) / (1-0.5) = 0.1 seconds. The mean response time R = D + 1/10.2 = 0.1 + 1/10.2 = 0.2 seconds So the total mean response time of the Network is: 0.0001 second of the database servers queue + 0.04 second of the Network queue + 0.2 second of the Client queue , so the total mean response time of the network of queues in Tandem is equal to: 0.24 seconds. So the calculations are good. And here is my explanation of my previous post that i have corrected more: And here is how to do a simulation of the ecommerce websites: You have to read and understand my previous post and after that use my following simulation program of an M/M/n queue: https://sites.google.com/site/aminer68/m-m-n-queuing-model-simulation-with-object-pascal use it to do your overall simulation of the ecommerce websites that have read-mostly workloads, since many ecommerce websites have read-mostly workloads, so the hyper-exponential service of the M/G/c queue of the database servers queue above can be approximated with an M/M/n queue when the writer and the delete transactions are less or equal to 30% of the total transactions and the ecommerce website has read-mostly workloads. So, since the network of the those ecommerce websites are interconnected in a serial manner like this: A -> M/G/c database servers queue -> M/M/1 Network queue -> M/M/1 Client -> A The M in M/G/c means markovian distribution of the arrivals to the M/G/c queue and the G in M/G/c is a general distribution of the service. A is the arrival rate to the network of queues. So you have to do your simulation using my above program for each queue in the network and after than the calculation for the waiting time and response time of the overall network of queues are easy , because your have to add them in a serial manner, since the network of queues are interconnected in a serial manner. And here is again my corrected mathematical modeling of the above case of the ecommerce websites: Here is my ecommerce websites mathematical queuing theory modeling that is good approximation.. Here is the ecommerce website network organized as inter-connected queues in serial manner: A -> M/G/c database servers queue -> M/M/1 Network queue -> M/M/1 Client -> A The M in M/G/c means markovian distribution of the arrivals to the M/G/c queue and the G in M/G/c is a general distribution of the service. A is the arrival rate to the network of queues. M/G/c database server has an hyper-exponential service, i think that to not get into simulation, since many ecommerce websites have read-mostly workloads, the hyper-exponential service of the M/G/c queue of the database servers can be approximated with an M/M/n queue when the writer and the delete transactions are less or equal to 30% of the total transactions and the ecommerce website has read-mostly workloads. And now i will give you the mathematical equations of the M/G/c queue that has an hyper-exponential service that permit us to model a database server, here they are: The mean that is the the mean time of the service of each server of the M/G/c queue is: M1 = p1/a + p2/b + p3/c [1] and the second moment of each server is: M2 = 2*p1/a^2 + 2*p2/b^2 + 2*p3/c^2 and the variance of each queue is: variance = M2 - M1^2 a , b and c are the service rates of the different transactions such us read,write, delete. and p1 , p2 and p3 are the percentage of the transactions. And when you calculate and get M1 you will then calculate the mean service time that is 1/M1 and you will plug it on your M/M/c queue that is an approximation of the M/G/n queue of the database server that has an hyper-exponential service on read-mostly workloads, using the arrival rate. So for the M/M/c queue we have that: A good approximation of waiting time of the M/M/c queue is: D = Phi^c / Mu*(1 - Phi^c) [2] Phi: is the utilization and Mu: is the the service rate in server queue. Phi = U(Density of circulation) / c (number of servers in the M/M/c queue) U = Lambda / Mu Lambda is the arrival rate A to the M/M/c queue and Mu is the service rate of each server of the M/M/C queue. And the response time of the M/M/c queue is: R = D + 1/Mu and the perceived throughput of the M/M/c queue that is Pt = 1/R And the mean number of transactions on the system is: Ns = Lamda*R Lambda is the arrival rate to the M/M/c queue. And the mean number of transactions on the M/M/c waiting queue is: Nq = Lambda*D So from the above equation [1] we get the service rate of each server of the M/M/c queue of the database server that is: 1/M1 so we plug that in equation [2] of the M/M/c queue, so we get: D = Phi^c / ((1/M1)*(1 - Phi^c)) So we get the response time of the M/M/c that is: R = D + 1/(1/M1) => R = D + M1. For the other M/M/1 queues of the Network queue and the client queue we have the following equation: The waiting time of M/M/1 queue is: D = (Phi/Mu) / (1- Phi) and Phi = Lambda / Mu Lambda is the arrival rate A and Mu is the service rate of the M/M/1 queue. And you have to not forget that in the M/M/1 Network queue you have a protocol overhead that is approximatly equal to 20% so you have to multiply the mean size of the files to be transferred on the M/M/1 Network queue by 120% and calculate after that the service rate of the M/M/1 Network queue. And you have to not forget about the Knee of the M/M/c queue of the database server that is equal to 74% and the Knees of the other M/M/1 queues that is equal to 50%. So since the queues of the ecommerce website to be modeled are organized in a serial manner, so the calculations are easy now, so i will let you do the calculations easily now. - I have updated my simulation of my queuing model simulation of an M/M/c queue to version 1.03 , now it works with both Delphi XE and Freepascal compilers , M means markovian and c is the number of servers. Here it is: https://sites.google.com/site/aminer68/m-m-n-queuing-model-simulation-with-object-pascal To do a simulation , just open the file called MMn.pas and you have to change the following: InterArrivals:=TExponentialDistribution.Create(420623,1.0/3.0); ServiceTimes:=TExponentialDistribution.Create(220623,1.0/4.0); The above 1.0/3.0 is the mean delay of the Exponential distribution of the arrivals, you can change it for something else. and 1.0/4.0 is the mean delay of the Exponential distribution of the service of each server of the M/M/c queue, you can change it for something else. And with this simulation you can do easily the simulation of an ecommerce website as i showed you before. - I have come to an interesting post... Now i hope you have read my previous post titled: "And here is how to do a simulation of the ecommerce websites" Why i have done this mathematical calculations ? To show you what permit exactly mathematical queuing theory , it permit to do a better QoS , and of course that's easy to understand, but it permit also like in the Amdahl law of parallel computing to model the ecommerce websites and to know how much the ecommerce websites can handle of throughput and loads by taking into account the Knee of the Network queue and the Client queue, and it allows us to change theorically the characteristics of the M/G/c queue of the database servers and the Network queue and the Client queue to be able to do calculations before adding empirically more servers or more bandwidth , so that's optimization and that's good for your pocket. But i have come to an interesting post...because this modeling of an ecommerce website with mathematical Queing theory or simulation is not sufficient, because it's necessary also to know how to limit the number of connected internet users on the webserver to be able to control the waiting time of the internet users to not go beyond a not acceptable waiting time, and it's important to give more priority to the write transactions because that's critical for your pocket, because it makes a company make more money, so my idea to realize this requirement, is to use a FIFO synchonization semaphore for each kind of database transactions such us read , write and delete , and you have to do a calculation of the time that the internet users are waiting by computing it, if the time go beyond an acceptable waiting time you will simply not process those internet users and tell them to try to reexecute there transactions again after a certain time... so, this requirement and my solution that i have added is the right tool to make a better QoS and to make your ecommerce website succeed. - Here is the book that i have read about capacity planning with mathematical queuing theory, you have to read it: Performance by Design: Computer Capacity Planning By Example http://www.amazon.com/Performance-Design-Computer-Capacity-Planning/dp/0130906735 But the researcher in this book is using Queing with Multiple-Class Models to model an ecommerce website, but i have not used his method because i have modeled the M/G/c database servers with an hyper-exponential service and i have approximate it with an M/M/c queue , please take a look at my two previous posts that have been corrected and that are titled: "Here is the mathematical calculations of a queuing network" and " I have come to an interesting post" To understand more my mathematical modeling of ecommerce websites etc. Thank you, Amine Moulay Ramdane. |
Ramine <ramine@1.1>: Mar 16 12:52PM -0700 Hello, I have made a mistake on my previous calculations, here is the correct calculations: Here is the mathematical modeling of a queuing network that is an ecommerce website and its calculations: So, since the network of the those ecommerce websites consist of queues interconnected in Tandem like this: A -> M/G/c database servers queue -> M/M/1 Network queue -> M/M/1 Client -> A The characteristic of the M/M/1 Network queue is: Download speed of 60 Mbps Upload speed up to 30 Mbps; or 12 Mbps in certain areas I have choosen this, look here: http://affaires.videotron.com/web/small-medium-companies/internet-services/internet-access/fibre-hybrid-60 Upload speed of 30 Mbps is equal to 3.75 Mbytes per second. The characteristic of the Client queue is: Download speed of 10 Mbps Upload speed up to 1.6 Mbps Upload speed of 1.6 Mbps is equal to 200 Kbytes per second. Upload speed of 10 Mbps is equal to 1.25 Mps. The mean size of the the files transfered is: 100 Kbytes Adding the protocol overhead of 20% to the mean size of the files gives 100 Kbytes * 120% = 120 Kbytes And from the empirical tests on my harddisk , the service rates on each server of the M/M/c queue (c: is the number of servers) of the different database transactions of the ecommerce website such us read,write, delete is: 10266 read transactions per second 2053200 write transactions per second 3422 delete transactions per second. and the percentage of the different transactions of the read,write and delete, is: The read transactions are 70% and the write transactions are 20% and the delete transations are 10% So the first moment that is the mean delay of the service of the M/G/c queue of the database servers is: M1 = 0.70 * (1/10266) + 0.20 * (1/2053200) + 0.10 * (1/3422) so, M1 = 0. 0001 So the service rate of the each server in the M/G/c queue of the database servers queue is 10000 transactions per second. And the service rate in the M/M/1 Network queue is: 32 transactions per second And the service rate in the M/M/1 Client queue is: 10.2 transactions per second. So now we have all the necessary numbers to do our calculation, so since the Knee of the M/M/1 Client queue is at 50% so this will give 10.2 transactions per second * 50% = 5.1 transactions per second. So here is all the network: A -> M/G/c database servers queue -> M/M/1 Network queue -> M/M/1 Client -> A So the arrival rate A must not go beyond the Knee of the Client queue that is 5.1 transactions per second , this is equal to 440640 transactions per day, , and the mean waiting time of the overall Network of queues that is in tandem is equal to: The mean waiting time of the M/M/c database servers queue is: D = Phi^c / Mu*(1 - Phi^c) [2] Phi: is the utilization and Mu: is the the service rate in server queue. Phi = U(Density of circulation) / c (number of servers in the M/M/c queue) This is equal then to: Phi = (5.1 /10000) / c =0.00051 /c , so let's take that c, the number of database servers is 2, so, this is equal to 0.00051 /2 = 0.000255 So, D = 0.000255^2 / (10000*(1- 0.000255^2)) = 0.0000000000065025 seconds The mean response time R = D + 1/Mu = 0.0000000000065025 + 1/10000 = 0.0001 second and the mean waiting time of the M/M/1 Network queue is: D = (Phi/Mu) / (1- Phi) and Phi = Lambda / Mu Lambda is the arrival rate A and Mu is the service rate of the M/M/1 queue. this is equal to: Phi = 5.1 / 32 = 0.159375 D = (0.159375/32) / (1-0.159375) = 0.006 seconds. The mean response time R = D + 1/Mu = 0.006 + 1/32 = 0.04 second and the mean waiting time of the M/M/1 Client queue is: D = (Phi/Mu) / (1- Phi) and Phi = Lambda / Mu Lambda is the arrival rate A and Mu is the service rate of the M/M/1 queue. Phi = 5.1 / 10.2 = 0.5 D = (0.5/10.2) / (1-0.5) = 0.1 seconds. The mean response time R = D + 1/10.2 = 0.1 + 1/10.2 = 0.2 seconds So the total mean response time of the Network is: 0.0001 second of the database servers queue + 0.04 second of the Network queue + 0.2 second of the Client queue , so the total mean response time of the network of queues in Tandem is equal to: 0.24 seconds. So the calculations are good. And here is my explanation of my previous post that i have corrected more: And here is how to do a simulation of the ecommerce websites: You have to read and understand my previous post and after that use my following simulation program of an M/M/n queue: https://sites.google.com/site/aminer68/m-m-n-queuing-model-simulation-with-object-pascal use it to do your overall simulation of the ecommerce websites that have read-mostly workloads, since many ecommerce websites have read-mostly workloads, so the hyper-exponential service of the M/G/c queue of the database servers queue above can be approximated with an M/M/n queue when the writer and the delete transactions are less or equal to 30% of the total transactions and the ecommerce website has read-mostly workloads. So, since the network of the those ecommerce websites are interconnected in a serial manner like this: A -> M/G/c database servers queue -> M/M/1 Network queue -> M/M/1 Client -> A The M in M/G/c means markovian distribution of the arrivals to the M/G/c queue and the G in M/G/c is a general distribution of the service. A is the arrival rate to the network of queues. So you have to do your simulation using my above program for each queue in the network and after than the calculation for the waiting time and response time of the overall network of queues are easy , because your have to add them in a serial manner, since the network of queues are interconnected in a serial manner. And here is again my corrected mathematical modeling of the above case of the ecommerce websites: Here is my ecommerce websites mathematical queuing theory modeling that is good approximation.. Here is the ecommerce website network organized as inter-connected queues in serial manner: A -> M/G/c database servers queue -> M/M/1 Network queue -> M/M/1 Client -> A The M in M/G/c means markovian distribution of the arrivals to the M/G/c queue and the G in M/G/c is a general distribution of the service. A is the arrival rate to the network of queues. M/G/c database server has an hyper-exponential service, i think that to not get into simulation, since many ecommerce websites have read-mostly workloads, the hyper-exponential service of the M/G/c queue of the database servers can be approximated with an M/M/n queue when the writer and the delete transactions are less or equal to 30% of the total transactions and the ecommerce website has read-mostly workloads. And now i will give you the mathematical equations of the M/G/c queue that has an hyper-exponential service that permit us to model a database server, here they are: The mean that is the the mean time of the service of each server of the M/G/c queue is: M1 = p1/a + p2/b + p3/c [1] and the second moment of each server is: M2 = 2*p1/a^2 + 2*p2/b^2 + 2*p3/c^2 and the variance of each queue is: variance = M2 - M1^2 a , b and c are the service rates of the different transactions such us read,write, delete. and p1 , p2 and p3 are the percentage of the transactions. And when you calculate and get M1 you will then calculate the mean service time that is 1/M1 and you will plug it on your M/M/c queue that is an approximation of the M/G/n queue of the database server that has an hyper-exponential service on read-mostly workloads, using the arrival rate. So for the M/M/c queue we have that: A good approximation of waiting time of the M/M/c queue is: D = Phi^c / Mu*(1 - Phi^c) [2] Phi: is the utilization and Mu: is the the service rate in server queue. Phi = U(Density of circulation) / c (number of servers in the M/M/c queue) U = Lambda / Mu Lambda is the arrival rate A to the M/M/c queue and Mu is the service rate of each server of the M/M/C queue. And the response time of the M/M/c queue is: R = D + 1/Mu and the perceived throughput of the M/M/c queue that is Pt = 1/R And the mean number of transactions on the system is: Ns = Lamda*R Lambda is the arrival rate to the M/M/c queue. And the mean number of transactions on the M/M/c waiting queue is: Nq = Lambda*D So from the above equation [1] we get the service rate of each server of the M/M/c queue of the database server that is: 1/M1 so we plug that in equation [2] of the M/M/c queue, so we get: D = Phi^c / ((1/M1)*(1 - Phi^c)) So we get the response time of the M/M/c that is: R = D + 1/(1/M1) => R = D + M1. For the other M/M/1 queues of the Network queue and the client queue we have the following equation: The waiting time of M/M/1 queue is: D = (Phi/Mu) / (1- Phi) and Phi = Lambda / Mu Lambda is the arrival rate A and Mu is the service rate of the M/M/1 queue. And you have to not forget that in the M/M/1 Network queue you have a protocol overhead that is approximatly equal to 20% so you have to multiply the mean size of the files to be transferred on the M/M/1 Network queue by 120% and calculate after that the service rate of the M/M/1 Network queue. And you have to not forget about the Knee of the M/M/c queue of the database server that is equal to 74% and the Knees of the other M/M/1 queues that is equal to 50%. So since the queues of the ecommerce website to be modeled are organized in a serial manner, so the calculations are easy now, so i will let you do the calculations easily now. - I have updated my simulation of my queuing model simulation of an M/M/c queue to version 1.03 , now it works with both Delphi XE and Freepascal compilers , M means markovian and c is the number of servers. Here it is: https://sites.google.com/site/aminer68/m-m-n-queuing-model-simulation-with-object-pascal To do a simulation , just open the file called MMn.pas and you have to change the following: InterArrivals:=TExponentialDistribution.Create(420623,1.0/3.0); ServiceTimes:=TExponentialDistribution.Create(220623,1.0/4.0); The above 1.0/3.0 is the mean delay of the Exponential distribution of the arrivals, you can change it for something else. and 1.0/4.0 is the mean delay of the Exponential distribution of the service of each server of the M/M/c queue, you can change it for something else. And with this simulation you can do easily the simulation of an ecommerce website as i showed you before. - I have come to an interesting post... Now i hope you have read my previous post titled: "And here is how to do a simulation of the ecommerce websites" Why i have done this mathematical calculations ? To show you what permit exactly mathematical queuing theory , it permit to do a better QoS , and of course that's easy to understand, but it permit also like in the Amdahl law of parallel computing to model the ecommerce websites and to know how much the ecommerce websites can handle of throughput and loads by taking into account the Knee of the Network queue and the Client queue, and it allows us to change theorically the characteristics of the M/G/c queue of the database servers and the Network queue and the Client queue to be able to do calculations before adding empirically more servers or more bandwidth , so that's optimization and that's good for your pocket. But i have come to an interesting post...because this modeling of an ecommerce website with mathematical Queing theory or simulation is not sufficient, because it's necessary also to know how to limit the number of connected internet users on the webserver to be able to control the waiting time of the internet users to not go beyond a not acceptable waiting time, and it's important to give more priority to the write transactions because that's critical for your pocket, because it makes a company make more money, so my idea to realize this requirement, is to use a FIFO synchonization semaphore for each kind of database transactions such us read , write and delete , and you have to do a calculation of the time that the internet users are waiting by computing it, if the time go beyond an acceptable waiting time you will simply not process those internet users and tell them to try to reexecute there transactions again after a certain time... so, this requirement and my solution that i have added is the right tool to make a better QoS and to make your ecommerce website succeed. - Here is the book that i have read about capacity planning with mathematical queuing theory, you have to read it: Performance by Design: Computer Capacity Planning By Example http://www.amazon.com/Performance-Design-Computer-Capacity-Planning/dp/0130906735 But the researcher in this book is using Queing with Multiple-Class Models to model an ecommerce website, but i have not used his method because i have modeled the M/G/c database servers with an hyper-exponential service and i have approximate it with an M/M/c queue , please take a look at my two previous posts that have been corrected and that are titled: "Here is the mathematical calculations of a queuing network" and " I have come to an interesting post" To understand more my mathematical modeling of ecommerce websites etc. Thank you, Amine Moulay Ramdane. |
Ramine <ramine@1.1>: Mar 16 12:58PM -0700 Hello, I correct: Download speed of the client is: 10 Mbps is equal to 1.25 Mbytes. Thank you, Amine Moulay Ramdane. |
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page. To unsubscribe from this group and stop receiving emails from it send an email to comp.programming.threads+unsubscribe@googlegroups.com. |
No comments:
Post a Comment