利用USL預(yù)測(cè)MySQL數(shù)據(jù)庫(kù)可伸縮性_第1頁(yè)
利用USL預(yù)測(cè)MySQL數(shù)據(jù)庫(kù)可伸縮性_第2頁(yè)
利用USL預(yù)測(cè)MySQL數(shù)據(jù)庫(kù)可伸縮性_第3頁(yè)
利用USL預(yù)測(cè)MySQL數(shù)據(jù)庫(kù)可伸縮性_第4頁(yè)
利用USL預(yù)測(cè)MySQL數(shù)據(jù)庫(kù)可伸縮性_第5頁(yè)
已閱讀5頁(yè),還剩15頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、利用USL預(yù)測(cè)MySQL數(shù)據(jù)庫(kù)可伸縮性Forecast MySQL Scalability with USLLinear Scalability?What is Scalability?the capability of a system, network, or process to handle a growing amount of work, or its potential to be enlarged in order to accommodate that growthScalability is function.Scalability LawLittles Law (1961

2、)Amdahls Law(1967)Gustafsons Law (1988)Universal Scalability Law (1993)Queueing theory服務(wù)請(qǐng)求量=到達(dá)率 * 駐留時(shí)間(響應(yīng)時(shí)間)隊(duì)列度=到達(dá)率 * 等待時(shí)間利用率=到達(dá)率 * 服務(wù)時(shí)間Amdahls LawN = Processor= Contention (串行化比率)If an amount of work N is completed in time T 1 on a uniprocessor, the same amount of work can be completed in time T p

3、T 1 on a p-way multiprocessor. The speedup S p = T 1 /T p is one measure of scalability.Gustafsons Law負(fù)載擴(kuò)展至n個(gè)節(jié)點(diǎn)Amdahls LawAmdahls law assumes the size of the work is fixed. Gustafsons modification is based on the idea of scaling up the size of the work to match p.USLThe USL is equivalent to the sync

4、hronous queueing bound on throughput for a linear load-dependent machine repairman model of a multiprocessor.N = Concurrency (or Processor) = Contention ( waiting for shared resources ) = Coherency ( waiting data synchronous )A General Theory of Computational Scalability Based on Rational FunctionsU

5、SL(2)(1)(3)(4)(5)Standard MRM在有限的p個(gè)機(jī)器的產(chǎn)線,每作Z段時(shí)間就有機(jī)器故障,需要花費(fèi)S段時(shí)間修復(fù),如果多個(gè)機(jī)器故障按FIFO順序修復(fù)。Scalability Model Linear Scalability Cost of sharing resources Diminishing returns from contention Negative returns from incoherencyScalability ZonesContention & CoherencyContention ()Coherency ()含義共享數(shù)據(jù)的爭(zhēng)用一致性的開銷舉例不同請(qǐng)求

6、更新相同數(shù)據(jù)行內(nèi)存與磁盤間或不同CPU的 緩存間的一致性根源無(wú)法并行的任務(wù)進(jìn)程間同步的開銷自變量N-1: 假設(shè)需要處理N個(gè)進(jìn)程,最壞場(chǎng)景下有N-1個(gè) 進(jìn)程在等待N*(N-1): 假設(shè)需要處理N個(gè)進(jìn) 程, 每個(gè)進(jìn)程間要與N-1個(gè)進(jìn) 程同步,即N*(N-1)PredictPredict maximum scalabilityPredict throughput Xmax at load NmaxDB Capacity Planning基準(zhǔn)測(cè)試估計(jì)容量(時(shí)間和成本)沒有完整數(shù)據(jù)庫(kù)的負(fù)載組成信息無(wú)法準(zhǔn)確度量事務(wù)的執(zhí)行時(shí)間Step to Apply USL選擇度量參數(shù)Load: QPS/TPSConcu

7、rrency: Thread_running(MySQL)搜集數(shù)據(jù)mysqladmin-i1 ext |awk BEGINprintf %5s %5sn, conn,tput / Threads_running/run=$4/Queries/q=$4-qp;qp=$4;printf %5d %5dn, q, run整理數(shù)據(jù)擬合數(shù)據(jù)分析結(jié)果Examplesample - read.csv(“8003.tput,sep=)usl - nls(tput conn/(1+sigma * (conn-1)+ conn*(conn-1),sample,start=c(sigma=0.1,kappa=0.0

8、1)sigma - coef(usl)sigma kappa - coef(usl)kappau=function(x)y=x/(1+sigma * (x-1)+ kappa*x*(x -1)plot(u,0,max(benchmark$conn)*2,xlab=“Concurrency,col=green, ylab=Throughput, lty=“dashed,add=TRUE)points(benchmark$conn,benchmark$tput)https:/kevinbin.shinyapps.io/uslapp/ConclusionsScalability 是可以被量化的線性擴(kuò)展意味著資源翻倍,負(fù)載也翻倍資源垂直擴(kuò)展不意味處性能增加,關(guān)鍵是串行化。即便極小Coherency也會(huì)使Scalability倒退具備良好Scalability的系統(tǒng)應(yīng)盡可能避免Contention和CoherencyReferenceHow to Quantify Scalability (Neil J. Gunther)Getting in the Zone for Successful ScalabilityUSL for R packageA Little Triplet

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論