版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
ProtectingCriticalOLTPWorkloadsinaMixedWorkload
Environment
在混合负载环境中提供可靠的OLTP服务Agenda12345Typesof
WorkloadsChallengesofMixedWorkloadsWaystoManageMixedWorkloadsDemoLessons
LearnedAgenda12345Typesof
WorkloadsChallengesofMixedWorkloadsWaystoManageMixedWorkloadsDemoLessons
LearnedWorkload
CharacteristicsOLTPManyconcurrentusersSQLstatementsprocessafewrowsata
timeAnalyticalQueriesFewerconcurrentusersData-intensivequeriesprocessingmanyrowsDataLoadingandProcessingFewerconcurrentprocessesDMLprocessingmany
rowsAgenda12345Typesof
WorkloadsChallengesofMixedWorkloadsWaystoManageMixedWorkloadsDemoLessons
LearnedCompetitionfor
ResourcesCPUMemoryNetworkStorageMemoryAvoidcompetingfor
memoryCompetingformemoryends
badlyNetworkand
StorageOracleusesCPUwhenperformingnetworkandstorage
I/OLimitingCPUnaturallylimitsnetworkandstorage
I/OFocuson
CPUCPUResourcesandOLTP
WorkloadsAsCPUUtilizationincreases,thechanceofaprocessgettingscheduledonCPUdecreasesThishasanoticeableimpactonOLTPperformance
at60-70%CPU
utilizationCPUUtilizationChanceofgettingscheduled50%1in
266%1in
380%1in
590%1in
10TheMixedWorkloadDilemma—Opposingresourcemanagement
goalsWorkloadGoalCPU
StrategyOLTPFastResponse
TimeMinimizeAnalytical
QueriesThroughputandResponseTimeMaximizeData
ProcessingThroughputMaximizeAgenda12345Typesof
WorkloadsChallengesofMixedWorkloadsWaystoManageMixedWorkloadsDemoLessons
LearnedWaystoManageMixed
WorkloadsMultiple
DatabasesVirtualMachinesInstance
CagingMultitenantSingle
DatabaseRAC
ServicesDatabaseResource
ManagerMultipleDatabases:Virtual
MachinesAllocate
virtualmachines
foreach
workloadWorkloadscannotusemorethanallocatedCPUsServerQueryVM18
CPUsOLTPVM24
CPUsETLVM6
CPUsMultipleDatabases:Instance
CagingUseinstancecagingtocontrolthenumberofprocesseson
CPUUsetheCPU_COUNTparameterto
controlEnableaDatabaseResourceManager
planServerQueryCPU_COUNT=18OLTPCPU_COUNT=24ETLCPU_COUNT=6ServerMultipleDatabases:
MultitenantEnablea
CDBresource
planUse
instancecagingtolimit
CPUofindividual
PDBsOruseShares
orLimitsQueryPDBCPU_COUNT=18ETLPDBCPU_COUNT=6OLTPPDBCPU_COUNT=24SingleDatabase:RAC
ServicesUseservicesfordifferentworkloadsMapservicesfordifferentworkloadstodifferentnodesina
clusterOLTPNodeQueryNodeETLNodeServerSingleDatabase:DBRMConsumer
GroupsCreatea
DBRMplanMapworkloads
todifferent
consumergroupsUseShares
orLimitsOLTPQueryETLDatabaseResource
ManagerSharesDivideresourcesbetweenworkloadsusing
ratiosLimitsSethardlimitsonCPUutilizationforeachworkloadParallelQueuingControlthenumberofPXprocessesusedby
eachThesecanbecombinedtodevelopamoresopwhoirsktloicadatedCPUutilization
strategySharesOLTP
BusyQuery
BusyBothBusyOLTPQueryWorkloadSharesOLTP7Queries3Total10OLTPQueryOLTPQueryLimitsOLTP
BusyQuery
BusyBothBusyOLTPQueryOLTPQueryOLTPQueryWorkloadLimitsOLTPQueries30%Agenda12345Typesof
WorkloadsChallengesofMixedWorkloadsWaystoManageMixedWorkloadsDemoLessons
LearnedDemo
WorkloadsOLTPLotsofusersplayingonlinegamesShorttransactiontimesSensitivetohighserverCPUutilizationThisistheworkloadwewantto
protectQueries16usersrunninganalyticalquerieswhichtakeafewseconds
eachParallelexecutionwithparalleldegree
8SomequeriesperformtablescansfromdiskandsomescansarefrommemoryETLSingleuserperforminganELT
strategyLoad
Data2. RemoveduplicatesTransformationsAggregationParallelexecutionwithparalleldegree
24OLTP
WorkloadWecancontroltheworkloadbychangingThink
TimeDecreasingThinkTimeincreasesdemandIncreasingThinkTimedecreases
demand4000msrepresentslow
demand500msrepresentsexpectedpeak
demandStarttheOLTPworkload,setting
ThinkTimeto4000ms,representinglow
demandAbout9000transactionspersecondwithOLTPCPUisabout
3%Sub-millisecondresponsetimeinthedatabase12341. AdjustThinkTimeto2000
ms,representing
mediumdemanddoublesTPSdoublesOLTP
CPUResponsetimeinthedatabaseisalmostunchanged12341. AdjustThinkTimeto1000ms,representing
highdoublesdoublesdemandTPSOLTP
CPUResponsetimeinthedatabaseremainssub-millisecond1234AdjustThinkTimeto500ms,representingpeakdemandTPSdoublesOLTPCPUdoublesResponsetimeinthedatabasealsoincreases1324AdjustThinkTimeto400ms
tocheckforheadroomTPSincreasesOLTPCPUincreasesResponsetimeinthedatabasealsoincreases13241. ApplicationTimeindicatesresponsetimeinthedatabaseplustimewaitingforaconnection.Thereisashortspikeinwaitingforaconnectionwhendemandincreases.1Adjust
ThinkTimeto333mstocheckforheadroomTPSincreasesOLTPCPUincreasesResponsetimeinthedatabasealsoincreases13241. Somewaitingforconnectionsisnowpresentatalltimes,degradingoverallresponsetimes1Query
WorkloadWecancontroltheworkloadbychangingUsersIncreasingUsersincreasesdemandDecreasingUsersdecreases
demand1
Userrepresentslow
demand8Usersrepresentsexpectedpeak
demand1. ResetThink
Timeto
4000ms
torepresentlowdemand2. About9000transactionspersecondwith3. OLTPCPUis
about3%4. Sub-millisecondresponsetimeinthedatabase1234StarttheQueryworkload,settingUsersto1,representinglowdemandOLTPthroughputisunchangedQueryCPUisaround10%Sub-millisecondresponsetimeinthedatabase12341. AdjustUsersto
8,representing
peakdemand2. OLTPthroughputisunchanged3. Query
CPUis
around40%4. Responsetimein
thedatabaseincreases13241. AdjustParallelServersTargetto
162. OLTPthroughputisunchanged3. Query
CPUis
around10%4. Responsetimeinthedatabaseimproves1234ETL
WorkloadWecancontroltheworkloadbychangingDegreeofParallelism
(DoP)IncreasingDoPincreasesdemandDecreasingDoPdecreases
demandDegreeofParallelismof24representsexpected
demand1. ResetParallelServersTarget
to25611. Start
theETLworkload,setting
DoPto
24,representingexpecteddemand2. OLTPthroughputisunchanged3. ETLCPU
isaround25%4. Responsetimein
thedatabaseincreases1324IncreasingTheDemandFor
OLTPWecancontroltheOLTPworkloadbychangingThink
TimeDecreasingThinkTimeincreasesdemandIncreasingThinkTimedecreases
demand4000msrepresentslow
demand500msrepresentsexpectedpeak
demandAdjustThinkTimeto2000
ms,representingmediumdemandTPSdoublesOLTPCPUdoublesResponsetimeinthedatabaseincreases1324AdjustThinkTimeto1000ms,representinghighdemandTPSdoublesOLTPCPUdoublesResponsetimeinthedatabaseincreases211324AdjustThinkTimeto1000ms,representinghighdemandTPSdoublesOLTPCPUdoublesResponsetimeinthedatabaseincreases13241. Adjust
ThinkTimeto
500ms,representingexpectedpeak
demand2. TPS
increasesalittle
butbecomeserraticincreasesOLTP
CPUResponsetimein
thedatabaseincreases13241. Significantwaitingforconnectionsisnowpresent
atalltimes,degradingoverallresponsetimes1EnablingDatabaseResource
ManagerWecanreducecompetitionforCPUbyenablingDatabaseResource
ManagerLimittheCPUutilizationforQueryLimittheCPUutilizationforETLIncreasetheCPUavailablefor
OLTP1.
EnableDatabaseResourceManager,limitingQuery
to15%
CPUandlimitingETL
toTPS10%
CPUincreasesOLTPCPUincreases4. Responsetime
inthedatabaseimproves112341. Waitingforconnectionsissignificantlyreduced,dramaticallyimprovingoverallresponsetimes1IncreasingCompetitionFor
CPUWecanincreasecompetitionforCPUbyincreasingthelimitsonCPU
utilizationIncreasingthelimitonCPUutilizationforQueryincreasescompetitionIncreasingthelimitonCPUutilizationforETLincreasescompetitionIncreasingCPUutilizationmaydegradeOLTP
performanceIncreaseLimitonQueryto20%
CPUTPSisunchangedOLTPCPUisabout
thesameResponsetimeinthedatabaseincreasesa
little12341. Waitingforconnectionsincreasesa
little1IncreaseLimitonQueryto25%
CPUTPSbecomeserraticOLTPCPUisabout
thesameResponsetimeinthedatabaseincreases13241. Waitingforconnectionsisnowpresent
atalltimes,degradingoverallresponsetimes1DecreasingCompetitionFor
CPUWecandecreasecompetitionforCPUbydecreasingthelimitsonCPU
utilizationDecreasingthelimitonCPUutilizationforQuerydecreasescompetitionDecreasingthelimitonCPUutilizationforETLdecreasescompetitionDecreasingCPUutilizationmayimproveOLTP
performanceWecancheckforheadroombychangingThink
TimeDecreasingThinkTimeincreases
demandDBRMcanlimitthecompetitionforCPUduetoQueryand
ETL1. ResetLimitonQueryto15%
CPU11. Waitingforconnectionsissignificantlyreduced,improvingoverallresponsetimes11. Adjust
ThinkTimeto
400mstocheckfor2.TPSheadroomincreasesbut
becomeserraticincreasesOLTP
CPUResponsetimein
thedatabasealsoincreases
alittle13241. Significantwaitingforconnectionsisnowpresentatalltimes,degradingoverallresponsetimes.
Thereislittleheadroomforincreaseddemandfrom
OLTP.11. ReduceLimitonQueryto10%
CPUandLimit
onETLto
5%CPUTPSisconsistentOLTP
CPUincreases
alittle4. Responsetimein
thedatabaseimproves
alittle123411. Waitingforconnectionsissignificantlyreduced,dramaticallyimprovingoverallresponsetimes1ReduceLimitonQueryto5%
CPUTPSisconsistentOLTPCPUisaboutthesameResponsetimeinthedatabaseimproves
alittle12341. Waitingforconnectionsisreduced,improvingoverallresponsetimes1Agenda12345Typesof
WorkloadsChallengesofMixedWorkloadsWaystoManageMixedWorkloadsDemoLessons
LearnedHowDoYouDeterminetheWorkloadCPU
Limits?1. DonotlimitthecriticalOLTP
workloadDeterminethepeakOLTPCPU
Utilization%by
itselfUseasimpleformulatoestimatetheCPUavailableforother
workloads60~70–((OLTPCPU%)*1.3)=CPU
forothersExampleOLTPpeakCPUUtilizationis30%by
itselfLower
limit60–((30*1.3)=Otherworkloadscanuseupto~20%
CPUUpper
limit70–((30*1.3)=Otherworkloadscanuseupto~30%
CPULessons
Learned1. NeedtolimitsystemCPUutilizationtoprotectOLTP
workloadsAvoidCPUcontentionfromotherworkloadsLimitsgiveyouthehighestdegreeofcontrolResourceManagementwithParallelExecution曲卓
(
Christine
)邱翔虎
(Calvin)Waystolimitthe
DoPResource
ManagerTheMaxDoPsettinglimitstheDoPfora
consumergroupPARALLEL_DEGREE_LIMITThisparameterlimitstheDoPwhenusingAuto
DoPWaystocontrolsystemresourceswithparallelexecutionparallel_adaptive_multi_userReducesDoPbasedonsystem
loadUsuallyreducesDoPtoomuch—recommendsettingto
FALSEParallelstatement
queuingCreatesaFIFOqueueforparallel
statementsMakeSQLstatementswaitforpxresourcestobecomeavailablebeforeexecutionstartsinsteadofallowingSQLstatementstorunwithinsufficientpx
resourcesWhenalloftheparallelserverprocessesinthepoolareinuse,statements
queueTheBasicsofParallel
ExecutionParallelexecutionisusedtoreducetheexecutiontimeof
queriesMultipleprocessesworktogethertousemoreresourcesonthesystem,suchasCPUand
IOAsimpleconfigurationshouldbeused
todeterminethe
DoPCoordinateparallelparametersAvoidusinghintsandalter
sessionAresourcemanagementpolicyisneededwhenusing
parallelexecutionTokeepthesystemunder
controlstatementsareabletoexecutein
parallelCTopyoright
©e20n19Osracule
arnde/or
itsSaffQiliatesL.AvailablePXprocessesdefinedbythefollowingparameterswhicharedefinedper
instanceparallel_min_servers=32parallel_max_servers=64Bydefault,PXserverswillbeallocatedforparallelSQLandifallPXserversare
busy75PXWorkloadwithNoResource
ManagementPXWorkloadwithNoResource
ManagementQuery72StatusRequested
DoPPXAllocatedExecution
DoPPXWorkloadwithNoResource
ManagementQuery73StatusRequested
DoPPXAllocatedExecution
DoPARunning8168PXWorkloadwithNoResource
ManagementQuery74StatusRequested
DoPPXAllocatedExecution
DoPARunning8168BRunning122412PXWorkloadwithNoResource
ManagementQuery75StatusRequested
DoPPXAllocatedExecution
DoPARunning8168BRunning122412CRunning8168PXWorkloadwithNoResource
ManagementQuery76StatusRequested
DoPPXAllocatedExecution
DoPARunning8168BRunning122412CRunning8168DRunning1284PXWorkloadwithNoResource
ManagementQuery77StatusRequested
DoPPXAllocatedExecution
DoPARunning8168BRunning122412CRunning8168DRunning1284ERunning3201parallel_min_serversandparallel_max_serversstilldefinethenumberofpxserversavailablefor
executionparallel_servers_target
definesthepoolofpxserversavailableforSQLstatementsinthe
queuePXWorkloadwithResource
Management78PXWorkloadwithParallelStatement
QueuingQuery79StatusRequested
DoPPXAllocatedExecution
DoPA 8PXWorkloadwithParallelStatement
QueuingQuery80StatusRequested
DoPPXAllocatedExecution
DoPARunning8168PXWorkloadwithParallelStatement
QueuingQuery81StatusRequested
DoPPXAllocatedExecution
DoPARunning8168BRunning122412PXWorkloadwithParallelStatement
QueuingQuery82StatusRequested
DoPPXAllocatedExecution
DoPARunning8168BRunning122412
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 探秘IL-6对滋养细胞侵袭力的调控机制及信号转导网络
- 2025年高空作业安全培训冲刺试卷及答案
- 楼梯踏步施工技术交底三篇
- 北师大版五年级上册数学期末测试卷含答案
- 2026年大庆医学高等专科学校单招职业倾向性测试题库附答案详解(综合卷)
- 2026年宁波幼儿师范高等专科学校单招职业倾向性考试题库含答案详解(培优a卷)
- 2026年大兴安岭职业学院单招综合素质考试题库附答案详解(夺分金卷)
- 2026年大庆医学高等专科学校单招职业倾向性测试题库附参考答案详解(a卷)
- 2026年天津滨海职业学院单招职业倾向性考试题库含答案详解(b卷)
- 2026年宁德师范学院单招职业倾向性测试题库及答案详解(名师系列)
- 《国际市场推广-国际化课程》课件-项目六:海外社交媒体营销
- GB/T 47064-2026温室气体产品碳足迹量化方法与要求钢铁产品
- 2026年内蒙古民族幼儿师范高等专科学校单招综合素质考试题库附参考答案详解(a卷)
- 2026年春季人教PEP版四年级下册英语全册教案(含教学计划)
- 集中公寓运营管理制度
- 上海市普陀区2026届初三一模语文试题(含答案)
- 2025年金融科技产品设计与运营指南
- 国企投融资培训课件模板
- 2026年湖南高速铁路职业技术学院单招职业倾向性测试模拟测试卷必考题
- 2025年重庆市政府采购评审专家考试真题含答案
- 2026年辽宁轻工职业学院单招职业适应性考试题库附答案解析
评论
0/150
提交评论