Slow hard disk write performance in Ubuntu 16.04

2

I'm using Ubuntu 16.04 LTS where the OS resides on a SSD. I also have three harddisks (3 TB, 3 TB, and 500 GB) and whenever I copy something from the SSD or another HDD to one of the three HDDs I only get about 35 MB/s write speed. Only when copying from a HDD to the SSD i get around 120 MB/s performance.

The SSD and one HDD are on the internal SATA3 connector, the other two HDDs on a Mini PCIe SATA2 adapter, so the problem doesn't seem to come from the controllers and as the HDDs are from different manufactures they also can be ruled out as the culprit.

hdparm -i gives me the following output:

 Model=TOSHIBA DT01ACA300, FwRev=MX6OABB0, SerialNo=xxxxxxxx                                                                  
 Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs }                                                                        
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=56                                                                        
 BuffType=DualPortCache, BuffSize=unknown, MaxMultSect=16, MultSect=off                                                        
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=5860533168                                                           
 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}                                                              
 PIO modes:  pio0 pio1 pio2 pio3 pio4                                                                                          
 DMA modes:  mdma0 mdma1 mdma2                                                                                                 
 UDMA modes: udma0 udma1 udma2 udma3 udma4 udma5 *udma6                                                                        
 AdvancedPM=yes: disabled (255) WriteCache=enabled                                                                             
 Drive conforms to: unknown:  ATA/ATAPI-2,3,4,5,6,7 

 Model=WDC WD5000AAJS-00A8B0, FwRev=01.03B01, SerialNo=xxxxxxxx                                                         
 Config={ HardSect NotMFM HdSw>15uSec SpinMotCtl Fixed DTR>5Mbs FmtGapReq }                                                    
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=50                                                                        
 BuffType=unknown, BuffSize=8192kB, MaxMultSect=16, MultSect=16                                                                
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=976773168                                                            
 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}                                                              
 PIO modes:  pio0 pio3 pio4                                                                                                    
 DMA modes:  mdma0 mdma1 mdma2                                                                                                 
 UDMA modes: udma0 udma1 udma2 udma3 udma4 udma5 *udma6                                                                        
 AdvancedPM=no WriteCache=enabled                                                                                              
 Drive conforms to: Unspecified:  ATA/ATAPI-1,2,3,4,5,6,7    

hdparm -t -T gives me:

Timing cached reads:   3582 MB in  2.00 seconds = 1791.09 MB/sec                                                              
Timing buffered disk reads: 280 MB in  3.02 seconds =  92.74 MB/sec

The HDDs are using NTFS, mounted via fstab. I just read that the big_writes option could help with NTFS write performance. Can this option be added to fstab? If so, where would it be placed?

Hannes Binder

Posted 2018-08-02T10:43:37.687

Reputation: 31

What filesystems are involved? (e.g. NTFS performs poorly in Linux, I think). Any compression or encryption on the fly? FUSE? What does hdparm -t -T say? Please [edit] the question to add information. – Kamil Maciorowski – 2018-08-02T10:49:05.823

1Please see how I improved the formatting of your question before; use the same syntax for your new edits. We often format new users' questions or answers and it's OK. At the same time we expect them to learn, so they can write readable posts themselves. Use my edit as an example, learn and improve the formatting of what you have added. Thank you. And welcome to Super User. – Kamil Maciorowski – 2018-08-02T11:12:45.400

1Your question gave me a good hint, I added big_writes to fstab as I'm using NTFS, now I get 48MB/s. But it seems that the J1900 CPU seems to get maxed out anyways, so it very probably is the CPU+NTFS combination that slows things down... – Hannes Binder – 2018-08-02T11:13:16.003

Okay thank you Kamil! I'll have a look at it so hopefully next time I won't have formatting issues. – Hannes Binder – 2018-08-02T11:14:28.227

Answers

1

NTFS seems to have an impact on CPU load. I put the big_writes option into fstab, rebooted and now the CPU load got reduced and copy speed went up to 120MB/s.

fstab example:

UUID=xxxxxxxxxxxxxxxx /samba/Files1 ntfs rw,nosuid,nodev,noatime,big_writes,allow_other 0 0

Hannes Binder

Posted 2018-08-02T10:43:37.687

Reputation: 31