天天看點

如何選擇硬碟尺寸?(What size drive should I use?)

如何選擇硬碟尺寸?

Neil Cameron

        一言以蔽之…關鍵在于選擇正确尺寸的硬碟來适應不同的性能需求。目前,許多人隻是基于容量來選擇硬碟的數目以及所需的總容量大小,但是,涉及到硬碟容量和性能的選擇,還有若幹因素需要考慮在内。我将分兩大類來進行讨論——旋轉媒體和SSD:

旋轉媒體:

如何選擇硬碟尺寸?(What size drive should I use?)

      總的來說(這句話勢必會給我帶來麻煩),旋轉媒體的性能基本上是差不多的,不論其容量大小。比如Seagate的Constellation 2 SATA硬碟,該公司給出的資料是尋道、讀、寫的速度完全一樣:對容量高達2TB的硬碟而言,速度都是250GB。是以,容量的增加并沒有帶來相應的速度提升。

        這一點為什麼很重要呢?在由旋轉媒體組成的RAID陣列中,轉軸的數目對陣列的性能存在重大的影響。例如,一對鏡像盤(兩塊6TB的硬碟 —— 6TB容量)的速度就遠遠比不上RAID 5陣列中8塊1TB硬碟(大約7TB容量)傳送資料流的速度。RAID 5陣列中額外的轉軸為每塊硬碟提供了小規模的讀和寫,進而大大提升了速度。

       來對傳送資料流進行些粗略的計算——如果每塊硬碟的讀速度是120MB/秒,那麼,理論上來說,從鏡像盤得到的最高速度為240MB/秒,而從RAID 5得到的最佳結果則為840MB/秒。當然這都是理想化的資料,但其間差距可見一斑。

       當然,RAID配置也很重要,需要與客戶将要應用的資料類型相比對,原因在于,總體來講,對于旋轉式媒體而言,轉軸愈多,性能就愈高。雖然還有能耗和成本以及其他方面的考慮,但我這裡主要考慮的是性能,那就讓我們專注于此。

SSD :

       對SSD而言,小SSD盤與大SSD盤的性能指數确實存在着巨大的差距。其間當然還有成本的差異,來看看具體資料吧…

       先來看看Intel的DC3500SSD(非常、非常優秀的一款産品),80GB和800GB的硬碟的IOPs的差别并不大(分别是70K到75K不等),但順序讀寫的速度就有非常顯著的差異。80GB硬碟的順序讀速度據稱達到了340MB/秒,而800GB硬碟的順序讀速度則達到了500MB/秒。順序寫的差距就更加驚人,80GB硬碟的速度達到了100MB/秒,而800GB硬碟的寫速度則宣稱是450MB/秒。

       這些到底意味着什麼呢?

       在任何RAID陣列中,轉軸的多少(在此即指更多硬碟)會帶來性能上的不同。如果控制卡能将讀/寫任務配置設定到多個硬碟,那麼控制卡向每塊硬碟讀/寫的資料就減少了,因而可以更快地完成任務。再加上大硬碟的速度要快上許多,那麼改善效果就加倍突出。

       難點在于,硬碟數目不多的陣列中,會遭遇RAID的局限,即硬碟讀寫的資料大小比分攤到更多盤片時要大得多,是以需要找到一個平衡。

        RAID 0中8塊80GB的硬碟最高可以提供640GB的容量,讀速度可達2720MB/秒;5塊240G的硬碟可以提供大概同樣的速度,容量則為1.2TB。

        故此,直接提高硬碟的大小,期望能實作相同的容量,并維持性能水準是不切實際的。RAID盤陣的基本思想決定了盤的數目依然對速度起到了決定性影響。

       真正的問題還在于性能測試,也正是這一點引起了我的注意。許多人對硬碟速度具體意味着什麼缺乏概念——隻是看到宣傳中的誇大資訊,曉得Intel的盤“最高”能提供500MB/秒的讀速度(這也是我從宣傳材料中汲取的資訊)。

        是以,當測試八塊 DC3500 SSD時,我本應該能在RAID 0中得到4000MB/秒的讀速度,對不對?答案應該是肯定的…… “是啊,如果你用的是240GB或者更大的硬碟時确實如此”。但是,如果硬碟隻有80GB或120GB的容量,那麼最高能達到的速度就分别是2720MB/秒和3560MB/秒(理想情況下)。

       這樣的結果會讓你向RAID廠商咆哮一番,責備他們提供的裝置性能不夠好……沒能充分發揮硬碟的性能!而事實上,是硬碟在拖控制器的後腿。如果在控制卡上接上足夠多的速度足夠的SSD,Adaptec的7系列和8系列控制器可以傳送資料流,跑滿PCIe總線(約6600MB/秒)。但是,就算在控制器上連上16塊80GB的Intel DC3500硬碟,還是會發現性能無法達到極限,原因很簡單,這些硬碟的速度并不如想象中的快。

結論

       這些與我們有什麼關系呢?眼下真有人在用全閃存的系統嗎?回答是肯定的,而且使用者數目在不斷攀升。SSD在各種規模的企業及消費者中的應用已經日漸成熟——現在對全閃存系統的認識也趨向準确,大家認為此類裝置的可靠性、速度及成本效益都很不錯,并且能為整個計算機系統帶來煥然一新的改變,是以至少是值得慎重考慮的一種選擇。

       隻是,需要確定這些系統的配置正确合理,并保證購買的系統的速度達到要求——事實上,所有廠商的SSD都有同樣的配置的問題。

What size drive should I use?

In one word, this is all about the issue ofchoosing the right size drives to suit your performance requirements. Now a lotof people just choose the number of drives based on capacity, and what overallsize they need, but there are a few considerations that should be looked atwhen it comes to size of drive and performance. I’ll break this into twosections – spinning media and SSD:

Spinning Media …

As a general statement (bound to cause me somegrief), the performance of spinning media is pretty much the same across afamily of drives, no matter what the size. If you look at something likeSeagate’s Constellation 2 SATA drives, they quote seek, read and write speedsof exactly the same numbers for 250GB up to 2TB drives. So while they getbigger, they don’t get faster.

So why does this matter. Well, in spinning mediaRAID arrays, generally the number of spindles has a major impact on theperformance of the array. For example, a mirror (2 drives of 6TB drives – 6GTBcapacity) will not be anywhere near as fast in streaming data as 8 x 1TB drivesin a RAID 5 (7TB capacity or thereabouts). The additional spindles in the RAID5 allow for small reads and writes from each drive, speeding things upconsiderably.

To do some really rough maths on streaming data –if a drive does 120MB/sec read speed, then theoretically the best speed you canget from the mirror is 240MB/sec and from the RAID5 is would be 840MB/sec.That’s all in a perfect world of course, but you get the idea.

Of course, the RAID configuration matters and needsto suit the data type you are building for, but in general, with spinningmedia, you can say that more spindles equals more performance. Yes, there arepower usage considerations, and cost considerations (though not a great deal),and those all need to be taken into account, but I’m talking about performancehere, so stay focused on that side of the equation.

SSD

On the SSD side of the equation, there is in fact abig difference between the performance numbers of a small drive vs those of alarge drive. Yes there are cost differences as well, but let’s look at thenumbers …

Looking at Intel’s DC3500 SSD (a very, very goodproduct imho), there is not a great deal of difference in the IOPs speed fromthe 80GB to the 800GB drives (70K to 75K respectively), but in the streamingspeed there are some pretty dramatic differences. The 80GB drive claims asequential read speed of 340MB/sec, while the 800GB drives claims a sequentialread speed of 500MB/sec. The write speed difference is even more dramatic, withthe 80GB drive writing at a claimed 100MB/sec, and the 800GB drive writing at aclaimed 450MB/sec.

So why does this matter?

As in any RAID array, more spindles (or in thiscase drives) matters. If the controller card can split the reads or writesacross multiple drives then it reads or writes less data to each drive,finishing tasks quicker. If you add to this the fact that the larger drives aredramatically quicker, then the effect is multiplied.

The conundrum here is that a small number of driveswill still suffer from the RAID limitation that the reads and writes to thedrives will be larger than it would be if they are spread out across a lot moredrives, so a balance is required.

8 x 80GB drives in RAID 0 would give a potentialread speed of 2720MB/sec at 640GB capacity.

5 x 240GB drives would give pretty much the same speed, at 1.2TB capacity

So you can’t do a straight upgrade of drive size tocome up with the same capacity numbers and still maintain performance – themathematics of RAID still means more drives equals more speed, but you start tosee the point.

The real problem here lies in performance testing,and this is what brought this to my attention. A lot of people don’t read thefine print regarding the speed of the drives – they just look at the marketingblurb and see that the Intel drives are capable of “up to” 500MB/sec read speed(that’s pretty much the way I read the marketing material as well).

So when testing 8 x DC3500 SSDs, I should be ableto get 4000MB/sec read speed in RAID0, correct? The answer to that is “yes … ifyou are using 240GB or larger drives”. However if you only have 80GB or 120GBdrives, then your maximum speeds will be 2720MB/sec and 3560MB/sec respectively(in a perfect world).

This will have you yelling at your RAID vendor thattheir performance is not good enough … it’s holding back the drives! Whereas inreality it’s the drives holding back the controller. Adaptec’s 7 and 8 Seriescontrollers can stream data to the full extent of the PCIe bus (approx6600MB/sec) … if you put enough of the right speed SSDs on the card. Howevereven if you put 16 x 80GB Intel DC3500 drives on your controller you’ll be shyof that performance benchmark simply because the drives are not as fast as youmight have thought.

Conclusion

All of this matters because? Are people reallyusing pure SSD systems now? Well yes, they are, in ever-increasing numbers. TheSSD has come of age in the mind of the enterprise, small business and consumer– they are now quite rightly regarded as reliable, fast and reasonably-affordabledevices that make such a dramatic difference to a computer system that they areat least worth considering.

Just make sure that you are configuring themcorrectly, and that you are in fact sure of what speed you are actually buying.This has not been a bash against Intel – all SSD from all vendors suffer thesame configuration issues.

繼續閱讀