Ayman El-Ghazali Senior Microsoft
Page Header (96 Bytes) Data Row 1 (100 Bytes) Data Row 3 (80 Bytes) Data Row 2 (200 Bytes) 321 Warning: Actual colors may vary! Row offset: Distance from the first byte in the row to the start of the page For this example: Row Offset 1 would have the value 96 Row Offset 2 would have the value 196 Row Offset 3 would have the value 396
GAM Extent 0 Extent 250 Tracks 64,000 Extents (4GB) 1 Represents if that extent is free GAM Page
Any Free Storage Space Available?
Uniform ExtentsMixed Extent Extent 1 (Table1) Extent 2 (Table2) Extent 3 (Table1) IAM1 Allocation Bitmaps Table3 SGAM GAM PFS IAM2
Client Query Engine Storage Engine Storage (RAM or HD) Query Engine
FSB CPU North Bridge (Memory Control) South Bridge (I/O Control) VIA DMA SATA/SAS PCI-E RAM
Refer to the book: Professional SQL Server 2008 Internals and Troubleshooting
1 Platter(s) 5 Drive Head 6 Track(s) 7 Sector(s) 8 Cluster(s) * Sector sizes in many modern disks are now 4K in size (previously 512 bytes)
Track Sectors Drive Head
Track Sectors Drive Head
64KB Allocation Units 4KB Allocation Units
Partition1 content/uploads/2012/02/Hard_Disk1.png
LUN1 LUN2 LUN3 LUN4
128 KB of Data in pages that are full takes up 128KB (Fill Factor 100%) 64 KB of Data in pages that are half full takes up 128KB (Fill Factor 50%)
64KB pages compressed down to 32KB (50%) 32KB pages decompressed to 64KB (if all pages had to be decompressed) Transfer 32KB Decompress
ZYNZ1GD3ZYNZ1GD4ZYNZ1GD5ZYNZ1GD6 ZYNZ1GD7ZYNZ1GD8ZYNZ1GD9ZYNZ1GD10 Page Info Buffer Cache Address 1:1:200XYNPUG19 3:7:98AZX444ST1 5:1:199ZYNZ1GD8 2:2:17XYAPUG10 1:1:21TRW56F7F Request for Page #199 on File #1 from DatabaseID 5 Stored in reverse DatabaseID : FileNumber : PageNumber 5:1:199 5:1: 199 Hash Bucket Data Cache (RAM)
MetricDD4 RAMDDR3 RAMSSD (Solid State Drive)HDD (Hard Disk Drive) Random Access Speed or Latency (RAM) Slightly higher than DDR3 10ns (0.01 Microsecond) 100 Microseconds (0.1 ms) 100,000 Nanoseconds (ns) 4-9 milliseconds (ms) Microseconds Cost per GB$4+ (was $18+ in 2015) $4+$0.5-$3.00 (Enterprise PCI-E $2+)$0.05-$0.15 Power Consumption~40% < DDR32.5-5W0.6W-3W (PCI-E ~20W)5-20 Watts Data Transfer Rate (Peak) SATA III (600 MB/s)N/A MB/sLess than 15K RPM PCI-E rev 3 x16 (~16 GB/s)N/A MB/sN/A DIMM17,000-34,100 MB/s6,400-24,000 MB/sN/A *DDR4 Memory peak transfer rate may increase; Current Server RAM up to 25,000 MB/s *Drive price and specs for Single Drives not SAN Storage *SATA III and SAS are very close in performance *Fibre Channel connection on a SAN Speeds are between MB/s for transfer rates *SSD sizes max out around 1TB for mainstream drives; HDD sizes max around 4TB *Prices from
HDD 10,000 Pages SSD DDR3 RAM SSD PCI-E 50,000 Pages 250,000 Pages
10,000 Pages DDR4 RAM 50,000 Pages 250,000 Pages
RAM SSD HDD 1 Cookie 10,000 Cookies 1,000,000 Cookies
FSB CPU North Bridge (Memory Control) South Bridge (I/O Control) VIA DMA SATA/SAS PCI-E RAM CPU does all the “Thinking” Requests data from disk Disk returns data to Memory via Direct Memory Access Memory pushes data to CPU via Front Side Bus For SQL Server, when the pages are kept in memory, they can be brought back from memory without having to go to disk.
Ayman El-Ghazali -