XIV(4)--Flash caching

1,Flash Cache簡介

Flash cache 本身是Facebook的一個開源項目,(準確的說是一個Linux的模塊),可以動態加載。Flashcache通過在文件系統(VFS)和設備驅動之間新增了一次緩存層,來實現對熱門的緩存。Flashcache是另一種緩存,一般用SSD作爲介質的緩存(一般的緩存用的是內存),通過將傳統硬盤上的熱門數據緩存到SSD上,然後利用SSD優秀的讀性能,來加速系統。這個方法較之內存緩存,沒有內存快,但是空間可以比內存大很多。如下圖:

Flashcache_orczhou

  現在很多硬件廠商也會在存儲設備中增加這個功能來,例如IBM XIV的Flash cache和 EMC的VFCache

2, XIV Flash Cache

從11.1.0開始,XIV Gen3開始支持可選的Flash caching feature,極大的提高小數據塊,隨機讀的性能,適用於Data patterns一直改變的環境。

XIV flash caching is implemented as an extension of the primary cache layer.   每個模塊400GB Cache,那一個系統就是6TB(400GB*15),從11.4開始,每個Module能支持800GB。Flash cache 只用於讀操作,當不再需要Cache中的數據時,直接drop掉就行了。


p_w_picpath

XIV flash caching overview

  Flash caching算法是嵌入在XIV Firmware中的,能自動適應相應的IO類型,對用戶透明,不需要管理員手動的做performance turning。    


XIV系統中有2種類型的Cache:main 和 extended  
--The main cache handles host write I/Os and then destages them directly to the disk drive. //Main cache主要處理主機寫IO然後直接Flush到Disk    
--The extended cache handles the caching of random read miss operations less than 64 KB. //Extended cache主要處理小於64KB的隨機讀操作    

Sequential read prefetches (larger than 64 KB) are handled in main dynamic random access memory (DRAM) cache. //大於64KB的順序讀操作是由main cache處理的


3,Flash Cache learning

A flash cache map is built as read misses occur in the DRAM cache. The process, known as flash cache learning


關於XIV中Main cache和Extended Cache(Flash Cache)是如何扮演各自角色的,請看下圖:

p_w_picpath  

XIV flash cache learning

 

The cache node immediately checks the extended cache for the requested I/O. If the requested I/O exists in the extended flash cache, it is served to the host through the main cache. The I/O operation is now complete and is recorded as a flash cache read hit.


If the operation results in a true read miss (not in the DRAM cache and not in extended flash cache), the request is forwarded in an unmodified state to the disk drive (SAS layer). The I/O is retrieved from the disk drive and served to the host through the main cache. From a host perspective, the I/O operation is now complete and is recorded as a read miss. The related pages are copied into reserved buffers in the main cache.

 

Important: Any read larger than 64 KB bypasses the extended flash cache.

當Buffer中的data達到512KB時,會順序地寫到Flash cache中。這種方式延長了Flash cache中的壽命。


Note: XIV在系統重啓和Firmware升級中能保存Flash Cache中的數據    

XIV Storage System software Version 11.2 introduced improved flash caching algorithms,providing a performance boost of up to 4.5 times over systems without flash cache for random database-type workloads. This boost is accomplished by storing and computing all flash cache-related data integrity checking tasks in DRAM rather than on the flash cache.


4,Approaches for Using SSDs in a Storage System

wKioL1R8FJPhn4ICAAMoM9IEUAI854.jpg

Approach of the tier. With policies that moved the data … or As a caching layer. This is the approach of XIV.


5,SSD failure

  • No redistribution in case of failure/phase-out

  • SSD Failure:

  -Reinitialize the metadata of the SSD (so it is not used)
  -The degraded module continue to server reads from its DRAM cache and large sequential reads from its disks
  -Small read misses are redirected to the secondary

  • SSD Phase-out and not failed

- Its data is invalidated (on writes)
=> if phased-in not all data is lost


During a rebuild, following a SAS disk failure in a module, the data on SSD in that module is

not invalidated. Rather, it is gradually updated to contain the new data blocks (the same way

the DRAM does).

------------------------------------------------------------------------------

後記:關於EMC VFCache和IBM Flash Cache,感興趣的可以看看比特網的下圖對比。

O7NP3455G9I4_s.jpg

1690S56R7T73_s.jpg

參考文章:http://storage.chinabyte.com/223/12261223.shtml

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章