Wednesday, June 29, 2022

Re: M2 disk slowing down on sequential reads

On Jun 13 09:53:46, mlarkin@nested.page wrote:
> On Mon, Jun 13, 2022 at 06:01:39PM +0200, Jan Stary wrote:
> > This is current/amd64 on a PC (dmesg below).
> > It is using this M2 SSD as a system disk:
> >
> > sd0 at scsibus1 targ 0 lun 0: <ATA, WDC WDS250G2B0B, 4010> naa.5001b448b8532530
> > sd0: 238475MB, 512 bytes/sector, 488397168 sectors, thin
> >
> > I do a weekly dd read of all disks as a precaution
> > to see if any of the report any errors, as in
> > dd bs=1m conv=noerror if=/dev/rsd0c of=/dev/null
> >
> > This particular disk seems to be very fast when reading
> > up to something between 3GB and 4GB; then the speed drops:
> >
> > dd bs=1m count=1k conv=noerror if=/dev/rsd0c of=/dev/null
> > 1073741824 bytes transferred in 5.404 secs (198679263 bytes/sec)
> > 1073741824 bytes transferred in 5.271 secs (203672530 bytes/sec)
> > 1073741824 bytes transferred in 5.072 secs (211697503 bytes/sec)
> >
> > dd bs=1m count=2k conv=noerror if=/dev/rsd0c of=/dev/null
> > 2147483648 bytes transferred in 8.392 secs (255879364 bytes/sec)
> > 2147483648 bytes transferred in 8.413 secs (255242225 bytes/sec)
> > 2147483648 bytes transferred in 9.139 secs (234968292 bytes/sec)
> >
> > dd bs=1m count=3k conv=noerror if=/dev/rsd0c of=/dev/null
> > 3221225472 bytes transferred in 11.823 secs (272447923 bytes/sec)
> > 3221225472 bytes transferred in 12.124 secs (265674803 bytes/sec)
> >
> > dd bs=1m count=4k conv=noerror if=/dev/rsd0c of=/dev/null
> > 4294967296 bytes transferred in 53.442 secs (80365818 bytes/sec)
> > 4294967296 bytes transferred in 52.680 secs (81528574 bytes/sec)
> > 4294967296 bytes transferred in 52.082 secs (82465212 bytes/sec)
> >
> > dd bs=1m count=5k conv=noerror if=/dev/rsd0c of=/dev/null
> > 5368709120 bytes transferred in 179.967 secs (29831567 bytes/sec)
> > 5368709120 bytes transferred in 221.400 secs (24248900 bytes/sec)
> > 5368709120 bytes transferred in 215.760 secs (24882667 bytes/sec)
> >
> > That's a drop from 200MB/s to 20MB/s.
> > I get a similar rate of slowdown with different dd bs.
> >
> > Is this expected when doing a long sequential read of this kind of disks?
> >
>
> could be thermals. Try a better heat sink/fan on the drive then try again?

Thanks for the hint. It's not that, though.

With and without a heat sink, in different slots,
attached as different sdX, and in different machines,
there is always this steep decline in read speed.
The heat pad makes the overal numbers a bit higher,
but the decline is always there.

The following are the bytes/sec as reported by
dd if=/dev/rsdXc of=/dev/null bs=1m count=1k (2k 4k 8k)

245073986 281855307 91913769 28104824 sd0, ahci0: port 0: 6.0Gb/s, heat pad
216048833 257586221 95636848 15064098 sd0, ahci0: port 0: 6.0Gb/s
195556021 230818520 97888205 27126291 sd0, ahci0: port 0: 6.0Gb/s
141443799 152877638 89665900 22959635 sd3, ahci0: port 3: 3.0Gb/s, heat pad

Any idea what else it could be?

Jan



> > OpenBSD 7.1-current (GENERIC.MP) #0: Thu Apr 14 13:26:20 CEST 2022
> > hans@box.stare.cz:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> > real mem = 17009606656 (16221MB)
> > avail mem = 16476803072 (15713MB)
> > random: good seed from bootblocks
> > mpath0 at root
> > scsibus0 at mpath0: 256 targets
> > mainbus0 at root
> > bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xf0100 (36 entries)
> > bios0: vendor Award Software International, Inc. version "F3" date 03/31/2011
> > bios0: Gigabyte Technology Co., Ltd. H67MA-USB3-B3
> > acpi0 at bios0: ACPI 1.0
> > acpi0: sleep states S0 S3 S4 S5
> > acpi0: tables DSDT FACP HPET MCFG ASPT SSPT EUDS MATS TAMG APIC SSDT
> > acpi0: wakeup devices PCI0(S5) PEX0(S5) PEX1(S5) PEX2(S5) PEX3(S5) PEX4(S5) PEX5(S5) PEX6(S5) PEX7(S5) HUB0(S5) UAR1(S3) USBE(S3) USE2(S3) AZAL(S5)
> > acpitimer0 at acpi0: 3579545 Hz, 24 bits
> > acpihpet0 at acpi0: 14318179 Hz
> > acpimcfg0 at acpi0
> > acpimcfg0: addr 0xf4000000, bus 0-63
> > acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
> > cpu0 at mainbus0: apid 0 (boot processor)
> > cpu0: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz, 3492.60 MHz, 06-2a-07
> > cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
> > cpu0: 256KB 64b/line 8-way L2 cache
> > cpu0: smt 0, core 0, package 0
> > mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
> > cpu0: apic clock running at 99MHz
> > cpu0: mwait min=64, max=64, C-substates=0.2.1.1, IBE
> > cpu1 at mainbus0: apid 2 (application processor)
> > cpu1: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz, 3492.10 MHz, 06-2a-07
> > cpu1: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
> > cpu1: 256KB 64b/line 8-way L2 cache
> > cpu1: smt 0, core 1, package 0
> > cpu2 at mainbus0: apid 4 (application processor)
> > cpu2: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz, 3492.09 MHz, 06-2a-07
> > cpu2: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
> > cpu2: 256KB 64b/line 8-way L2 cache
> > cpu2: smt 0, core 2, package 0
> > cpu3 at mainbus0: apid 6 (application processor)
> > cpu3: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz, 3492.09 MHz, 06-2a-07
> > cpu3: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
> > cpu3: 256KB 64b/line 8-way L2 cache
> > cpu3: smt 0, core 3, package 0
> > cpu4 at mainbus0: apid 1 (application processor)
> > cpu4: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz, 3492.08 MHz, 06-2a-07
> > cpu4: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
> > cpu4: 256KB 64b/line 8-way L2 cache
> > cpu4: smt 1, core 0, package 0
> > cpu5 at mainbus0: apid 3 (application processor)
> > cpu5: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz, 3492.09 MHz, 06-2a-07
> > cpu5: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
> > cpu5: 256KB 64b/line 8-way L2 cache
> > cpu5: smt 1, core 1, package 0
> > cpu6 at mainbus0: apid 5 (application processor)
> > cpu6: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz, 3492.08 MHz, 06-2a-07
> > cpu6: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
> > cpu6: 256KB 64b/line 8-way L2 cache
> > cpu6: smt 1, core 2, package 0
> > cpu7 at mainbus0: apid 7 (application processor)
> > cpu7: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz, 3492.09 MHz, 06-2a-07
> > cpu7: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
> > cpu7: 256KB 64b/line 8-way L2 cache
> > cpu7: smt 1, core 3, package 0
> > ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 20, 24 pins, remapped
> > acpiprt0 at acpi0: bus 0 (PCI0)
> > acpiprt1 at acpi0: bus -1 (PEG0)
> > acpiprt2 at acpi0: bus -1 (PEG1)
> > acpiprt3 at acpi0: bus 1 (PEX0)
> > acpiprt4 at acpi0: bus -1 (PEX1)
> > acpiprt5 at acpi0: bus -1 (PEX2)
> > acpiprt6 at acpi0: bus -1 (PEX3)
> > acpiprt7 at acpi0: bus 2 (PEX4)
> > acpiprt8 at acpi0: bus -1 (PEX5)
> > acpiprt9 at acpi0: bus 4 (PEX6)
> > acpiprt10 at acpi0: bus 5 (PEX7)
> > acpibtn0 at acpi0: PWRB
> > acpipci0 at acpi0 PCI0
> > acpicmos0 at acpi0
> > com0 at acpi0 UAR1 addr 0x3f8/0x8 irq 4: ns16550a, 16 byte fifo
> > acpicpu0 at acpi0: C3(350@96 mwait.1@0x20), C2(500@64 mwait.1@0x10), C1(1000@1 mwait.1), PSS
> > acpicpu1 at acpi0: C3(350@96 mwait.1@0x20), C2(500@64 mwait.1@0x10), C1(1000@1 mwait.1), PSS
> > acpicpu2 at acpi0: C3(350@96 mwait.1@0x20), C2(500@64 mwait.1@0x10), C1(1000@1 mwait.1), PSS
> > acpicpu3 at acpi0: C3(350@96 mwait.1@0x20), C2(500@64 mwait.1@0x10), C1(1000@1 mwait.1), PSS
> > acpicpu4 at acpi0: C3(350@96 mwait.1@0x20), C2(500@64 mwait.1@0x10), C1(1000@1 mwait.1), PSS
> > acpicpu5 at acpi0: C3(350@96 mwait.1@0x20), C2(500@64 mwait.1@0x10), C1(1000@1 mwait.1), PSS
> > acpicpu6 at acpi0: C3(350@96 mwait.1@0x20), C2(500@64 mwait.1@0x10), C1(1000@1 mwait.1), PSS
> > acpicpu7 at acpi0: C3(350@96 mwait.1@0x20), C2(500@64 mwait.1@0x10), C1(1000@1 mwait.1), PSS
> > cpu0: using VERW MDS workaround (except on vmm entry)
> > cpu0: Enhanced SpeedStep 3492 MHz: speeds: 3701, 3700, 3600, 3500, 3400, 3300, 3200, 3100, 3000, 2900, 2800, 2700, 2600, 2500, 2400, 2300, 2200, 2100, 1600 MHz
> > pci0 at mainbus0 bus 0
> > pchb0 at pci0 dev 0 function 0 "Intel Core 2G Host" rev 0x09
> > inteldrm0 at pci0 dev 2 function 0 "Intel HD Graphics 2000" rev 0x09
> > drm0 at inteldrm0
> > inteldrm0: apic 2 int 16, SANDYBRIDGE, gen 6
> > "Intel 6 Series MEI" rev 0x04 at pci0 dev 22 function 0 not configured
> > ehci0 at pci0 dev 26 function 0 "Intel 6 Series USB" rev 0x05: apic 2 int 18
> > usb0 at ehci0: USB revision 2.0
> > uhub0 at usb0 configuration 1 interface 0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
> > azalia0 at pci0 dev 27 function 0 "Intel 6 Series HD Audio" rev 0x05: apic 2 int 22
> > azalia0: codecs: Realtek ALC889, Intel/0x2805, using Realtek ALC889
> > audio0 at azalia0
> > ppb0 at pci0 dev 28 function 0 "Intel 6 Series PCIE" rev 0xb5: apic 2 int 16
> > pci1 at ppb0 bus 1
> > ppb1 at pci0 dev 28 function 4 "Intel 6 Series PCIE" rev 0xb5: apic 2 int 16
> > pci2 at ppb1 bus 2
> > ppb2 at pci2 dev 0 function 0 "TI XIO2000A PCIE-PCI" rev 0x03
> > pci3 at ppb2 bus 3
> > puc0 at pci3 dev 0 function 0 "NetMos Nm9835" rev 0x01: ports: 15 com, 1 lpt
> > com4 at puc0 port 0 apic 2 int 16: ns16550a, 16 byte fifo
> > com5 at puc0 port 1 apic 2 int 16: ns16550a, 16 byte fifo
> > lpt1 at puc0 port 2 apic 2 int 16
> > ppb3 at pci0 dev 28 function 6 "Intel 6 Series PCIE" rev 0xb5: apic 2 int 18
> > pci4 at ppb3 bus 4
> > re0 at pci4 dev 0 function 0 "Realtek 8168" rev 0x06: RTL8168E/8111E-VL (0x2c80), apic 2 int 18, address 50:e5:49:36:ec:0d
> > rgephy0 at re0 phy 7: RTL8169S/8110S/8211 PHY, rev. 5
> > ppb4 at pci0 dev 28 function 7 "Intel 6 Series PCIE" rev 0xb5: apic 2 int 19
> > pci5 at ppb4 bus 5
> > xhci0 at pci5 dev 0 function 0 "Etron EJ168 xHCI" rev 0x01: apic 2 int 19, xHCI 1.0
> > usb1 at xhci0: USB revision 3.0
> > uhub1 at usb1 configuration 1 interface 0 "Etron xHCI root hub" rev 3.00/1.00 addr 1
> > ehci1 at pci0 dev 29 function 0 "Intel 6 Series USB" rev 0x05: apic 2 int 23
> > usb2 at ehci1: USB revision 2.0
> > uhub2 at usb2 configuration 1 interface 0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
> > ppb5 at pci0 dev 30 function 0 "Intel 82801BA Hub-to-PCI" rev 0xa5
> > pci6 at ppb5 bus 6
> > pcib0 at pci0 dev 31 function 0 "Intel H67 LPC" rev 0x05
> > ahci0 at pci0 dev 31 function 2 "Intel 6 Series AHCI" rev 0x05: apic 2 int 19, AHCI 1.3
> > ahci0: port 0: 6.0Gb/s
> > ahci0: port 1: 6.0Gb/s
> > ahci0: port 2: 3.0Gb/s
> > ahci0: port 4: 3.0Gb/s
> > scsibus1 at ahci0: 32 targets
> > sd0 at scsibus1 targ 0 lun 0: <ATA, WDC WDS250G2B0B, 4010> naa.5001b448b8532530
> > sd0: 238475MB, 512 bytes/sector, 488397168 sectors, thin
> > sd1 at scsibus1 targ 1 lun 0: <ATA, ST2000DM008-2FR1, 0001> naa.5000c500c128f41c
> > sd1: 1907729MB, 512 bytes/sector, 3907029168 sectors, thin
> > sd2 at scsibus1 targ 2 lun 0: <ATA, WDC WD30EZRX-00M, 80.0> naa.50014ee25c38d81f
> > sd2: 2861588MB, 512 bytes/sector, 5860533168 sectors
> > sd3 at scsibus1 targ 4 lun 0: <ATA, WDC WD30EFRX-68E, 82.0> naa.50014ee20aaed824
> > sd3: 2861588MB, 512 bytes/sector, 5860533168 sectors
> > ichiic0 at pci0 dev 31 function 3 "Intel 6 Series SMBus" rev 0x05: apic 2 int 18
> > iic0 at ichiic0
> > spdmem0 at iic0 addr 0x50: 4GB DDR3 SDRAM PC3-12800
> > spdmem1 at iic0 addr 0x51: 4GB DDR3 SDRAM PC3-12800
> > spdmem2 at iic0 addr 0x52: 4GB DDR3 SDRAM PC3-12800
> > spdmem3 at iic0 addr 0x53: 4GB DDR3 SDRAM PC3-12800
> > isa0 at pcib0
> > isadma0 at isa0
> > pckbc0 at isa0 port 0x60/5 irq 1 irq 12
> > pcppi0 at isa0 port 0x61
> > spkr0 at pcppi0
> > it0 at isa0 port 0x2e/2: IT8728F rev 1, EC port 0x290
> > vmm0 at mainbus0: VMX/EPT
> > uhub3 at uhub0 port 1 configuration 1 interface 0 "Intel Rate Matching Hub" rev 2.00/0.00 addr 2
> > uhidev0 at uhub3 port 1 configuration 1 interface 0 "Genius Optical Mouse" rev 1.10/1.00 addr 3
> > uhidev0: iclass 3/1
> > ums0 at uhidev0: 3 buttons, Z dir
> > wsmouse0 at ums0 mux 0
> > uhidev1 at uhub3 port 2 configuration 1 interface 0 "Logitech USB Keyboard" rev 1.10/64.00 addr 4
> > uhidev1: iclass 3/1
> > ukbd0 at uhidev1: 8 variable keys, 6 key codes
> > wskbd0 at ukbd0: console keyboard
> > uhidev2 at uhub3 port 2 configuration 1 interface 1 "Logitech USB Keyboard" rev 1.10/64.00 addr 4
> > uhidev2: iclass 3/0, 3 report ids
> > ucc0 at uhidev2 reportid 1: 2 usages, 3 keys, enum
> > wskbd1 at ucc0 mux 1
> > uhid0 at uhidev2 reportid 2: input=1, output=0, feature=0
> > ucc1 at uhidev2 reportid 3: 21 usages, 14 keys, enum
> > wskbd2 at ucc1 mux 1
> > uhub4 at uhub2 port 1 configuration 1 interface 0 "Intel Rate Matching Hub" rev 2.00/0.00 addr 2
> > vscsi0 at root
> > scsibus2 at vscsi0: 256 targets
> > softraid0 at root
> > scsibus3 at softraid0: 256 targets
> > root on sd0a (8e7aa56bfa6854a1.a) swap on sd0b dump on sd0b
> > inteldrm0: 1360x768, 32bpp
> > wsdisplay0 at inteldrm0 mux 1: console (std, vt100 emulation), using wskbd0
> > wskbd1: connecting to wsdisplay0
> > wskbd2: connecting to wsdisplay0
> > wsdisplay0: screen 1-5 added (std, vt100 emulation)

No comments:

Post a Comment