Recently, copying files through an NFS mount from one of my Raspberry Pi’s to my DNS-320 using Linux CP command has slowed to a crawl. I don’t believe I have introduced any changes that would cause this, however, as
I’m sure many of you have experienced in the past I will probably have an “oh yeah” moment where I realize I did somehow cause the problem but currently can’t see the forest through the trees.
While monitoring the copy using Nautilus from my Ubuntu desktop the slowness is painfully obvious where there are periods of no change though there are sometimes spurts of speed every now and then. Very inconsistent!
Anyway, monitoring the DNS-320 using Alt-F status page shows a load that starts out normal and then steadily increasing to between 5 and 6 with CPU pegged at 100%. When I look at the System Log I don’t see anything obvious (though I really don’t know what to look for). I looked just now and io shows 75% which seems high but I would think during data transfer you would see high io. I have included a screen shot of the current Status page and the System Log running processes.
I turned NFS off as an experiment and found that Samba links work just fine for copying data from the same Raspberry Pi to the same directory and same drive on the NAS with which NFS seems to have a problem. That is annoying because my understanding is that NFS is the faster, better and more efficient route to take.
If anyone sees something I’m missing or has suggestions for where to look for a problem I am all ears!
Thanks for your response João, what you say sounds logical.
It is just frustrating that it all worked well for months and just all of a sudden it stopped working. Especially how the two different NAS drives (each with samba and nfs shares) stopped working at the same time.
Anyway, I have successfully modified one of my scripts that points to one drive to now use samba instead of nfs. The other script is not cooperating but it uses rsync so not sure if maybe if rsync has a problem with samba?
Well, then the root cause is external... something external to the boxes deployed that behaviour.
Anyway, I have successfully modified one of my scripts that points to one drive to now use samba instead of nfs. The other script is not cooperating but it uses rsync so not sure if maybe if rsync has a problem with samba?don't think so. Not even not sure if smb/nfs are conflicting by themselves, given fast enough IO and CPU.Anyway, I'm working on that.
After several days of testing and research I now believe this is not a network problem but is actually caused by the new 8TB hard drive I installed at the end of January. It is a Seagate ST8000DM004-2CX188 (which I shucked from an external enclosure) and from what I’ve read it is based on SMR technology and therefore not recommended for NAS use. I took a chance and bought it anyway and it performed very well up until the middle of March. I don’t understand what caused write speed to slow down seemingly overnight but I found many online postings from people who experienced almost the exact same problem with this drive. One posting even alluded to their personal experience with the drive having problems only in Linux and no problems when used with Windows. The external drive is definitely marketed for Windows platforms with nothing said about Linux in the marketing materials. Buyer beware, I guess.
The network share to the other NAS drive does not have any problems and I can’t really find where I had actually had a problem with that one so I was mistaken on having thought that there was a problem there. I was able to copy a large file across the network to that shared drive with no problem. I then determined that the new drive was the problem after logging into the NAS with SSH to use the cp command to copy that file directly from the working drive to the new drive. That copy process exhibited the same performance problem I experienced across the network. I am marking this issue as complete although if anyone has knowledge of how to resolve this problem and make this drive work I would rather do that then buy a new drive. It seems like it should be possible considering it worked for two months before becoming obstinate. Anyway, if not then I will probably be acquiring a new drive which should eliminate this problem.
I ran (or so I thought) the long test yesterday starting at about 2:47pm my time (Central/USA) and it displayed a message saying it would completed today at 3:08am. Should I have stayed on that screen?
I didn't as I assumed I would be able to access the results later. Looking at the SMART information for that drive, however, I see what appears to be the same information that was displayed before the test. Is there some indicator that I should see in that log to show that the long test was run?
Okay, well I don't see anything here that slaps me in the face and says: "Hey Dummy! Here's your problem!" So I'm not going to ask for your interpretation... just your opinion ;)
smartctl 6.5 2016-05-07 r4318 [armv5tel-linux-4.4.86] (local build) Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org === START OF INFORMATION SECTION === Device Model: ST8000DM004-2CX188 Serial Number: ZCT1J3QA LU WWN Device Id: 5 000c50 0c3cdf441 Firmware Version: 0001 User Capacity: 8,001,563,222,016 bytes [8.00 TB] Sector Sizes: 512 bytes logical, 4096 bytes physical Rotation Rate: 5425 rpm Form Factor: 3.5 inches Device is: Not in smartctl database [for details use: -P showall] ATA Version is: ACS-3 T13/2161-D revision 5 SATA Version is: SATA 3.1, 6.0 Gb/s (current: 3.0 Gb/s) Local Time is: Sat Apr 4 01:59:58 2020 CDT SMART support is: Available - device has SMART capability. SMART support is: Enabled === START OF READ SMART DATA SECTION === SMART overall-health self-assessment test result: PASSED SMART Attributes Data Structure revision number: 10 Vendor Specific SMART Attributes with Thresholds: ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE 1 Raw_Read_Error_Rate 0x000f 080 064 006 Pre-fail Always - 111632038 3 Spin_Up_Time 0x0003 092 092 000 Pre-fail Always - 0 4 Start_Stop_Count 0x0032 100 100 020 Old_age Always - 297 5 Reallocated_Sector_Ct 0x0033 100 100 010 Pre-fail Always - 0 7 Seek_Error_Rate 0x000f 080 060 045 Pre-fail Always - 93391752 9 Power_On_Hours 0x0032 099 099 000 Old_age Always - 1575 (166 13 0) 10 Spin_Retry_Count 0x0013 100 100 097 Pre-fail Always - 0 12 Power_Cycle_Count 0x0032 100 100 020 Old_age Always - 17 183 Runtime_Bad_Block 0x0032 100 100 000 Old_age Always - 0 184 End-to-End_Error 0x0032 100 100 099 Old_age Always - 0 187 Reported_Uncorrect 0x0032 100 100 000 Old_age Always - 0 188 Command_Timeout 0x0032 100 100 000 Old_age Always - 0 189 High_Fly_Writes 0x003a 100 100 000 Old_age Always - 0 190 Airflow_Temperature_Cel 0x0022 066 055 040 Old_age Always - 34 (Min/Max 30/38) 191 G-Sense_Error_Rate 0x0032 100 100 000 Old_age Always - 0 192 Power-Off_Retract_Count 0x0032 100 100 000 Old_age Always - 11 193 Load_Cycle_Count 0x0032 100 100 000 Old_age Always - 661 194 Temperature_Celsius 0x0022 034 045 000 Old_age Always - 34 (0 23 0 0 0) 195 Hardware_ECC_Recovered 0x001a 080 064 000 Old_age Always - 111632038 197 Current_Pending_Sector 0x0012 100 100 000 Old_age Always - 0 198 Offline_Uncorrectable 0x0010 100 100 000 Old_age Offline - 0 199 UDMA_CRC_Error_Count 0x003e 200 200 000 Old_age Always - 1 240 Head_Flying_Hours 0x0000 100 253 000 Old_age Offline - 476 (254 68 0) 241 Total_LBAs_Written 0x0000 100 253 000 Old_age Offline - 7630882294 242 Total_LBAs_Read 0x0000 100 253 000 Old_age Offline - 657516658 SMART Error Log Version: 1 No Errors Logged SMART Self-test log structure revision number 1 Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error # 1 Extended offline Completed without error 00% 1555 - # 2 Short offline Completed without error 00% 1535 - # 3 Short offline Completed without error 00% 1521 - # 4 Short offline Completed without error 00% 1497 - # 5 Short offline Completed without error 00% 1466 - # 6 Extended offline Interrupted (host reset) 00% 1446 - # 7 Short offline Completed without error 00% 1414 - # 8 Short offline Completed without error 00% 1387 - # 9 Short offline Completed without error 00% 1363 - #10 Short offline Completed without error 00% 1346 - #11 Short offline Completed without error 00% 1322 - #12 Short offline Completed without error 00% 1291 - #13 Extended offline Interrupted (host reset) 00% 1279 - #14 Short offline Completed without error 00% 1244 - #15 Short offline Completed without error 00% 1219 - #16 Short offline Completed without error 00% 1197 - #17 Short offline Completed without error 00% 1171 - #18 Short offline Completed without error 00% 1162 - #19 Short offline Completed without error 00% 1125 - #20 Extended offline Completed without error 00% 1117 - #21 Short offline Completed without error 00% 1076 -
Okay, well I don't see anything here that slaps me in the face and says: "Hey Dummy! Here's your problem!" So I'm not going to ask for your interpretation... just your opinion ;)
SMART overall-health self-assessment test result: PASSED SMART Attributes Data Structure revision number: 10 Vendor Specific SMART Attributes with Thresholds: ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE 1 Raw_Read_Error_Rate 0x000f 080 064 006 Pre-fail Always - 111632038
3 Spin_Up_Time 0x0003 092 092 000 Pre-fail Always - 0 4 Start_Stop_Count 0x0032 100 100 020 Old_age Always - 297 5 Reallocated_Sector_Ct 0x0033 100 100 010 Pre-fail Always - 0 7 Seek_Error_Rate 0x000f 080 060 045 Pre-fail Always - 93391752
9 Power_On_Hours 0x0032 099 099 000 Old_age Always - 1575 (166 13 0) 10 Spin_Retry_Count 0x0013 100 100 097 Pre-fail Always - 0
12 Power_Cycle_Count 0x0032 100 100 020 Old_age Always - 17 183 Runtime_Bad_Block 0x0032 100 100 000 Old_age Always - 0 184 End-to-End_Error 0x0032 100 100 099 Old_age Always - 0
187 Reported_Uncorrect 0x0032 100 100 000 Old_age Always - 0 188 Command_Timeout 0x0032 100 100 000 Old_age Always - 0 189 High_Fly_Writes 0x003a 100 100 000 Old_age Always - 0 190 Airflow_Temperature_Cel 0x0022 066 055 040 Old_age Always - 34 (Min/Max 30/38) 191 G-Sense_Error_Rate 0x0032 100 100 000 Old_age Always - 0 192 Power-Off_Retract_Count 0x0032 100 100 000 Old_age Always - 11 193 Load_Cycle_Count 0x0032 100 100 000 Old_age Always - 661 194 Temperature_Celsius 0x0022 034 045 000 Old_age Always - 34 (0 23 0 0 0) 195 Hardware_ECC_Recovered 0x001a 080 064 000 Old_age Always - 111632038 197 Current_Pending_Sector 0x0012 100 100 000 Old_age Always - 0 198 Offline_Uncorrectable 0x0010 100 100 000 Old_age Offline - 0 199 UDMA_CRC_Error_Count 0x003e 200 200 000 Old_age Always - 1 240 Head_Flying_Hours 0x0000 100 253 000 Old_age Offline - 476 (254 68 0)
241 Total_LBAs_Written 0x0000 100 253 000 Old_age Offline - 7630882294
242 Total_LBAs_Read 0x0000 100 253 000 Old_age Offline - 657516658
SMART Error Log Version: 1 No Errors Logged SMART Self-test log structure revision number 1 Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error # 1 Extended offline Completed without error 00% 1555 - # 2 Short offline Completed without error 00% 1535 - # 3 Short offline Completed without error 00% 1521 - # 4 Short offline Completed without error 00% 1497 - # 5 Short offline Completed without error 00% 1466 - # 6 Extended offline Interrupted (host reset) 00% 1446 -
A number of file systems in Linux are or can be tuned for SMR drives:[27]