Raid

為 Oracle 數據庫設置 SSD 陣列,建議?

  • September 14, 2010

我正在為一個小型但讀取 I/O 密集型數據庫配置伺服器。它用作公共訪問更大的 Oracle RAC 數據庫的主索引。在查看 I/O 要求時,我們確定 SSD 陣列能夠以比大量 SAS 15K 心軸更低的成本提供所需的性能。我有一台 HP 伺服器,其 Smart Array P400 僅連接到 SSD。控制器有 256MB 的 BBWC。SSD 是三星(我相信)製造的基於 60GB SLC 的 2.5" SATA。

我想知道是否有人深入了解 RAID 10 或 5 的最佳條帶大小,文件系統建議?我們將要做 Oracle 11g,所以我相信我需要有一個文件系統而不是使用 RAW 塊設備。伺服器將執行 RHEL 5.5。

在過去的幾個月裡,我讀了很多關於 SSD 的文章,我並不反對做更多的事情,但是我的 google-fu 開始讓我無法繼續前進。我在 SSD RAID 上找到的大多數文件都是針對為家用 PC 上的啟動驅動器執行消費級 SSD 的 RAID 0 以使 Windows 7 啟動和載入遊戲更快的人。我的意思是我不是在找人來做我的工作,只是提供他們所擁有的任何經驗或他們找到的文件的連結。

提前致謝!

編輯一些附加資訊,而不是回复每個單獨的評論:

驅動器空間根本不是問題,因為數據庫足夠小,可以毫無問題地安裝在其中一個 SSD 上。

作為一個讀取量很大的數據庫(在 4-8k 中隨機讀取 95%+),我認為我可能會從 RAID 5 中獲得更好的性能,因為我可以從陣列中的 N-1 個驅動器讀取,而不僅僅是陣列中的活動磁碟鏡像,因為我讀到的內容表明 Smart Array P400 不支持從 RAID 10 集中的鏡像兩側讀取數據。也就是說,在我不得不擔心之前,我相當肯定控制器最終會成為瓶頸。

關於 TRIM:我相當肯定,即使這些驅動器支持 TRIM(我不相信他們支持),那麼通過 RAID 控制器將 TRIM 命令推送到各個驅動器也會有些困難。作業系統支持也很冒險,因為 Red Hat Enterprise Linux 5 仍然基於 2.6.18 核心樹,儘管進行了大量定制以引入後來核心版本的功能。EXT4 還沒有得到官方支持,作為一個生產機器,我需要讓自己保持在紅帽和惠普在出現問題時會幫助我的領域。不過,我確實相信驅動器級別正在進行某種垃圾收集。在不同的基準測試過程中,我已經多次填充磁碟,並且沒有

這是 6 驅動器 RAID 10 陣列的一些基準數據,使用 256KB 條帶大小。分區為 EXT3,對齊在 64 個扇區。使用 NOOP 調度程序,並且在掛載時給出 NOATIME 選項。我還將作業系統讀取記憶體增加到 8MB(我相信預設為 512K)。我在這個測試中使用了 Iozone 3.347,記錄大小為 4KB,基准文件大小為 25GB,希望能從圖片中提取記憶體並測量驅動器的實際性能。我還用四個執行緒執行它(4x25GB 文件由 4 個子程序寫入以對驅動器施加壓力。)

開始執行:2010 年 8 月 30 日星期一 12:09:57

   Record Size 4 KB
   File size set to 26214400 KB
   Command line used: /opt/iozone/bin/iozone -b /root/4k25g4t.xls -r 4k -s 25g -t 4 -i 0 -i 1 -i 2
   Output is in Kbytes/sec
   Time Resolution = 0.000001 seconds.
   Processor cache size set to 1024 Kbytes.
   Processor cache line size set to 32 bytes.
   File stride size set to 17 * record size.
   Throughput test with 4 processes
   Each process writes a 26214400 Kbyte file in 4 Kbyte records

   Children see throughput for  4 initial writers  =  253416.93 KB/sec
   Parent sees throughput for  4 initial writers   =  229461.66 KB/sec
   Min throughput per process                      =   61416.07 KB/sec
   Max throughput per process                      =   64604.90 KB/sec
   Avg throughput per process                      =   63354.23 KB/sec
   Min xfer                                        = 24924492.00 KB

   Children see throughput for  4 rewriters        =  259375.90 KB/sec
   Parent sees throughput for  4 rewriters         =  234136.11 KB/sec
   Min throughput per process                      =   63879.16 KB/sec
   Max throughput per process                      =   65675.30 KB/sec
   Avg throughput per process                      =   64843.97 KB/sec
   Min xfer                                        = 25497648.00 KB

   Children see throughput for  4 readers          =  490873.09 KB/sec
   Parent sees throughput for  4 readers           =  490830.09 KB/sec
   Min throughput per process                      =  119007.65 KB/sec
   Max throughput per process                      =  124878.35 KB/sec
   Avg throughput per process                      =  122718.27 KB/sec
   Min xfer                                        = 24984912.00 KB

   Children see throughput for 4 re-readers        =  477533.65 KB/sec
   Parent sees throughput for 4 re-readers         =  477503.03 KB/sec
   Min throughput per process                      =  115802.55 KB/sec
   Max throughput per process                      =  121579.46 KB/sec
   Avg throughput per process                      =  119383.41 KB/sec
   Min xfer                                        = 24973364.00 KB

   Children see throughput for 4 random readers    =   35728.62 KB/sec
   Parent sees throughput for 4 random readers     =   35728.53 KB/sec
   Min throughput per process                      =    8926.97 KB/sec
   Max throughput per process                      =    8937.35 KB/sec
   Avg throughput per process                      =    8932.16 KB/sec
   Min xfer                                        = 26183936.00 KB

   Children see throughput for 4 random writers    =   23527.42 KB/sec
   Parent sees throughput for 4 random writers     =   20701.37 KB/sec
   Min throughput per process                      =    5757.43 KB/sec
   Max throughput per process                      =    6035.68 KB/sec
   Avg throughput per process                      =    5881.86 KB/sec
   Min xfer                                        = 25011236.00 KB



"Throughput report Y-axis is type of test X-axis is number of processes"
"Record size = 4 Kbytes "
"Output is in Kbytes/sec"

"  Initial write "  253416.93

"        Rewrite "  259375.90

"           Read "  490873.09

"        Re-read "  477533.65

"    Random read "   35728.62

"   Random write "   23527.42

到目前為止,我在其他答案中沒有看到的一些要點:

  • 高端伺服器 SSD 的 IO 約為 30.000。RealSSD 高達 50.000
  • 因此,您可以使用 RAID 5。點。您的瓶頸很可能是 RAID 控制器,它根本沒有考慮到 SSD IOPS,因此它將最大限度地利用它的 CPU。

一般來說,SSD 在隨機 IO 方面的速度大約是 SAS 驅動器的 100 倍。多一點。根據您的要求,將 SAS 的 RAID 10 替換為 SSD 的 RAID 5 並且在 IOPS 和價格方面仍然領先 - 顯著 - 是完全可行的。

最佳條帶大小是 64k 的典型倍數 - 尤其是在這些段中讀取/寫入 SSD 時。那時不一定需要TRIM(沒有部分寫入)……但是擁有它真的很好。

MS 在適用於 oracle 的數據庫中也有一些關於 SSD 的文件(相同的原則 - 優化 IOPS)。甲骨文也應該有一些。

引用自:https://serverfault.com/questions/176518