scaling up and out your virtualized sql servers
TRANSCRIPT
![Page 1: Scaling Up and Out your Virtualized SQL Servers](https://reader034.vdocuments.mx/reader034/viewer/2022052602/55a201871a28ab38268b4645/html5/thumbnails/1.jpg)
Scaling Up and Out Your Virtualized
SQL Servers
#devconnections
![Page 2: Scaling Up and Out your Virtualized SQL Servers](https://reader034.vdocuments.mx/reader034/viewer/2022052602/55a201871a28ab38268b4645/html5/thumbnails/2.jpg)
SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
About Ben DeBow• Partner - SQLHA• Working with SQL Server for 20 years• Author, speaker, and consultant focusing on Performance,
Scalability, and Availability
[email protected] @BBQSQL sqlha.com
#devconnections
![Page 3: Scaling Up and Out your Virtualized SQL Servers](https://reader034.vdocuments.mx/reader034/viewer/2022052602/55a201871a28ab38268b4645/html5/thumbnails/3.jpg)
SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
About David Klee
#devconnections
@kleegeekdavidklee.netgplus.to/kleegeeklinked.com/a/davidaklee
Specialties / Focus Areas / Passions:
• Performance Tuning• Virtualization• Infrastructure• Troubleshooting
• High Availability• Disaster Recovery• Capacity Management• Health & Efficiency
![Page 4: Scaling Up and Out your Virtualized SQL Servers](https://reader034.vdocuments.mx/reader034/viewer/2022052602/55a201871a28ab38268b4645/html5/thumbnails/4.jpg)
SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
Agenda• Scale Out vs. Scale Up• Scale In• “Right-Sizing”• Efficiency• Workload characteristics
#devconnections
![Page 5: Scaling Up and Out your Virtualized SQL Servers](https://reader034.vdocuments.mx/reader034/viewer/2022052602/55a201871a28ab38268b4645/html5/thumbnails/5.jpg)
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
![Page 6: Scaling Up and Out your Virtualized SQL Servers](https://reader034.vdocuments.mx/reader034/viewer/2022052602/55a201871a28ab38268b4645/html5/thumbnails/6.jpg)
SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
Scale Out vs. Scale Up• Age-old problem• One server to thousands• Now introduce virtualization
#devconnections
![Page 7: Scaling Up and Out your Virtualized SQL Servers](https://reader034.vdocuments.mx/reader034/viewer/2022052602/55a201871a28ab38268b4645/html5/thumbnails/7.jpg)
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
![Page 8: Scaling Up and Out your Virtualized SQL Servers](https://reader034.vdocuments.mx/reader034/viewer/2022052602/55a201871a28ab38268b4645/html5/thumbnails/8.jpg)
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
![Page 9: Scaling Up and Out your Virtualized SQL Servers](https://reader034.vdocuments.mx/reader034/viewer/2022052602/55a201871a28ab38268b4645/html5/thumbnails/9.jpg)
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
![Page 10: Scaling Up and Out your Virtualized SQL Servers](https://reader034.vdocuments.mx/reader034/viewer/2022052602/55a201871a28ab38268b4645/html5/thumbnails/10.jpg)
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
![Page 11: Scaling Up and Out your Virtualized SQL Servers](https://reader034.vdocuments.mx/reader034/viewer/2022052602/55a201871a28ab38268b4645/html5/thumbnails/11.jpg)
SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
Bottleneck Example - Storage
#devconnections
ControllerController
ControllerController
LUNLUN
LUNLUN
LUNLUN
LUNLUN
Disk PoolDisk Pool
VM
VM
VM
VM
![Page 12: Scaling Up and Out your Virtualized SQL Servers](https://reader034.vdocuments.mx/reader034/viewer/2022052602/55a201871a28ab38268b4645/html5/thumbnails/12.jpg)
SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
VM Configuration• Start with gold certified template• Adjust resources• One size does not fit all
#devconnections
![Page 13: Scaling Up and Out your Virtualized SQL Servers](https://reader034.vdocuments.mx/reader034/viewer/2022052602/55a201871a28ab38268b4645/html5/thumbnails/13.jpg)
SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
“Right-Sizing”• What? How?• Resource allocations–What is needed now
• Type of workload• vNUMA
#devconnections
![Page 14: Scaling Up and Out your Virtualized SQL Servers](https://reader034.vdocuments.mx/reader034/viewer/2022052602/55a201871a28ab38268b4645/html5/thumbnails/14.jpg)
SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
Leverage VM Infrastructure• VM proximity
#devconnections
![Page 15: Scaling Up and Out your Virtualized SQL Servers](https://reader034.vdocuments.mx/reader034/viewer/2022052602/55a201871a28ab38268b4645/html5/thumbnails/15.jpg)
SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
Leverage VM Infrastructure• Transparent SSD read / write caching– Per vDisk
#devconnections
SSD
SANSAN
LUNLUN
LUNLUN
![Page 16: Scaling Up and Out your Virtualized SQL Servers](https://reader034.vdocuments.mx/reader034/viewer/2022052602/55a201871a28ab38268b4645/html5/thumbnails/16.jpg)
SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
Priority Tiers• Mission-critical production vs.
everything else• Tier / prioritize resource queues• Separation of tiers
#devconnections
![Page 17: Scaling Up and Out your Virtualized SQL Servers](https://reader034.vdocuments.mx/reader034/viewer/2022052602/55a201871a28ab38268b4645/html5/thumbnails/17.jpg)
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
![Page 18: Scaling Up and Out your Virtualized SQL Servers](https://reader034.vdocuments.mx/reader034/viewer/2022052602/55a201871a28ab38268b4645/html5/thumbnails/18.jpg)
SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
Efficiency - Concurrency• Locking & blocking• Read Committed Snapshot Isolation• Asynchronous handling– Service Broker– SSIS– PoSH
#devconnections
![Page 19: Scaling Up and Out your Virtualized SQL Servers](https://reader034.vdocuments.mx/reader034/viewer/2022052602/55a201871a28ab38268b4645/html5/thumbnails/19.jpg)
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
![Page 20: Scaling Up and Out your Virtualized SQL Servers](https://reader034.vdocuments.mx/reader034/viewer/2022052602/55a201871a28ab38268b4645/html5/thumbnails/20.jpg)
SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
Efficiency - CPU• Cores & schedulers• Hyper-Threading• vNUMA
#devconnections
![Page 21: Scaling Up and Out your Virtualized SQL Servers](https://reader034.vdocuments.mx/reader034/viewer/2022052602/55a201871a28ab38268b4645/html5/thumbnails/21.jpg)
SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
CPU Sizing – vNUMA Results31% Improvement
31% Improvement
• Example: 16 vCPU VM• What’s better?
• 2 vSocket x 8 vCore?• 4 vSocket x 4 vCore?• 8 vSocket x 2 vCore?
• Varies by workload, hardware
• Test it for yourself!
#devconnections
![Page 22: Scaling Up and Out your Virtualized SQL Servers](https://reader034.vdocuments.mx/reader034/viewer/2022052602/55a201871a28ab38268b4645/html5/thumbnails/22.jpg)
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
![Page 23: Scaling Up and Out your Virtualized SQL Servers](https://reader034.vdocuments.mx/reader034/viewer/2022052602/55a201871a28ab38268b4645/html5/thumbnails/23.jpg)
SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
Efficiency - Storage• Goal: reduce I/O consumption• Better distribution of workload– Tables– Data Files – File groups– Partitions
#devconnections
Virtual disksPathsControllersLUNs
![Page 24: Scaling Up and Out your Virtualized SQL Servers](https://reader034.vdocuments.mx/reader034/viewer/2022052602/55a201871a28ab38268b4645/html5/thumbnails/24.jpg)
SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
#devconnections
SAN
DB
E:
FG1
FG2
DF4
DF3
DF2
DF1
G:
F:
![Page 25: Scaling Up and Out your Virtualized SQL Servers](https://reader034.vdocuments.mx/reader034/viewer/2022052602/55a201871a28ab38268b4645/html5/thumbnails/25.jpg)
SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
Efficiency - Storage• Data / index compression• Indexing strategies• Datatype analysis• In-memory constructs• Buffer pool extensions
#devconnections
![Page 26: Scaling Up and Out your Virtualized SQL Servers](https://reader034.vdocuments.mx/reader034/viewer/2022052602/55a201871a28ab38268b4645/html5/thumbnails/26.jpg)
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
![Page 27: Scaling Up and Out your Virtualized SQL Servers](https://reader034.vdocuments.mx/reader034/viewer/2022052602/55a201871a28ab38268b4645/html5/thumbnails/27.jpg)
SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
Workload Characteristics• Monitoring• Workload performance stat collection– At all layers
• Aggregation by host & cluster• Analysis
#devconnections
![Page 28: Scaling Up and Out your Virtualized SQL Servers](https://reader034.vdocuments.mx/reader034/viewer/2022052602/55a201871a28ab38268b4645/html5/thumbnails/28.jpg)
SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
Ongoing Review• Routine “right-sizing” analysis• Capacity analysis & planning• Baselines• What to capture and analyze?
#devconnections
![Page 29: Scaling Up and Out your Virtualized SQL Servers](https://reader034.vdocuments.mx/reader034/viewer/2022052602/55a201871a28ab38268b4645/html5/thumbnails/29.jpg)
SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
Conclusions• Efficient virtualization• Workload characterization• Bottleneck relief• Long-term management
#devconnections
![Page 30: Scaling Up and Out your Virtualized SQL Servers](https://reader034.vdocuments.mx/reader034/viewer/2022052602/55a201871a28ab38268b4645/html5/thumbnails/30.jpg)
SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
QUESTIONS?
#devconnections
![Page 31: Scaling Up and Out your Virtualized SQL Servers](https://reader034.vdocuments.mx/reader034/viewer/2022052602/55a201871a28ab38268b4645/html5/thumbnails/31.jpg)
SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
THANK YOU!
#devconnections
![Page 32: Scaling Up and Out your Virtualized SQL Servers](https://reader034.vdocuments.mx/reader034/viewer/2022052602/55a201871a28ab38268b4645/html5/thumbnails/32.jpg)
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!