Professional Documents
Culture Documents
Database Workloads in
the Cloud
Our services and software solutions unleash the power of cloud, data and analytics to drive better
business outcomes for our clients.
Our 20 years in data, commitment to hiring the best talent, and our deep technical and business expertise
allow us to meet our promise of using technology to deliver the best outcomes faster.
This stuff
is real!
A Sample Environment
Estate includes
• Various 2, 3, and 4-node
RAC configurations
• Multiple single-instance
DBs
• Some one per server,
others with multiple DBs
per server
• Data Guard replication
What is he
Yes Sir!
talking
Org chart
about ?
coming up
One
INSTANCE-GROUP (App1, Batch1) region
• Additional considerations:
• Network IOPs and throughput
• Financial Costs
© Pythian Services Inc., 2019 27
Three Significant Measurable Resources
• Additional considerations:
• Network IOPs and throughput
• Financial Costs
© Pythian Services Inc., 2019 28
Provide Some Room for
Growth and Unknowns …
But not too much!
Requirements – Database to Server Re-alignment
• For each resource need to determine what is actually required:
• Existing systems may be over-provisioned, under-provisioned, or right-sized
• A simple stacking approach will almost certainly lead to over-provisioned cloud
infrastructure at an unnecessarily high financial cost
• Is consolidation desired?
• Similar but more limited data collection available if access to AWR is not licensed
(or if running Standard Edition)
RAC : instance = -1
Reference sources:
Text: https://en.wikipedia.org/wiki/Knapsack_problem
Note 1: If we are not wasting anything, VMUSAGE will be infinite. So we can put a boundary condition for that in our code. That is the
reason for the “if” caveat.
Note 2: It does not have to be this way all the time! We could be solving for a VMUSAGE calculated differently.
© Pythian Services Inc., 2019 43
2. For the Given VM Type – Which Databases?
• Classical Bin packing problem – explanation and sample Python code:
• Based on the Google OR-Tools collection of libraries and APIs:
https://developers.google.com/optimization/bin/knapsack
• Observations: This is the resources that each DB utilizes from the capacities
• Choosing IOPS, MBPS, VCPU, SGA as the four resources that each DB will use from the VM
• Sourced from our AWR mining script outputs. Notice we did not include the data disk size which is not
affected by the VM type that we select
• Capacities: The VM has fixed limits for IOPS, MBPS, VCPU, SGA
• The values in the capacities table allowing for a little bit of overhead for growth
• The dbsallocated array shows the “indexes” of the selected databases, which
we can now use to get the rest of the details from the databases table.
• The Solver goes through all of the possible permutations to find the optimal
configuration
• The VMUSAGE reports very different values for all VM types, higher numbers are
better!
48 195
● The VM type hm-64 hosts the first four databases (APP, BATCH, DW, REPO)
• Using the Google OR-Tools toolkit, data mined from the Oracle AWR and
ASH, and some simple Python code, we can develop a future-state
configuration based on our cloud provider’s VM shapes
dutt@pythian.com
pane@pythian.com