Sqlrally Orlando Understanding Storage Systems and SQL Server
Sqlrally Orlando Understanding Storage Systems and SQL Server
Sqlrally Orlando Understanding Storage Systems and SQL Server
SQL Server
Wes Brown
What we are going to learn
1. Base System Makeup
2. Disk Controllers, Host Bus Adapters, and
Interfaces
3. The Basics of Spinning Disks
4. Redundant Array of Inexpensive Disks
5. SAN Basics
6. Solid State Storage Basics
7. SQL Server and The File System
8. Testing New Storage
9. Monitoring Your Storage
System Buses
• The modern server is made
up of several buses or
controllers that talk to each
other and to the CPU.
• Front-side Bus
– Usually, memory only access
– Fastest bus on system
– Hypertransport/Quickpath
replacing FSB
• I/O Controller/Bus
– Also known as the peripheral
bus
– All onboard devices
– All expansion slots
Peripheral Buses and Speeds
Bus Type Speed MB/Sec
PCI-X 1066
Six hard disk drives with cases opened showing platters and heads; 8, 5.25, 3.5, 2.5, 1.8, and 1 inch disk diameters are represented.
Author Paul R. Potts
Disk Drives
• You are only as fast as your slowest or narrowest pipe,
hard drives.
• To feed other parts of the system we have to add lots of
drives to get the desired IO single server can consume.
• The problem isn’t size is speed.
Time Circa 1981 Today Improvement
CPU Speed 8088 4.77Mhz (.33 MIPS) Core i7 965(18322 MIPS) 5521x
Physical Structures
• Head/Sectors/Cylinders
– Not a true physical representation!
• Data/Track Placement
– Outside tracks pack more data = more MB/Sec
– Inside tracks seek faster = more I/O Sec
– More platters don’t = more speed!
• Current HDD only have one read/write channel
Track Placement
Tracks Are A path around
the disk
Sectors are a single wedge
of a disk
Cylinder are through the
disks and are made up of
sectors
Heads do the reading and
writing
Disk Performance
The time required to move the read/write heads over the disk surface to the required track. The seek time is
Seek Time roughly proportional to the distance the heads must move.
Rotational
Latency The time taken, after the completion of the seek, for the disk platter to spin until the first sector addressed
passes under the read/write heads. On average, the rotational latency is half of a full rotation.
Transfer Time
The time taken for the disk platter to spin until all the addressed sectors have passed under the heads.
• All of these rules to everything but tempdb. Since tempdb is recreated at restart every time
recoverability isn’t an issue.
SQL Server and The File System
• Format data partitions to 64k cluster size for
performance. SQL Server reads in 64k chunks if
possible
• Sector alignment to prevent split I/O’s
– MBR occupies the first 63 sectors leaving your
partition starting on the 64th
– Use diskpar (windows 2000/2003 pre sp1)
– Use diskpart (windows 2003 sp1 or greater)
– Windows 2008 aligns out of the box on 1MB
– Disk defrag will not fix this!
– Full partition format will not fix this!
Testing New Systems
• SQLIO
– http://sqlserverio.com/2010/06/15/fundamentals-of-storage-
testing-io-systems/
– Tests Reads OR Writes
• Not the best for truly mixed workloads
• Find maximum capacity and bigger issues
• ioMeter
– http://www.iometer.org/
• http://sqlserverio.files.wordpress.com/2010/10/sqlserveriopatterns.doc
– General IO System Tester
– Very flexible
• Test mixed workloads
• Can be difficult to use
Monitoring Performance
• Response Time = Service Time + Wait Time
• Disk Queue Length
– More relevant 10 year ago than today
– Caches mask DQ
– Focus on latency and waits
– sys.dm_io_virtual_file_stats
• Gives you time to read and write IO’s
• Gives you amount of data written and read at the file level
• Great for finding SAN hot spots
• http://sqlserverio.com/2011/02/08/gather-virtual-file-statistics-
using-t-sql-tsql2sday-15/
– sys.dm_os_wait_stats
• Gives you what SQL Server is doing besides IO
• Only at a instance level
Please Complete the Evaluation Form
Sponsored by Dell
THANK YOU! Sponsored by Dell
Understanding SQL Server and Storage Systems
Wesley Brown
[email protected]
Twitter @WesBrownSQL
Blog http://www.sqlserverio.com
http://www.wesworld.net/raidcalculator.html
Session Code | Session Title
38