Scaling Up and Out Your Virtualized SQL Servers
-
Upload
fortifieddb -
Category
Data & Analytics
-
view
90 -
download
1
Transcript of Scaling Up and Out Your Virtualized SQL Servers
SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
About Ben DeBow• CEO Fortified Data
• Working with SQL Server for 20yrs
• Author, speaker, and consultant focusing on Performance, Scalability, and Availability
• E-mail: [email protected]
• Twitter: @BBQSQL
• Web/Blog: http://www.fortifieddb.com
#devconnections
SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
About David Klee
#devconnections
@kleegeek
davidklee.net
gplus.to/kleegeek
linked.com/a/davidaklee
Specialties / Focus Areas / Passions:
• Performance Tuning
• Virtualization
• Infrastructure
• Troubleshooting
• High Availability
• Disaster Recovery
• Capacity Management
• Health & Efficiency
SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
Agenda• Scale Out vs. Scale Up
• Scale In
• “Right-Sizing”
• Efficiency
• Workload characteristics
#devconnections
SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
Scalability• Scale up = vertical scaling
• Vertical scaling = single instance faster
• Horizontal
– Data dependent routing
– Read Only Replicas
– Peer to Peer Replication
#devconnections
SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
Scale Out vs. Scale Up• Age-old problem
• One server to thousands
• Now introduce virtualization
#devconnections
SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
Scale Up
PROS• Single system / app
distribution
• Faster & quicker
CONS• Single server bottlenecks
• Scalability limits
• Internal SQL Server
contention
• More expensive
hardware
#devconnections
SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
Scale Out
PROS• Separation of
workloads
• Smaller VMs
• More agile VMs
• Load balance
• Outages impact less
CONS• Licensing
• Management
• Day-to-day operations
• Complexity
#devconnections
SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
Scale IN First• Efficiency, health, and bottleneck
analysis
• Limited upsides to more hardware
• Performance gains without more
resources
#devconnections
SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
Bottleneck Analysis• Underneath the VM
• VM config and placement
• SQL Server instance
• SQL Server database
• Determine tipping points
#devconnections
SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
VM Configuration• Start with gold certified template
• Adjust resources
• One size does not fit all
#devconnections
SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
“Right-Sizing”• What? How?
• Resource allocations
– What is needed now
• Type of workload
• vNUMA
#devconnections
SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
Leverage VM Infrastructure• VM proximity
#devconnections
SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
Leverage VM Infrastructure• Transparent SSD read caching
– Per vDisk
#devconnections
SSD
SAN
LUN
LUN
SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
Priority Tiers• Mission-critical production vs.
everything else
• Tier / prioritize resource queues
• Separation of tiers
#devconnections
SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
Add Hardware• Faster CPUs / more cores
• More RAM
• Faster storage (IOps / latency)
• Faster / more interconnects
– Storage fabric
– Networking
#devconnections
SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
Efficiency - Concurrency• Locking & blocking
• Read Committed Snapshot Isolation
• Asynchronous handling
– Service Broker
– SSIS
– PoSH
#devconnections
SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
Efficiency - Code Review• Schema design
• Strongly typed data types
• Queries & procedures
• App data handling
• …. And the list continues forever…
#devconnections
SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
Efficiency - CPU• Cores & schedulers
• Hyper-Threading
• NUMA
#devconnections
SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
Efficiency - Memory• Use memory to reduce I/O
• Use less memory with better efficiency
• Schema & index strategies
• Data & index compression
• Buffer pool extensions
#devconnections
SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
Efficiency - Storage• Goal: reduce I/O consumption
• Better distribution of workload
– Data files
– File groups
– Partitions
– Virtual disks
#devconnections
Virtual disks
Paths
Controllers
LUNs
SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
#devconnections
SAN
DB
E:
FG1
FG2
DF4
DF3
DF2
DF1
G:
F:
Win
do
ws
Serv
er
OS
x
Vir
tualiz
ati
on
Hard
ware
HB
A4
HB
A3
HB
A2
HB
A1
Inte
rco
nn
ect
Sw
itch
Co
ntr
olle
r 1
Co
ntr
olle
r 2
SA
N D
isk
Gro
upLU
N 2
LUN
1
HB
A4
HB
A3
HB
A2
HB
A1
SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
Efficiency - Storage• Data / index compression
• Indexing strategies
• Datatype analysis
• In-memory constructs
• Buffer pool extensions
#devconnections
SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
Segregating Workloads• One VM per purpose
• Offload read-only activities
– Availability Groups
– Replication
– Backups
• Sharding / data dependent routing
#devconnections
SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
Workload Characteristics• Monitoring
• Workload performance stat collection
– At all layers
• Aggregation by host & cluster
• Analysis
#devconnections
SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
Ongoing Review• Routine “right-sizing” analysis
• Capacity analysis & planning
• Baselines
• What to capture and analyze?
#devconnections
SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
Conclusions• Efficient virtualization
• Workload characterization
• Bottleneck relief
• Long-term management
#devconnections
SESSION TITLE
#devconnections
Rate This Session Now!Rate with Mobile App:
1. Select the session from the
Agenda or Speakers menus
2. Select the Actions tab
3. Click Rate Session
Rate Using Our Website:
1. Register at www.devconnections.com/logintoratesession
2. Go to www.devconnections.com/ratesession
3. Select this session from the list and rate it
Tell Us
What
You
Thought
of This
Session
Be Entered to
WINPrizes!