SSDæ©èœ
SSDã¯ããŒãžå ã®ããŒã¿ã®æžã蟌ã¿ãšèªã¿åããè¡ããã¯ãªã¢ãããããŒãžã«ã®ã¿æžã蟌ã¿ãã§ããããŒãžã¯å€§ããªãããã¯ã§ã®ã¿ã¯ãªã¢ã§ããŸãã ããšãã°ããã£ã¹ã¯ã®ããŒãžãµã€ãºã¯8 KBã§ããããã¯ã«ã¯128ããŒãžãå«ãŸããŠããããããããã¯ãµã€ãºã¯1024 KBã§ãïŒä»¥éãç¹ã«æå®ã®ãªãéããKBãšMBã¯ãã€ããªã§ãïŒã
ããšãã°ã1ã€ã®ãã¡ã€ã«ã§40 KBãå€æŽãããšãç©çã¬ãã«ã§ã¯æ¬¡ã®ããã«ãªããŸãã
è«çã¬ãã«ã§ã¯ããã¹ãŠãéåžžã®ããã«èŠããŸã-ããŒã¿ã¯ã察å¿ããã»ã¯ã¿ãŒã®äžçªäžã«äžæžããããŸãã ãããã¯1ã«ç©ºã§ããŒãžãã¯ãªã¢ããæºåãã§ãããããã«ããã®ãããã¯ã¯æ¶å»ãããå®å šã«ç©ºã«ãªããŸãã
ç©ççãªå®è£ ãé ãããã«ããã£ã¹ã¯ã¯è«çããŒãžçªå·ãšç©çããŒãžçªå·ã«äžèŽãããããããµããŒãããŠããŸãïŒFlash Translation LayerïŒã
ãããŸã§ã®ãšãããæ°ããããŒã¿ããã®è«çã¢ãã¬ã¹ã«æžã蟌ãŸããå Žåãç©çããŒãžãåã³ã¯ãªã¢ãããæ¹æ³ã¯1ã€ãããããŸããã å®éã«ã¯ããã£ã¹ã¯ã³ã³ãããŒã©ãŒã¯ããŒãžã¬ãã«ã§åäœãããã¡ã€ã«ã·ã¹ãã ã«ã€ããŠäœãç¥ããããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã¯åé€ããããã¡ã€ã«ããã£ã¹ã¯ã«éç¥ãããã©ã®ã»ã¯ã¿ãŒãã¯ãªã¢ã§ããŸãã é ããæ©ããããã£ã¹ã¯ã®åããŒãžãããžãŒã«ãªããããŒã¿ãæžã蟌ãå ŽæããªããªãããšãããããŸãã
ãã®åé¡ã解決ããããã«ã ATA TRIM ïŒ wiki ïŒ ã³ãã³ããè¿œå ãããŸããã ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã¯ãã¯ãªã¢å¯èœãªã»ã¯ã¿ãŒã瀺ããã£ã¹ã¯ã«ãããéä¿¡ããŸãã ãã®ã³ãã³ãã®é¡äŒŒç©ã¯ãSCSI UNMAPããã³CF ERASEã§ãã æ®å¿µãªãããå Žåã«ãã£ãŠã¯ãã£ã¹ã¯ã«éä¿¡ããæ¹æ³ããããŸããã
-ãã£ã¹ã¯ãããŒããŠã§ã¢ã³ã³ãããŒã©ãŒïŒ LSI ã Adaptecãªã©ïŒãåããRAIDã«ããå Žåã
-ãã©ã€ãããã¡ãŒã ãŠã§ã¢RAIDãç¹ã«Intel RST RAID 1/10/5/6ã«ããå Žåã
-ãã£ã¹ã¯ãUSBçµç±ã§æ¥ç¶ãããŠããå ŽåïŒãããã³ã«å¶éïŒã
-ãã£ã¹ã¯ãTrueCryptãdm-cryptãGELIãªã©ã䜿çšããŠããã°ã©ã ã§æå·åãããŠããå Žå ïŒãµããŒããããå ŽåããããŸãããéåžžã¯ã»ãã¥ãªãã£äžã®çç±ããå«ãŸããŠããŸããïŒã
ãã¹ãã®çµæããã£ã¹ã¯ãTRIMã³ãã³ããåä¿¡ããªãããšãå€æããå Žåãããã«èšé²çšã®ç©ºãããŒãžãéåžžã«å°ãªããªããŸãã ãããããããã¯æ¬¡ã®ããã«ãªããŸããåãã£ã¹ã¯ã«ã¯ã空ãããŒãžã®ãªã¶ãŒãããã³å®å šã«äœ¿ãå€ããããããã¯ã®ãªã¶ãŒããšããŠæ©èœããäºçŽé åãå«ãŸããŸãã ãã®é åã®ãµã€ãºã調ã¹ãã«ã¯ããã£ã¹ã¯ã«ã€ã³ã¹ããŒã«ãããŠããç©çã¡ã¢ãªã®éãšãããã¥ã¡ã³ãã§ç€ºãããŠããLBAã®éã調ã¹ãå¿ èŠããããŸãã
ããšãã°ãSamsung SSD 840 Pro 512 GBã«ã¯512 GBã®ã¡ã¢ãªãããã1000215216 LBAã»ã¯ã¿ãŒã䜿çšå¯èœã§ãã äºåã¯ã512Ã1024Ã1024Ã1024-1000215216Ã512 = 35 GBãŸãã¯6.85ïŒ ã§ãã ããã«äœ¿çšã§ãããã£ã¹ã¯å®¹éã¯ãïŒ512-35ïŒÃ1024Ã1024Ã1024 = 512Ã10 ^ 9 = 512 GBããã§ã«10é²æ°ã§ãã Samsung SSD 850 Pro 128 GBã«ã¯129 GBã®ããŒããæèŒãããŠããããŠãŒã¶ãŒã¯128 GBã®10é²æ°ã䜿çšã§ããŸããäºå-7.6ïŒ ã
ãããã£ãŠããã£ã¹ã¯å šäœããã£ã±ãã«ããŠãããã¹ãŠã®ãã¡ã€ã«ãåé€ãããšãTRIMãµããŒãããªããã°ããã£ã¹ã¯ã¯ãã£ã¹ã¯ããªã¥ãŒã ã®6.85ïŒ ã®äžéšã«ããæžã蟌ã¿ã§ããŸããã äžéšã«ã¯ããã®äºçŽããªã¥ãŒã ããæçåã®ããã«éšåçã«å®å šã«ç©ºã§ã¯ãªããããã¯ã§æ§æãããããã§ãã ãã®é åãååšãããšããã£ã¹ã¯äžã®ãã¡ã€ã«ãäœãšãäžæžããç¶ããããšãã§ããŸãã
æªãç¶æ³ã®äŸïŒå æããŒãžã®ããªã¥ãŒã ãäºçŽãªãã§ãŠãŒã¶ãŒãå©çšã§ããéãè¶ ããŠããªãã«ãããããããæžã蟌ãå ŽæããããŸããã
ãã®å Žåãã¬ããŒãžã³ã¬ã¯ã¿ãŒã¯æžã蟌ã¿ãšåæã«åäœãããããã¯ãRAMã«èªã¿åãããã£ã¹ã¯äžã®ãããã¯ãæ¶å»ãïŒé·ãæäœãæ¶å»ã¯ç©ºçœããŒãžãžã®æžã蟌ã¿900ÎŒsãšæ¯èŒããŠ3000ÎŒsããããŸãïŒãã¡ã€ã³ã¡ã¢ãªãããããã¯ãæžã蟌ã¿ãŸãã é 延ã¯ã æžã蟌ã¿å¢å¹ -è«çæžã蟌ã¿æäœããšã«5ã10ã®ç©çæžã蟌ã¿æäœã®å¢å ã«ãããã®ã§ãã
ãããã£ãŠãæäœçšã®ãã£ã¹ã¯ã¹ããŒã¹ãå€ãã»ã©ãæžã蟌ã¿é床ã¯éããªããŸãã ããã¯ã°ã©ãŠã³ãã®ã¬ããŒãžã³ã¬ã¯ã¿ãŒã¯ããããã¯ã®ã¯ãªãŒãã³ã°ãšããã©ã°ã ãã§ãªãããããã¯å šäœã®æžã蟌ã¿/ã¯ãªãŒã³ïŒP / EïŒãµã€ã¯ã«ã®åçãªåé ã«ãé¢äžããŠãããããåãããã«æ©èããŸãã
çŸä»£ã®ãã©ã€ãã«ã¯ãTRIMãå¿ èŠãšããªãåªããã¬ããŒãžã³ã¬ã¯ã¿ãŒããããšããç¥è©±ããããŸãã ããã¯å®å šã«ééã£ãŠããŸããã¬ããŒãžã³ã¬ã¯ã¿ãŒãšTRIMã¯ç°ãªãåäœãããŸãã
ç£æ¥çšãã©ã€ãã«ã¯å€ãã®å Žåã50ïŒ ä»¥äžã®ã¹ãã¢é åããããããTRIMã®æ¬ åŠã¯éèŠã§ã¯ãããŸããã æ®ãã®ãã£ã¹ã¯ã«ã¯ãã»ãšãã©ã®å Žåãæ瀺çã«å®£èšãããã¹ãã¢é åããŸã£ãããªãããäžååã§ãã ãã¹ãã§ã¯ãç©çã¡ã¢ãªå šäœïŒãªã¶ãŒãé åãå«ãïŒã®25ã29ïŒ ã®ãªãŒããŒããããžã§ãã³ã°ããªã¥ãŒã ãè¯ã圱é¿ãäžããããšã瀺ãããŠããŸãã ãããã£ãŠããã£ã¹ã¯ã®äºçŽã¹ããŒã¹ãäžååãªå Žåã¯ãèªåã§ãªãŒããŒããããžã§ãã³ã°ãè¡ãå¿ èŠããããŸãã
3ã€ã®æ¹æ³ããããŸãã
-RAIDã®äœæåŸãæªå²ãåœãŠé åã®äžéšãæ®ãããã«ãã£ã¹ã¯ãããŒã¯ããŸãã
-RAIDãäœæããåã«ãATAã³ãã³ãã䜿çšããŠãã¹ãä¿è·é å ïŒ howto ïŒãäœæããŸãã
-ãã£ã¹ã¯å®¹éã®äžéšã®ã¿ã䜿çšããããã«RAIDã³ã³ãããŒã©ãŒãæ§æããŸãã
空ãé åãéžæããåã«ã次ã®2ã€ã®æ¹æ³ã®ããããã§ããã®é åãäœã䜿çšãããŠããªãããšããã£ã¹ã¯ã«ç¥ãããå¿ èŠããããŸãã
-ãã£ã¹ã¯ãå¥ã®ã³ã³ãããŒã©ãŒã«æ¥ç¶ããATA TRIMã³ãã³ããéä¿¡ããŸã ïŒãŸãã¯OïŒO Defragã䜿çšããŸã-cliã€ã³ã¿ãŒãã§ã€ã¹ãWindows 8çµã¿èŸŒã¿ãã£ã¹ã¯ãªããã£ãã€ã¶ãŒãŸãã¯Anvil's Storage UtilitiesããããŸãïŒã
-ATA Secure Eraseã³ãã³ããéä¿¡ããŠãFTLããŒãã«ãå®å šã«ã¯ãªãŒã³ã¢ããããŸãã
0x00ãŸãã¯0xFFãæžã蟌ããšããããã¯ã䜿çšãããŠããªãããšããã£ã¹ã¯ã«èªèãããããŒãžã§ã³ããããŸãïŒãããããTony TRIMãã¡ãœããïŒã ããããäžéšã®ã³ã³ãããŒã©ãŒã§ã¯ããã¯æ©èœããŸãããç§ã®ãã¹ãã§ã¯å€æŽã¯ãããŸããã§ããã
å®éã«
Windows 8.1ãã€ã³ã¹ããŒã«ãããŠããIntel RST RAID 1ã«2å°ã®Samsung SSD 540 Pro 512 GBãã©ã€ãããããŸãã 1幎éã®ä»äºã®åŸãããã©ãŒãã³ã¹ã枬å®ããŸããããäžå¿«ãªé©ããèŠããŸããã TRIMã確èªãããšãããåäœããŠããªãããšãããããŸããã
-Windowsã§ã®TRIMãã§ãã¯
-Linuxã§ã®TRIMãã§ãã¯ïŒ
# lsblk -D
é¢é£ãããã¹ãŠã®ã³ã³ããŒãã³ãã«ã€ããŠãDISC-GRANåãšDISC-MAXåã¯äž¡æ¹ãšã0ãã倧ããå¿
èŠããããŸãã
代æ¿ãªãã·ã§ã³ïŒ
# dd if=/dev/urandom of=tempfile bs=1M count=3 # hdparm --fibmap tempfile # hdparm --read-sector [ADDRESS] /dev/sda # rm tempfile && sync && sleep 120 # hdparm --read-sector [ADDRESS] /dev/sda
ãã¡ã€ã«ãåé€ããåŸããã£ã¹ã¯ã¯0x00ãŸãã¯0xFFã§ããå¿
èŠããããŸãããããã¯ä¿¡é Œã§ããªãæ¹æ³ã§ããç°ãªããã£ã¹ã¯ã¯ç°ãªãåäœãããŸãã
ãªã¢ã«ã¿ã€ã TRIMã¯ããã£ã¹ã¯ãããŠã³ããããšãã«ãç Žæ£ããªãã·ã§ã³ã«ãã£ãŠæå¹ã«ãªããŸãã
# grep -i discard /etc/fstab # mount | grep -i discard
ã·ã³ã°ã«ãã£ã¹ã¯ããã³LVMãã¡ã€ã«ã·ã¹ãã ã®TRIMã¯ãLinux 2.6.33ã«ãŒãã«ãããµããŒããããŠããŸãã mdraidã®TRIMã¯ãLinuxã«ãŒãã«3.7ãããµããŒããããŠããŸã ã ãã ããCentOS 6ã§ãµããŒããããŠããããã«ãå€ãã«ãŒãã«ããŒãžã§ã³ã«ç§»æ€ããããšãã§ããŸãã
ããã©ã«ãã§ã¯ãUbuntuã¯fstrimã䜿çšããŠé±ã«1åå®æçã«TRIMãå®è¡ããŸãããIntelãSamsungãOCZãSanDiskãPatriotãããã³ãhdparmããã€ã³ã¹ããŒã«ãããŠããå Žåã
-FreeBSDã®TRIMãã§ãã¯ïŒ
ZFS 㯠ãFreeBSD 9.2以éãããã©ã«ãã§TRIMããµããŒãããŠããŸãã
# sysctl -a | grep -i 'zfs.*trim'
GEOM RAID gmirror 㯠ãFreeBSD 9.1ã§TRIMããµããŒãããŠããŸãã
gstat -d
d / såã¯BIO_DELETE /ç§ã§ãã
Intel RST RAIDã¯ãäŸå€ãšããŠãã¿ã€ãRAID 1ã«å¯ŸããŠã®ã¿TRIMããµããŒãããŸããæå¹ã«ããã«ã¯ãIntel RSTãã©ã€ããŒãããŒãžã§ã³11以äžã§ãããOROMïŒã¬ã¬ã·ãŒããŒãïŒãŸãã¯SataDriverïŒUEFIããŒãïŒããŒãžã§ã³11以äžã®ãã¡ãŒã ãŠã§ã¢ããŸãã¯å€ãããŒãžã§ã³ã§ããããšã確èªããå¿ èŠããããŸãããããã ããããé©çšããŸãã ã TRIMã¯ãããŒãžã§ã³3.7.0.1093以éã®Intel RSTe RAID 0/1/10ã§ãµããŒããããŠããŸãã
ãªãŒããŒããããžã§ãã³ã°çšã«æªå²ãåœãŠã®ãã£ã¹ã¯ããŒãã£ã·ã§ã³ãäœæããããšã«ããŸããã
1. Acronis Backupã䜿çšããŠããã£ã¹ã¯ã€ã¡ãŒãžãååŸããŸããã ããŒãã£ã·ã§ã³ããŒãã«ãä¿åããŸããïŒæåã®ã»ã¯ã¿ãŒãæåŸã®ã»ã¯ã¿ãŒãã»ã¯ã·ã§ã³ã®GPTã¿ã€ããGPTäžæã®èå¥åãã»ã¯ã·ã§ã³åãæã€ããšãéèŠã§ãïŒã
2. BIOSãåèµ·åããSSDã®å®å šæ¶å»ãè¡ããŸããã ãã®é ç®ãBIOSã«ãªãå Žåã¯ã hdparam ïŒãŸãã¯ãããšããã§ã¯Windowsã®äžã«ãããŸãïŒã HDDEraseãŸãã¯HDAT2ã䜿çšããŠã³ãã³ããå®è¡ã§ããŸãã
3. 2ã€ã®ãã£ã¹ã¯ã§RAID 1ãåéããŸããã
ããã§éèŠãªãã€ã³ãïŒã¢ã¬ã€ã®åæåäžã«ãRAIDã³ã³ãããŒã©ãŒã¯1ã€ã®ãã£ã¹ã¯ããåã»ã¯ã¿ãŒãèªã¿åãã2çªç®ã®ãã£ã¹ã¯ã«æžã蟌ã¿ãŸãã çè«çã«ã¯ãããã«ããäºæ¥å šäœã劚ããã ã1ã€ã®ãã©ã€ãã§éå°ãªããããžã§ãã³ã°ãçºçããããšã¯ãããŸããã ãããããã¹ãã§ã¯ãäœããã®çç±ã§ãã®æ¹æ³ãæ©èœããããšã瀺ãããŠããŸãã ããã«ã€ããŠã¯èª¬æããããŸããã
4. LiveCDããèµ·åãã GPT fdiskã䜿çšããŠç®çã®ããŒãã£ã·ã§ã³ããŒãã«ãäœæããŸãããæåŸã®ããŒãã£ã·ã§ã³ã¯ä»¥åãã104 GBå°ãªããªããŸããã ããŒãã£ã·ã§ã³ã¯ããããã¯ã®ãµã€ãºã§ã¯ãªãããã£ã¹ã¯ããŒãžã®ãµã€ãºã§æŽåïŒããŒãã£ã·ã§ã³æŽåïŒããå¿ èŠããããŸãã
5.ããã¯ã¢ããããåã»ã¯ã·ã§ã³ã埩å ããŸããã
ãã®åŸããã£ã¹ã¯ãå®å šã«æºããããã¹ããå®è¡ããŸããã ããã¯ææªã®å Žåã瀺ããŠããã¯ãã§ãã Windowsãã£ãã·ã¥ããªã³ã«ãªããéåžžã®ãã£ãã·ã¥æžã蟌ã¿ããªãã«ãªããInter RSTã©ã€ãããã¯ããªãã«ãªãããã¹ãŠã®ãã¹ãã§40 GBã®åºå®ãµã€ãºã®ãã©ã€ãé åã䜿çšãããŸãã ããã©ãŒãã³ã¹ã¯æéã®çµéãšãšãã«å€åããå¯èœæ§ãããããããã©ã€ãã®ãã¹ãã¯ç°¡åã§ã¯ãããŸããã 以äžã¯å®åžžç¶æ ã®ææšã§ãã
3ã€ã®ç¶æ ãæ¯èŒããŸãã
-RAIDãªãã®ãã©ã€ã1å°ããã«è£ åã6.58ïŒ æšæºã®é ãã¹ãã¢ãšãªã¢ã
-TRIM空ãã¹ããŒã¹ãå®è¡ããåŸãRAIDãªãã®1ã€ã®ãã©ã€ãã
-RAID 1ã®2å°ã®ãã£ã¹ã¯ãæºæ¯ã6.58ïŒ æšæºã®é ãã¹ãã¢ãšãªã¢ã
-RAID 1ã®2å°ã®ãã£ã¹ã¯ãå®å šã«ãã£ã±ãã27.24ïŒ ã®ãªãŒããŒããããžã§ãã³ã°ïŒé衚瀺ã®ã¹ãã¢é åãå«ãïŒã
é
延ãšæšæºåå·®
ããŒãã«
çµæã®åæïŒ
-RAID 1ããã®èªã¿åãã¯ããã¡ãŒã ãŠã§ã¢RAIDãããªããšããäºå®ã«ãããããããåäžã®ãã£ã¹ã¯ããã®èªã¿åããããé«éã§ãã
-èšé²ã¯ããéããããå€ãã®æªå²ãåœãŠé åããããŸããæåã¯TRIMã2çªç®ã¯èªå®¶è£œã®ãªãŒããŒããããžã§ãã³ã°ã§ãã
å®åžžç¶æ ã¯åžžã«è¿ éã«éæããããšã¯éããŸããã ãã€ããã¯ã¹ã®æåŸã®æ§æïŒ27.24ïŒ ã®ãªãŒããŒããããžã§ãã³ã°ïŒã®ãã¹ããšææªã®ã±ãŒã¹ãèŠãŠã¿ãŸãããã
奜å¥å¿ã匷ãããã»ã¹ã¯æåã®400ç§éç¶ãããã®åŸãçç£æ§ãåäžããŠå®å®ããŸãã ã¬ããŒãžã³ã¬ã¯ã¿ãŒã¯èšé²ãšäžŠè¡ããŠåäœãããããã¯ãæé©åããŠèšé²ã®ããã«æºåãããšèããŠããŸãã ãã®åäœã¯æ¯åã§ã¯ãªããæã 芳å¯ãããŸãã é 次æžã蟌ã¿ã¯æ倧70 MB /ç§ãã©ã³ãã èšé²ã¯æ倧18,000 IOPSã§ããããšãããããŸãã ãããã®æ°å€ã¯ããªãŒããŒããããžã§ãã³ã°ãªãã®å Žåã®2åã§ãïŒãããã32 MB / sããã³7139 IOPSïŒã å®åžžç¶æ ãå®éã«éåžžã«é«ãããã©ãŒãã³ã¹ãçºæ®ããããšã確èªããããã«ãå¹³å69,721 IOPSã§490 GBã®ãã£ã¹ã¯ã«æžã蟌ãŸãããã¹ãã30åã§å®è¡ããŸããã
çµæãååãšæ¯èŒããæé©ãªãªãŒããŒããããžã§ãã³ã°ãµã€ãºãéžæã§ããŸãã
- ææ°ã®SSDã®ã¹ãã¢ãšãªã¢ãšããã©ãŒãã³ã¹ã®äžè²«æ§ã®é¢ä¿ãæ¢ã ã
- ããã©ãŒãã³ã¹ã®äžè²«æ§ ã
- ãµã ã¹ã³850 PRO 512GBããã©ãŒãã³ã¹ ã
ç°¡åã«
-ãã£ã¹ã¯ãOSããATA TRIMãåãåã£ãå Žåãå¿é ããããšã¯ãããŸããããã£ã¹ã¯ã¹ããŒã¹ã®äžéšã空ããŠããã°ååã§ãã
-é«äŸ¡ãªç£æ¥çšãã£ã¹ã¯ã䜿çšããŠããå Žåã¯ãå èµã¹ãã¢ãšãªã¢ã®ããªã¥ãŒã ã確èªããååã§ããã°ãé²é³ã«åé¡ã¯ãããŸããã
-ãã®ä»ã®å Žåã¯ãããŒã¯ãããŠããªãé åãæ®ãå¿ èŠããããŸãããã®ãµã€ãºã倧ããã»ã©ãèšé²ã¬ã€ãã³ã·ã®æšæºåå·®ã¯å°ãããªããŸãã
-ã¬ããŒãžã³ã¬ã¯ã¿ãŒã«ã¯ãªãŒã³ãããã¯ãæºåããæéããªããæžã蟌ã¿é床ãäœäžããŠäžå®å®ã«ãªãããšããããŸãã
-ãªãŒããŒããããžã§ãã³ã°åŸã確ç«ãããæ倧æžã蟌ã¿é床ã¯7000 IOPSãã68000 IOPSã«å¢å ããå¹³åæå°å€ã¯6000 IOPSãã19000 IOPSã«å¢å ããŸããã