群晖NAS SSD Cache缓存机制
缓存技术不是群晖独有,但是群晖科技公司有其自己开发的缓存算法。这种缓存机制的主要目的是通过使用固态硬盘(SSD)的高速读写能力,来提高存储设备的数据处理速度和性能。
具体来说,群晖SSD Cache缓存机制的工作原理是,当存储设备接收到数据读写请求时,首先会检查请求的数据是否已经在SSD缓存中。如果数据已经在缓存中,那么存储设备就直接从缓存中读取数据,从而大大提高了数据的读取速度。如果数据不在缓存中,那么存储设备就会从硬盘等慢速存储设备中读取数据,并将其存入SSD缓存中,以便于下次快速读取。
此外,群晖SSD Cache缓存机制还具有智能缓存管理功能。它可以根据数据的访问频率和重要性,自动调整数据的缓存策略,以确保最常用的数据始终在缓存中,从而提高存储设备的响应速度和性能。
SSD Cache运作模式
Synology NAS 可以从两种 SSD 缓存类型中进行选择:只读缓存和读写缓存。两者在不同的应用程序中都很有用。
SSD缓存格式 | DSM7 | DSM6.2 | SSD最小数 | SSD最大数 |
只读 | RAID 0/1/10 | RAID0 | 1 | 6(DSM7) 12(DSM6.2) |
读写 | RAID 1/5/6/10 | RAID 1/5/6 | 2 | 6(DSM7) 12(DSM6.2) |
支持的RAID模式 | 支持的RAID模式 |
读写 SSD 缓存始终具有冗余。至少需要 1 个 SSD 才能创建只读缓存,而至少需要 2 个 SSD 才能创建读写缓存。
适用场景
- SSD 缓存可在输入输出 (I/O) 操作需要频繁访问随机放置的小块数据的情况下提高性能。
- 如果使用Synology NAS 用于以下应用程序,SSD 缓存可能会提高性能:
- 文件服务器(连接的并发用户越多,访问小于 1 MB 文件的次数越多,性能提升越大)
- iSCSI 和 Fibre Channel存储
- Synology Virtual Machine Manager
- 数据库存储
- 快照
- 网页服务器
- 使用 Synology Active Backup for Business 执行定期备份任务
- 邮件服务
- 如果 Synology NAS 上经常访问的数据量超过 SSD 缓存的大小上限,或者如果应用程序始终处于高负载状态,则不建议使用 SSD 缓存。缓存刷新会占用大量资源,如果没有非高峰时间,可能会影响性能。建议在全 SSD 存储空间上存储经常访问的数据并运行高负载应用程序,以加快操作速度。
不适用场景
- 用于上传/下载/访问大文件的文件服务器
- 主要采用顺序访问的文件服务器
- 视频串流/播放
优化SSD Cache 措施
- 群晖会将文件填满缓存,但缓存释放速度却慢,当缓存占用率 99%后,会反复对一些块进行擦除,写入,导致健康度下降。在配置SSD 缓存的时候,不要把所有的空间完全都分配给缓存,建议只分配 80%,这样可以缓解此类情况。
- 群晖DSXX15+设备中所使用的的SATA控制器存在性能问题(XX表示盘位数),最大传输速率受限于具体的硬盘插槽,使用SSD时必须使用第一或者第二插槽,以获取 SATA 6.0 Gb/s,如果是15代之后的NAS,则无此限制,SSD无安装插槽的限制。
- Drive Lifetime (Total Bytes Written)简称TBW,作为衡量SSD使用寿命的参数,企业级SSD与消费级SSD所提供的的使用寿命是不一样的,前者更适合作为SSD Cache。
- SSD的性能和寿命都会受到温度的影响。因此,对于SSD的使用,存在一定的温度限制。这个温度限制是指在正常使用条件下,SSD能够保证其性能和稳定性的最高和最低温度范围。如果超过这个范围,可能会导致SSD的性能下降,甚至损坏。加装扇热马甲是一个不错的有效措施。
- 提升缓存命中率,在相同接口的情况下,通过调整SSD cache的磁盘容量,或者不同接口的情况下,采用NVME SSD,升级ssd 固件,采用TRIM命令有效优化SSD性能。
缓存界面
S.M.A.R.T参数查询
图形化查询
SSD M.2 NVME
percentage used使用百分比:
包含基于实际使用情况和制造商对NVM寿命的预测的特定供应商对NVM子系统寿命使用百分比的估计。值为100表示NVM子系统中NVM的估计耐力已经消耗,但可能不表示NVM子系统故障。
这块SSD使用了7个月,消耗了6%,作为iscsi加速缓存,还是有效果的。
smartctl命令
SSD M.2 NGFF
机械硬盘-真伪识别
sssss:~# smartctl -x -d sat -T permissive /dev/sdd
smartctl 6.5 (build date May 2 2023) [x86_64-linux-3.10.105] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Model Family: Seagate Skyhawk
Device Model: ST4000VX007-2DT16 6
Serial Number: WHICHCBI
LU WWN Device Id: 5 000cca 24cd5a041
Firmware Version: MJAOA5F0
User Capacity: 4,000,787,030,016 bytes [4.00 TB]
Sector Sizes: 512 bytes logical, 4096 bytes physical
Rotation Rate: 7200 rpm
Form Factor: 3.5 inches
Device is: In smartctl database [for details use: -P show]
ATA Version is: ATA8-ACS T13/1699-D revision 4
SATA Version is: SATA 3.0, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is: Sat Dec 23 10:02:04 2023 CST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
AAM feature is: Unavailable
APM feature is: Disabled
Rd look-ahead is: Enabled
Write cache is: Enabled
ATA Security is: Disabled, NOT FROZEN [SEC1]
Wt Cache Reorder: Enabled
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
General SMART Values:
Offline data collection status: (0x82) Offline data collection activity
was completed without error.
Auto Offline Data Collection: Enabled.
Self-test execution status: ( 0) The previous self-test routine completed
without error or no self-test has ever
been run.
Total time to complete Offline
data collection: ( 24) seconds.
Offline data collection
capabilities: (0x5b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
No Conveyance Self-test supported.
Selective Self-test supported.
SMART capabilities: (0x0003) Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability: (0x01) Error logging supported.
General Purpose Logging supported.
Short self-test routine
recommended polling time: ( 1) minutes.
Extended self-test routine
recommended polling time: ( 1) minutes.
SCT capabilities: (0x003d) SCT Status supported.
SCT Error Recovery Control supported.
SCT Feature Control supported.
SCT Data Table supported.
SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAGS VALUE WORST THRESH FAIL RAW_VALUE
1 Raw_Read_Error_Rate PO-R-- 100 100 016 - 0
2 Throughput_Performance P-S--- 137 137 054 - 78
3 Spin_Up_Time POS--- 100 100 024 - 0
4 Start_Stop_Count -O--C- 100 100 000 - 2
5 Reallocated_Sector_Ct PO--CK 100 100 005 - 0
7 Seek_Error_Rate PO-R-- 100 100 067 - 0
8 Seek_Time_Performance P-S--- 124 124 020 - 33
9 Power_On_Hours -O--C- 100 100 000 - 87h+00m+00.000s
10 Spin_Retry_Count PO--C- 100 100 060 - 0
12 Power_Cycle_Count -O--CK 100 100 000 - 2
192 Power-Off_Retract_Count -O--CK 100 100 000 - 6
193 Load_Cycle_Count -O--C- 100 100 000 - 6
194 Temperature_Celsius -O---- 206 206 000 - 29 (Min/Max 12/35)
196 Reallocated_Event_Count -O--CK 100 100 000 - 0
197 Current_Pending_Sector -O---K 100 100 000 - 0
198 Offline_Uncorrectable ---R-- 100 100 000 - 0
199 UDMA_CRC_Error_Count -O-R-- 200 200 000 - 0
||||||_ K auto-keep
|||||__ C event count
||||___ R error rate
|||____ S speed/performance
||_____ O updated online
|______ P prefailure warning
General Purpose Log Directory Version 1
SMART Log Directory Version 1 [multi-sector log support]
Address Access R/W Size Description
0x00 GPL,SL R/O 1 Log Directory
0x01 SL R/O 1 Summary SMART error log
0x03 GPL R/O 1 Ext. Comprehensive SMART error log
0x04 GPL R/O 7 Device Statistics log
0x06 SL R/O 1 SMART self-test log
0x07 GPL R/O 1 Extended self-test log
0x08 GPL R/O 2 Power Conditions log
0x09 SL R/W 1 Selective self-test log
0x10 GPL R/O 1 SATA NCQ Queued Error log
0x11 GPL R/O 1 SATA Phy Event Counters log
0x12 GPL R/O 1 SATA NCQ NON-DATA log
0x20 GPL R/O 1 Streaming performance log [OBS-8]
0x21 GPL R/O 1 Write stream error log
0x22 GPL R/O 1 Read stream error log
0x80 GPL R/W 63 Host vendor specific log
0x81-0x9f GPL,SL R/W 16 Host vendor specific log
0xb2 GPL VS 63 Device vendor specific log
0xc8 GPL VS 617 Device vendor specific log
0xe0 GPL,SL R/W 1 SCT Command/Status
0xe1 GPL,SL R/W 1 SCT Data Transfer
SMART Extended Comprehensive Error Log Version: 1 (1 sectors)
No Errors Logged
SMART Extended Self-test Log Version: 1 (1 sectors)
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Short offline Completed without error 00% 53748 -
# 2 Vendor (0xb0) Completed without error 00% 53665 -
# 3 Vendor (0x71) Completed without error 00% 53665 -
SMART Selective self-test log data structure revision number 1
SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS
1 0 0 Not_testing
2 0 0 Not_testing
3 0 0 Not_testing
4 0 0 Not_testing
5 0 0 Not_testing
Selective self-test flags (0x0):
After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.
SCT Status Version: 3
SCT Version (vendor specific): 256 (0x0100)
SCT Support Level: 1
Device State: Active (0)
Current Temperature: 29 Celsius
Power Cycle Min/Max Temperature: 18/35 Celsius
Lifetime Min/Max Temperature: 12/35 Celsius
Under/Over Temperature Limit Count: 0/0
SCT Temperature History Version: 2
Temperature Sampling Period: 1 minute
Temperature Logging Interval: 1 minute
Min/Max recommended Temperature: 0/60 Celsius
Min/Max Temperature Limit: -40/70 Celsius
Temperature History Size (Index): 128 (84)
Index Estimated Time Temperature Celsius
85 2023-12-23 07:55 28 *********
... ..( 14 skipped). .. *********
100 2023-12-23 08:10 28 *********
101 2023-12-23 08:11 29 **********
102 2023-12-23 08:12 28 *********
... ..( 8 skipped). .. *********
111 2023-12-23 08:21 28 *********
112 2023-12-23 08:22 29 **********
113 2023-12-23 08:23 29 **********
114 2023-12-23 08:24 29 **********
115 2023-12-23 08:25 28 *********
... ..( 4 skipped). .. *********
120 2023-12-23 08:30 28 *********
121 2023-12-23 08:31 29 **********
122 2023-12-23 08:32 28 *********
123 2023-12-23 08:33 28 *********
124 2023-12-23 08:34 28 *********
125 2023-12-23 08:35 29 **********
126 2023-12-23 08:36 29 **********
127 2023-12-23 08:37 28 *********
0 2023-12-23 08:38 29 **********
1 2023-12-23 08:39 28 *********
2 2023-12-23 08:40 28 *********
3 2023-12-23 08:41 29 **********
4 2023-12-23 08:42 28 *********
5 2023-12-23 08:43 28 *********
6 2023-12-23 08:44 28 *********
7 2023-12-23 08:45 29 **********
8 2023-12-23 08:46 29 **********
9 2023-12-23 08:47 29 **********
10 2023-12-23 08:48 28 *********
11 2023-12-23 08:49 29 **********
12 2023-12-23 08:50 28 *********
... ..( 19 skipped). .. *********
32 2023-12-23 09:10 28 *********
33 2023-12-23 09:11 29 **********
34 2023-12-23 09:12 29 **********
35 2023-12-23 09:13 29 **********
36 2023-12-23 09:14 28 *********
... ..( 2 skipped). .. *********
39 2023-12-23 09:17 28 *********
40 2023-12-23 09:18 29 **********
41 2023-12-23 09:19 28 *********
... ..( 3 skipped). .. *********
45 2023-12-23 09:23 28 *********
46 2023-12-23 09:24 29 **********
47 2023-12-23 09:25 29 **********
48 2023-12-23 09:26 28 *********
... ..( 3 skipped). .. *********
52 2023-12-23 09:30 28 *********
53 2023-12-23 09:31 29 **********
54 2023-12-23 09:32 29 **********
55 2023-12-23 09:33 28 *********
56 2023-12-23 09:34 29 **********
57 2023-12-23 09:35 29 **********
58 2023-12-23 09:36 28 *********
... ..( 2 skipped). .. *********
61 2023-12-23 09:39 28 *********
62 2023-12-23 09:40 29 **********
63 2023-12-23 09:41 29 **********
64 2023-12-23 09:42 29 **********
65 2023-12-23 09:43 28 *********
66 2023-12-23 09:44 29 **********
67 2023-12-23 09:45 28 *********
68 2023-12-23 09:46 28 *********
69 2023-12-23 09:47 29 **********
... ..( 3 skipped). .. **********
73 2023-12-23 09:51 29 **********
74 2023-12-23 09:52 28 *********
75 2023-12-23 09:53 29 **********
... ..( 8 skipped). .. **********
84 2023-12-23 10:02 29 **********
SCT Error Recovery Control:
Read: Disabled
Write: Disabled
Device Statistics (GP Log 0x04)
Page Offset Size Value Flags Description
0x01 ===== = = === == General Statistics (rev 2) ==
0x01 0x008 4 2 --- Lifetime Power-On Resets
0x01 0x018 6 1985868203 --- Logical Sectors Written
0x01 0x020 6 2899951 --- Number of Write Commands
0x01 0x028 6 7759834233 --- Logical Sectors Read
0x01 0x030 6 7931178 --- Number of Read Commands
0x03 ===== = = === == Rotating Media Statistics (rev 1) ==
0x03 0x008 4 87 --- Spindle Motor Power-on Hours
0x03 0x010 4 87 --- Head Flying Hours
0x03 0x018 4 6 --- Head Load Events
0x03 0x020 4 0 --- Number of Reallocated Logical Sectors
0x03 0x028 4 0 --- Read Recovery Attempts
0x03 0x030 4 0 --- Number of Mechanical Start Failures
0x04 ===== = = === == General Errors Statistics (rev 1) ==
0x04 0x008 4 0 --- Number of Reported Uncorrectable Errors
0x04 0x010 4 0 --- Resets Between Cmd Acceptance and Completion
0x05 ===== = = === == Temperature Statistics (rev 1) ==
0x05 0x008 1 29 --- Current Temperature
0x05 0x010 1 29 N-- Average Short Term Temperature
0x05 0x018 1 - N-- Average Long Term Temperature
0x05 0x020 1 35 --- Highest Temperature
0x05 0x028 1 12 --- Lowest Temperature
0x05 0x030 1 29 N-- Highest Average Short Term Temperature
0x05 0x038 1 22 N-- Lowest Average Short Term Temperature
0x05 0x040 1 - N-- Highest Average Long Term Temperature
0x05 0x048 1 - N-- Lowest Average Long Term Temperature
0x05 0x050 4 0 --- Time in Over-Temperature
0x05 0x058 1 60 --- Specified Maximum Operating Temperature
0x05 0x060 4 0 --- Time in Under-Temperature
0x05 0x068 1 0 --- Specified Minimum Operating Temperature
0x06 ===== = = === == Transport Statistics (rev 1) ==
0x06 0x008 4 8 --- Number of Hardware Resets
0x06 0x010 4 4 --- Number of ASR Events
0x06 0x018 4 0 --- Number of Interface CRC Errors
|||_ C monitored condition met
||__ D supports DSN
|___ N normalized value
SATA Phy Event Counters (GP Log 0x11)
ID Size Value Description
0x0001 2 0 Command failed due to ICRC error
0x0002 2 0 R_ERR response for data FIS
0x0003 2 0 R_ERR response for device-to-host data FIS
0x0004 2 0 R_ERR response for host-to-device data FIS
0x0005 2 0 R_ERR response for non-data FIS
0x0006 2 0 R_ERR response for device-to-host non-data FIS
0x0007 2 0 R_ERR response for host-to-device non-data FIS
0x0009 2 5 Transition from drive PhyRdy to drive PhyNRdy
0x000a 2 3 Device-to-host register FISes sent due to a COMRESET
0x000b 2 0 CRC errors within host-to-device FIS
0x000d 2 0 Non-CRC errors within host-to-device FIS
异常点
型号 | ST4000VX007 | ||
异常点 | 固件版本不匹配 | 正版由CV开头,标识为CV11 | 假货由MJ开头,MJOA |
转速不匹配 | 低转速5900 rpm | 7200 rpm | |
使用时间不匹配 | Power_On_Hours = LifeTime(hours) | Power_On_Hours =87H LifeTime(hours)=53748=6.1年? | |
SN号不匹配 | 字母和数字的组合 | whichcbi |