SQL Server Disk Architecture
SQL Server磁碟架構規劃
RAID Comparisons
Level |
Fault Tolerance |
Read |
Write |
Write Penalty |
Cost |
0 |
None |
Good |
Excellent |
1 |
Excellent |
1 |
Good |
Good |
Good |
2 |
Fair |
5 |
Fair |
Good |
Poor |
4 |
Good |
1+0 |
Excellent |
Excellent |
Excellent |
2 |
Poor |
File |
RAID LEVEL |
OS and SQL Server
Binaries |
RAID 1 for Fault
Tolerance |
SQL Server Data and Indexes |
RAID
1+0 (RAID 5 is OK if on a budget) |
SQL Server Logs |
RAID 1+0 |
SQL Server TempDB |
RAID
1+0 |
SQL Server Backups |
RAID 5 |
Example 1
Physical Server
RAID LEVEL |
Physical Disk |
Partition |
Usage |
RAID 1 array |
2個xxxGB 2.5” 12 Gb SAS
SSD |
C |
OS, SQL Server Binaries, SQL Server
master, model, msdb DB and log |
RAID 10 array |
6個xxxGB 2.5” 12 Gb SAS SSD |
D |
SQL Logs file |
n/a |
Xxx GB |
E |
SQL Backups |
SAN Storage
RAID LEVEL |
Physical Disk |
Partition |
Usage |
RAID 5 array |
4個xxxGB 2.5” 12 Gb SAS
SSD |
F |
SQL Data and Indexes file |
RAID 5 array |
4個xxxGB 2.5” 12 Gb SAS SSD |
G |
SQL Data and Indexes file |
RAID 5 array |
4個xxxGB 2.5” 12 Gb SAS
SSD |
H |
SQL Data and Indexes file |
RAID 5 array |
4個xxxGB 2.5” 12 Gb SAS SSD |
I |
SQL Data and Indexes file |
RAID 10 array |
6個xxxGB 2.5” 12 Gb SAS
SSD |
J |
SQL Tempdb data and Tlog file |
Example 2
Physical Server
RAID LEVEL |
Physical Disk |
Partition |
Usage |
RAID 1 array |
2個xxxGB 2.5” 12 Gb SAS
SSD |
C |
OS, SQL Server Binaries, SQL Server
master, model, msdb DB and log |
RAID 10 array |
6個xxxGB 2.5” 12 Gb SAS SSD |
D |
SQL UserDb tLogs file SQL Tempdb tLog |
n/a |
Xxx GB |
E |
SQL Backups |
SAN Storage
RAID LEVEL |
Physical Disk |
Partition |
Partition and Usage |
RAID 5 array |
4個xxxGB 2.5” 12 Gb SAS
SSD |
F |
SQL UserDb Data and Indexes file
and SQL Tempdb Data |
RAID 5 array |
4個xxxGB 2.5” 12 Gb SAS SSD |
G |
SQL UserDb Data and Indexes file and SQL Tempdb
Data |
RAID 5 array |
4個xxxGB 2.5” 12 Gb SAS
SSD |
H |
SQL UserDb Data and Indexes file
and SQL Tempdb Data |
RAID 5 array |
4個xxxGB 2.5” 12 Gb SAS SSD |
I |
SQL UserDb Data and Indexes file and SQL Tempdb
Data |
Example 3
Failover Cluster
Physical Server
RAID LEVEL |
Physical Disk |
Partition |
Usage |
RAID 1 array |
2個xxxGB 2.5” 12 Gb SAS
SSD |
C |
OS, SQL Server Binaries, SQL Server
master, model, msdb DB and log |
n/a |
Xxx GB |
E |
SQL Backups |
SAN Storage
RAID LEVEL |
Physical Disk |
Partition |
Partition and Usage |
RAID 1 array |
1GB |
Q |
Failover cluster Quorum disk |
RAID 10 array |
6個xxxGB 2.5” 12 Gb SAS SSD |
D |
SQL UserDb tLogs file SQL Tempdb tLog |
RAID 5 array |
4個xxxGB 2.5” 12 Gb SAS
SSD |
F |
SQL UserDb Data and Indexes file |
RAID 5 array |
4個xxxGB 2.5” 12 Gb SAS SSD |
G |
SQL UserDb Data and Indexes file |
RAID 5 array |
4個xxxGB 2.5” 12 Gb SAS
SSD |
H |
SQL UserDb Data and Indexes file |
RAID 5 array |
4個xxxGB 2.5” 12 Gb SAS SSD |
I |
SQL UserDb Data and Indexes file |
RAID 10 array |
6個xxxGB 2.5” 12 Gb SAS
SSD |
F |
SQL Tempdb Data |
Example 4 (簡化)
Failover Cluster
Physical Server
RAID LEVEL |
Physical Disk |
Partition |
Usage |
RAID 1 array |
2個xxxGB 2.5” 12 Gb SAS
SSD |
C |
OS, SQL Server Binaries, SQL Server
master, model, msdb DB and log |
n/a |
Xxx GB |
E |
SQL Backups 或放在SAN Storage跟Quorum disk一起 |
SAN Storage
RAID LEVEL |
Physical Disk |
Partition |
Partition and Usage |
RAID 1 array |
1GB |
Q |
Failover cluster Quorum disk |
RAID 10 array |
6個xxxGB 2.5” 12 Gb SAS SSD |
D |
SQL UserDb tLogs file SQL Tempdb tLog |
RAID 5 array |
4個xxxGB 2.5” 12 Gb SAS
SSD |
F |
SQL UserDb Data and Indexes file
and SQL Tempdb Data |
RAID 5 array |
4個xxxGB 2.5” 12 Gb SAS SSD |
G |
SQL UserDb Data and Indexes file and SQL Tempdb
Data |
RAID 5 array |
4個xxxGB 2.5” 12 Gb SAS
SSD |
H |
SQL UserDb Data and Indexes file
and SQL Tempdb Data |
RAID 5 array |
4個xxxGB 2.5” 12 Gb SAS SSD |
I |
SQL UserDb Data and Indexes file and SQL Tempdb
Data |
Serial Attached SCSI (SAS) 介面的傳輸率
SAS-1 3Gb/s
SAS-2 6Gb/s
SAS-3 12Gb/s (扣除編碼損耗後,12Gb/s傳輸率可以提供1,200MB/s的資料傳輸頻寬,SAS-3傳輸率的提高,不僅有助於因應更大規模的磁碟儲存架構,更重要的是可以解放SSD的效能,同時也讓SAS不再是制約伺服器或儲存控制器效能的瓶頸。)
SSD硬碟傳輸速度
2009年,SSD傳輸速度約100~250MB/s
2015年,SSD產品讀寫速度已可輕易超過500MB/s,甚至還能達到1000MB/s等級速度。
(若不進一步擴展SAS傳輸頻寬,便會限制SSD在SAS介面上的發展,將會迫使未來的SSD產品捨棄SAS介面、轉往PCIe、NVMe等高速傳輸介面發展)
TPC-E Result Highlights
Lenovo ThinkSystem SR650
Table 29. 2.5-inch hot-swap 12 Gb SAS
SSDs |
|||
Part number |
Feature |
Description |
Maximum |
2.5-inch
hot-swap SSDs - 12 Gb SAS - Performance (10+ DWPD) |
|||
4XB7A10219 |
B4Y4 |
ThinkSystem 2.5" SS530 400GB
Performance SAS 12Gb Hot Swap SSD |
24 |
4XB7A10230 |
B4Y5 |
ThinkSystem 2.5" SS530 800GB
Performance SAS 12Gb Hot Swap SSD |
24 |
4XB7A10231 |
B4Y6 |
ThinkSystem 2.5" SS530 1.6TB
Performance SAS 12Gb Hot Swap SSD |
24 |
4XB7A10232 |
B4Y7 |
ThinkSystem 2.5" SS530 3.2TB
Performance SAS 12Gb Hot Swap SSD |
24 |
2.5-inch
hot-swap SSDs - 12 Gb SAS - Mainstream (3-5 DWPD) |
|||
4XB7A17062 |
B8HU |
ThinkSystem 2.5" PM1645a 800GB
Mainstream SAS 12Gb Hot Swap SSD |
24 |
4XB7A17063 |
B8J4 |
ThinkSystem 2.5" PM1645a 1.6TB
Mainstream SAS 12Gb Hot Swap SSD |
24 |
4XB7A17064 |
B8JD |
ThinkSystem 2.5" PM1645a 3.2TB
Mainstream SAS 12Gb Hot Swap SSD |
24 |
4XB7A17065 |
B8JA |
ThinkSystem 2.5" PM1645a 6.4TB
Mainstream SAS 12Gb Hot Swap SSD |
24 |
4XB7A13654 |
B4A1 |
ThinkSystem 2.5" PM1645 1.6TB
Mainstream SAS 12Gb Hot Swap SSD |
24 |
4XB7A13655 |
B4A2 |
ThinkSystem 2.5" PM1645 3.2TB
Mainstream SAS 12Gb Hot Swap SSD |
24 |
2.5-inch
hot-swap SSDs - 12 Gb SAS - Entry / Capacity (<3 DWPD) |
|||
4XB7A38175 |
B91A |
ThinkSystem 2.5" PM1643a 960GB Entry
SAS 12Gb Hot Swap SSD |
24 |
4XB7A38176 |
B91B |
ThinkSystem 2.5" PM1643a 1.92TB
Entry SAS 12Gb Hot Swap SSD |
24 |
4XB7A17054 |
B91C |
ThinkSystem 2.5" PM1643a 3.84TB
Entry SAS 12Gb Hot Swap SSD |
24 |
4XB7A17055 |
B91D |
ThinkSystem 2.5" PM1643a 7.68TB
Entry SAS 12Gb Hot Swap SSD |
24 |
4XB7A17056 |
BC4R |
ThinkSystem 2.5" PM1643a 15.36TB
Entry SAS 12Gb Hot Swap SSD |
24 |
4XB7A17168 |
B6TL |
ThinkSystem 2.5" PM1643 960GB Entry
SAS 12Gb Hot Swap SSD |
24 |
4XB7A13645 |
B4A7 |
ThinkSystem 2.5" PM1643 3.84TB
Capacity SAS 12Gb Hot Swap SSD |
24 |
SharePoint規劃建議
將您的資料分散到磁碟間並設定優先順序
理想狀況下,您應將 tempdb 資料庫、內容資料庫、使用狀況資料庫、搜尋資料庫與 SQL Server 2014 (SP1)、SQL Server 2016、SQL Server 2017 RTM、SQL Server 2008 R2 SP1 及 SQL Server 2012 交易記錄放置在不同的實體硬碟上。
下表提供為資料設定優先順序時的若干最佳做法與建議:
- 在較快速的磁碟間設定資料的優先順序時,請使用下列排名:
- Tempdb 資料檔案與交易記錄
- 資料庫交易記錄檔
- 搜尋資料庫,但搜尋管理資料庫除外
- 資料庫資料檔 (在十分偏重於讀取性的Web網站中,資料的優先順序應高於記錄。)
- 測試與客戶資料顯示,SharePoint Server 伺服器陣列的效能可能因 tempdb 的磁碟 I/O 不足而嚴重下滑。若避免發生此問題,請為 tempdb 配置專用磁碟。若預期或已監控到高工作量 (亦即,平均讀取動作或平均寫入動作需要 20 毫秒以上才能完成),您可能必須將檔案分散到各個磁碟間,或將更換為速度較快的磁碟,以緩解瓶頸。
- 為達到最佳效能,請將 tempdb 放置在 RAID 10 陣列上。tempdb 資料檔的數目應與核心 CPU 的數目相等,且各個 tempdb 資料檔應設為相同大小。此時請將雙核心處理器計為兩個 CPU。各個支援超執行緒的處理器應分別計為單一 CPU。如需詳細資訊,請參閱最佳化 tempdb 效能。
- 請將資料庫資料檔與交易記錄檔分散到不同的磁碟間。若因為檔案太小而無法給予完整磁碟或等量磁碟區,或是您的磁碟空間不足,而使檔案必須共用磁碟,請將使用模式不同的檔案放在相同磁碟上,以盡可能減少並行存取要求。
- 請洽詢您的儲存硬體供應商,了解如何設定所有的記錄與搜尋資料庫,讓您特定的儲存解決方案達到最佳寫入效能。
沒有留言:
張貼留言