Internal hard drive VERY slow read speed

Hi,

I have an internal hard drive formatted in NTFS format. In Manjaro, the read speed is VERY slow, about 4 MB/sec (checked with hdparm). On other distros, it’s more like 100 MB/sec.

What could be the problem?

Thanks

No it’s not - useless statement …

Logs or it didn’t happen

This is likely something like

  • not enough power through USB port - more common than you think
  • missing ntfs-3g package
  • filesystem errors - perhaps even a failing disk
  • bad cable or connection to computer

Thanks for the quick reply. It is an internal hard drive, I don’t know why I wrote external.

Here is

sudo fdisk -l /dev/sdb1

Disk /dev/sdb1: 931.51 GiB, 1000202756096 bytes, 1953521008 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x73736572

Device      Boot      Start        End    Sectors   Size Id Type
/dev/sdb1p1      1920221984 3736432267 1816210284   866G 72 unknown
/dev/sdb1p2      1936028192 3889681299 1953653108 931.6G 6c unknown
/dev/sdb1p3               0          0          0     0B  0 Empty
/dev/sdb1p4        27722122   27722568        447 223.5K  0 Empty

and

sudo smartctl -a /dev/sdb1

smartctl 7.3 2022-02-28 r5338 [x86_64-linux-6.1.19-1-MANJARO] (local build)
Copyright (C) 2002-22, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Western Digital Caviar Green
Device Model:     WDC WD10EADS-65M2B0
Serial Number:    WD-WCAV53907900
LU WWN Device Id: 5 0014ee 2ae44d75c
Firmware Version: 01.00A01
User Capacity:    1,000,204,886,016 bytes [1.00 TB]
Sector Size:      512 bytes logical/physical
Device is:        In smartctl database 7.3/5319
ATA Version is:   ATA8-ACS (minor revision not indicated)
SATA Version is:  SATA 2.6, 3.0 Gb/s
Local Time is:    Sat Mar 18 11:21:11 2023 EDT
SMART support is: Available - device has SMART capability.
SMART support is: Disabled

SMART Disabled. Use option -s with argument 'on' to enable it.
(override with '-T permissive' option)

and

sudo hdparm -t /dev/sdb1

/dev/sdb1:
 Timing buffered disk reads:   8 MB in  3.54 seconds =   2.26 MB/sec

My mistake the fdisk and smartctl shouldn’t have had the y - just /dev/sdX

This looks like disk/filesystem error

I would enable smart and run a diagnose on the disk - to rule out hardware error

1 Like

Ok, I enabled smart.

Here is

sudo smartctl -a /dev/sdb

smartctl 7.3 2022-02-28 r5338 [x86_64-linux-6.1.19-1-MANJARO] (local build)
Copyright (C) 2002-22, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Western Digital Caviar Green
Device Model:     WDC WD10EADS-65M2B0
Serial Number:    WD-WCAV53907900
LU WWN Device Id: 5 0014ee 2ae44d75c
Firmware Version: 01.00A01
User Capacity:    1,000,204,886,016 bytes [1.00 TB]
Sector Size:      512 bytes logical/physical
Device is:        In smartctl database 7.3/5319
ATA Version is:   ATA8-ACS (minor revision not indicated)
SATA Version is:  SATA 2.6, 3.0 Gb/s
Local Time is:    Sat Mar 18 11:54:47 2023 EDT
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

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: 		(20400) seconds.
Offline data collection
capabilities: 			 (0x7b) SMART execute Offline immediate.
					Auto Offline data collection on/off support.
					Suspend Offline collection upon new
					command.
					Offline surface scan supported.
					Self-test supported.
					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: 	 (   2) minutes.
Extended self-test routine
recommended polling time: 	 ( 235) minutes.
Conveyance self-test routine
recommended polling time: 	 (   5) minutes.
SCT capabilities: 	       (0x303f)	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          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x002f   200   200   051    Pre-fail  Always       -       0
  3 Spin_Up_Time            0x0027   107   105   021    Pre-fail  Always       -       7633
  4 Start_Stop_Count        0x0032   086   086   000    Old_age   Always       -       14644
  5 Reallocated_Sector_Ct   0x0033   200   200   140    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x002e   100   253   000    Old_age   Always       -       0
  9 Power_On_Hours          0x0032   042   042   000    Old_age   Always       -       42781
 10 Spin_Retry_Count        0x0032   100   100   000    Old_age   Always       -       0
 11 Calibration_Retry_Count 0x0032   100   100   000    Old_age   Always       -       0
 12 Power_Cycle_Count       0x0032   092   092   000    Old_age   Always       -       8577
192 Power-Off_Retract_Count 0x0032   200   200   000    Old_age   Always       -       109
193 Load_Cycle_Count        0x0032   001   001   000    Old_age   Always       -       856424
194 Temperature_Celsius     0x0022   109   103   000    Old_age   Always       -       38
196 Reallocated_Event_Count 0x0032   200   200   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0032   200   200   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0030   200   200   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x0032   200   200   000    Old_age   Always       -       0
200 Multi_Zone_Error_Rate   0x0008   200   200   000    Old_age   Offline      -       0

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  Short offline       Completed without error       00%     41957         -
# 2  Short offline       Completed without error       00%     41940         -
# 3  Short offline       Completed without error       00%     41862         -
# 4  Short offline       Completed without error       00%     41829         -
# 5  Short offline       Completed without error       00%     41712         -
# 6  Short offline       Completed without error       00%     41680         -
# 7  Short offline       Completed without error       00%     41678         -
# 8  Short offline       Completed without error       00%     41674         -
# 9  Short offline       Completed without error       00%     41659         -
#10  Short offline       Completed without error       00%     41649         -
#11  Short offline       Completed without error       00%     41645         -
#12  Short offline       Completed without error       00%     41631         -
#13  Short offline       Completed without error       00%     41620         -
#14  Short offline       Completed without error       00%     41614         -
#15  Short offline       Completed without error       00%     41598         -
#16  Short offline       Completed without error       00%     41582         -
#17  Short offline       Completed without error       00%     41574         -
#18  Short offline       Completed without error       00%     41565         -
#19  Short offline       Completed without error       00%     41557         -
#20  Short offline       Completed without error       00%     41543         -
#21  Short offline       Completed without error       00%     41528         -

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.

and

sudo fdisk -l /dev/sdb

Disk /dev/sdb: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: WDC WD10EADS-65M
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x8a53718e

Device     Boot Start        End    Sectors   Size Id Type
/dev/sdb1  *       64 1953521071 1953521008 931.5G  7 HPFS/NTFS/exFAT

and

sudo hdparm -t /dev/sdb

/dev/sdb:
 Timing buffered disk reads:   6 MB in  3.48 seconds =   1.73 MB/sec

Manjaro is not handling your device differently than any other device or any other Linux for that matter and it is impossible to suggest anything without actual hands on.

My personal opinion - based on a long life with computers and disks and troubleshooting and administration - I am leaning towards defective hardware - somewhere.

Another observation adding to my opinion is the fact that if it was related to the kernel and Manjaro as a whole the forum would have been flooded with topics on the subject.

Right now - you are the lonely bird.

Please recheck all your connections - mainboard port - device - power - possibly switch port - switch cable.

The kernel may make a difference - have you tried to reproduce the issue using another kernel? That could be either 5.15LTS, 6.1LTS or 6.2?

sudo mhwd-kernel -i linux515 linux61 linux62

What is the content of /etc/udev/rules.d?

ls /etc/udev/rules.d

And what is the content of the files - if any?

sudo pacman -Syu time

Mount your device on the temp mountpoint /mnt and perform some real life test

mount /dev/sdb1 /mnt
time dd if=/dev/zero of=/mnt/bigfile bs=1M count=1000
echo 3 | sudo tee /proc/sys/vm/drop_caches
time cat /mnt/bigfile > /dev/null

I tried with the 5.15 and 6.2 kernels (I was running the 6.1 kernel initially). With the 5.15 kernel, the speed went up to about 8 MB/s, which is still very slow. No change with the 6.2 kernel.

Here is

ls /etc/udev/rules.d

70-snap.snapd.rules

and here is the output of the “real life test”:

1000+0 records in
1000+0 records out
1048576000 bytes (1.0 GB, 1000 MiB) copied, 18.5158 s, 56.6 MB/s

real	0m20.444s
user	0m0.000s
sys	0m1.605s
3

real	1m17.044s
user	0m0.026s
sys	0m0.713s

Write: 1000 / 20.444 ~ 49MB/s

Read: 1000 / 77.044 ~ 13MB/s

I would say your drive is heavily fragmented. Defragment it on Windows, since it is an HDD. :man_shrugging: Take into account that it is running at 5400 RPM and by nature HDDs gets slower when they are full.

1 Like

So it is taking your system to

  • 20s to write 1000MB to disk
  • 1m17s to read 1000MB from disk (with flushed cache)

I queried some search engines using some of the device data

WDC WD10EADS-65M2B0 ATA8-ACS SATA 2.6 WD-WCAV53907900

And the result was inconclusive - 5400RPM or 7200RPM, some results dated back to 2009.

The disk has theoretical read of ~110MB/s and write at ~70MB/s but the simple 1000MB test tells us you are right about the disk being.

@megavolt has a good point about the fragmentation - as spinning disks tend to slow down when their used storage capacity comes above - a 10y old rule of thumb - 35-40%.

One popular tweak is to use a different scheduler for flash based media and rotational media. This could be an explanation for the differences you have seen

You could test by creating a file

/etc/udev/rules.d/66-schedulers.rules

With content

ACTION=="add|change", KERNEL=="nvme[0-9]*", ATTR{queue/scheduler}="none"
ACTION=="add|change", KERNEL=="sd[a-z]|mmcblk[0-9]*", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="mq-deadline"
ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="1", ATTR{queue/scheduler}="bfq"

Then reboot and see if it makes any change

So I did 2 things:

  • I formatted the drive with ext4 instead of NTFS. Same result on Manjaro.
  • I installed Endeavour OS and ran the same test. Here is the result:
1000+0 records in
1000+0 records out
1048576000 bytes (1.0 GB, 1000 MiB) copied, 16.9262 s, 61.9 MB/s

real    0m17.203s
user    0m0.000s
sys     0m1.124s
3

real    0m10.510s
user    0m0.007s
sys     0m0.930s

Any idea what the difference could be?

If you have everything else is the same, then only the kernel could be the culprit. Endeavour OS has the same kernel as ArchLinux, while Manjaro has its own compiled kernel. :man_shrugging:

Ok thanks. Looks like there’s no solution for now.

It could also be because of the NTFS filesystem you use on that drive, which is not as well supported on Linux as other Unix filesystems… :woman_shrugging:.

Did you test the 66-schedulers.rules suggested above?

I don’t think you have provided any system info - post the link returned from the command below

inxi -SCDGMmxxxc0 | curl -F 'f:1=<-' ix.io

The kernel major.minor is of particular interest.

I don’t think there is any major differences between a stock Arch kernel (which is what EndeavourOS provides) and Manjaro - at least not when it comes to disk I/O.

Manjaro applies some patches related to bootsplash and framebuffer along with a patch for AMD ZEN and a bluetooth patch.

None of those has any relation to disk I/O.

It may be enlightening to see what device rules systemd has been applied to devices for your system specifically. Post the link return from below command

systemd-analyze cat-config udev/rules.d --no-pager | curl -F 'f:1=<-' ix.io

really weird as i get 100 MB/s reads on a wd green. Default config.

I tried the 66-schedulers.rules. It did not change anything unfortunately.

The other commands didn’t work:

inxi -SCDGMmxxxc0 | curl -F ‘f:1=<-’ ix.i

gives

curl: (6) Could not resolve host: ix.i

systemd-analyze cat-config /udev/rules.d --no-pager | curl -F ‘f:1=<-’ ix.io

gives

Path /udev/rules.d does not start with any known prefix.

I made simple test in a vm on the live session.

Test:

for nb in $(seq 1 5); do echo "==>Test $nb -> Write" && dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc && echo 3 | sudo tee /proc/sys/vm/drop_caches && echo "==>Test $nb -> Read without cache" && dd if=tempfile of=/dev/null bs=1M count=1024 && echo "==>Test $nb -> Read with cache" && dd if=tempfile of=/dev/null bs=1M count=1024 && rm -f tmpfile; done

I cannot see here a huge performance hit. Do you see something relevant? It is a NVME here, fresh formatted with ext4, in a VM, so it is a virtual device. Nothing changed. Just the latest ISO.

Manjaro

==>Test 1 -> Write
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 1.27359 s, 843 MB/s
3
==>Test 1 -> Read without cache
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 0.562705 s, 1.9 GB/s
==>Test 1 -> Read with cache
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 0.108158 s, 9.9 GB/s
==>Test 2 -> Write
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 0.76688 s, 1.4 GB/s
3
==>Test 2 -> Read without cache
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 0.379178 s, 2.8 GB/s
==>Test 2 -> Read with cache
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 0.141595 s, 7.6 GB/s
==>Test 3 -> Write
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 0.79804 s, 1.3 GB/s
3
==>Test 3 -> Read without cache
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 0.403389 s, 2.7 GB/s
==>Test 3 -> Read with cache
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 0.117726 s, 9.1 GB/s
==>Test 4 -> Write
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 0.77797 s, 1.4 GB/s
3
==>Test 4 -> Read without cache
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 0.409625 s, 2.6 GB/s
==>Test 4 -> Read with cache
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 0.127093 s, 8.4 GB/s
==>Test 5 -> Write
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 0.771805 s, 1.4 GB/s
3
==>Test 5 -> Read without cache
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 0.390004 s, 2.8 GB/s
==>Test 5 -> Read with cache
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 0.118123 s, 9.1 GB/s

Endeavor OS

==>Test 1 -> Write
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 1.07606 s, 998 MB/s
3
==>Test 1 -> Read without cache
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 0.424605 s, 2.5 GB/s
==>Test 1 -> Read with cache
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 0.122 s, 8.8 GB/s
==>Test 2 -> Write
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 0.833542 s, 1.3 GB/s
3
==>Test 2 -> Read without cache
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 0.426931 s, 2.5 GB/s
==>Test 2 -> Read with cache
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 0.124629 s, 8.6 GB/s
==>Test 3 -> Write
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 0.860977 s, 1.2 GB/s
3
==>Test 3 -> Read without cache
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 0.52674 s, 2.0 GB/s
==>Test 3 -> Read with cache
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 0.112351 s, 9.6 GB/s
==>Test 4 -> Write
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 1.00352 s, 1.1 GB/s
3
==>Test 4 -> Read without cache
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 0.598373 s, 1.8 GB/s
==>Test 4 -> Read with cache
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 0.109538 s, 9.8 GB/s
==>Test 5 -> Write
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 0.829493 s, 1.3 GB/s
3
==>Test 5 -> Read without cache
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 0.434591 s, 2.5 GB/s
==>Test 5 -> Read with cache
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 0.116967 s, 9.2 GB/s

ix.io is a command line pastebin

there was a typo/missing character in the first - you see it when you read the two commands, one has it, the other one doesn’t
and an incomplete path in the second - as the error message you get instead of the expected output states

so, the commands as intended would be:

inxi -SCDGMmxxxc0 | curl -F 'f:1=<-' ix.io

and

systemd-analyze cat-config /etc/udev/rules.d --no-pager | curl -F 'f:1=<-' ix.io

each command gives you a link in response where we can watch the result

Ok, here are the 2 links:

inxi -SCDGMmxxxc0 | curl -F ‘f:1=<-’ ix.io

gives

http://ix.io/4rNp

and

systemd-analyze cat-config /etc/udev/rules.d --no-pager | curl -F ‘f:1=<-’ ix.io

gives

http://ix.io/4rNr

I have fixed the typos in the commands

There is only expected content in the rules department - I was looking for block device rules which stood out - and besides the 66-schedulers.rules - nothing unexpected - which means a default installtion.

But I am wondering about these two - because they are different.

  ID-2: /dev/sdb vendor: Western Digital model: WD10EADS-65M2B0
    size: 931.51 GiB speed: 3.0 Gb/s type: N/A serial: WD-WCAV53907900 rev: 0A01
    scheme: GPT

  ID-4: /dev/sdd type: USB vendor: Western Digital model: WD20SDRW-11VUUS0
    size: 1.82 TiB type: HDD rpm: 5400 serial: WD-WX22A205FY40 rev: 1028
    scheme: GPT

You are sure you have not accidently tested on one where it was the other?

There is no logical explanation and it is not possible for the other members or myself to reproduce this.

As you can see from the other comments - the differences are marginal - as expected. There is no :magic_wand: which can make your disk deliver data faster than it does.

And there is nothing wrong with Manjaro as such - it is a mere coincidense which there is no answer to.

I would like to know why but without hands on there is no much to do.

  Type: Desktop Mobo: Gigabyte model: P55A-UD4P serial: <superuser required>
    BIOS: Award v: F3 date: 10/16/2009

Perhaps the answer is not your WD disk but another component - I would definately test the 6.2 kernel - but as your system is an older system - perhaps installing the linux515 kernel will work better with your hardware :person_shrugging: and I am guessing - I have no idea why the disk is notable slower on one system but not the other.