Why is kernel 5.11 15% slower than 5.10 for disk writes?

Hi,

I’m running Manjaro from an SD card in a USB2 reader on a wintel box with internal SSD. When I run

time dd if=/dev/zero bs=100M count=10 of=test.txt

in a working directory on this SSD under kernel 5.10.30, I see 57-59 MB/s. This is about the best result after playing with the bs and count to get a 1GB total. When I run the same command in the same working directory under kernel 5.11, it’s only 48 MB/s at best, or 15% slower. Why is this?

Here’s inxi:

System:
  Kernel: 5.10.30-1-MANJARO x86_64 bits: 64 compiler: gcc v: 10.2.0 
  parameters: BOOT_IMAGE=/boot/vmlinuz-5.10-x86_64 
  root=UUID=c8e669d6-890c-431a-9083-a5bee720d372 rw quiet apparmor=1 
  security=apparmor udev.log_priority=3 
  Desktop: Xfce 4.16.0 tk: Gtk 3.24.24 info: xfce4-panel wm: xfwm4 vt: 7 
  dm: LightDM 1.30.0 Distro: Manjaro Linux base: Arch Linux 
Machine:
  Type: Mini-pc System: IP3 Tech product: TX95 v: N/A serial: <filter> 
  Mobo: IP3 model: AB1A serial: <filter> UEFI: American Megatrends v: 0.02 
  date: 06/30/2020 
Memory:
  RAM: total: 7.63 GiB used: 1.91 GiB (25.0%) 
  RAM Report: permissions: Unable to run dmidecode. Root privileges required. 
CPU:
  Info: Quad Core model: Intel Celeron N3450 bits: 64 type: MCP arch: Goldmont 
  family: 6 model-id: 5C (92) stepping: 9 microcode: 40 cache: L2: 1024 KiB 
  bogomips: 8755 
  Speed: 1086 MHz min/max: 800/2200 MHz Core speeds (MHz): 1: 1086 2: 1685 
  3: 1613 4: 1144 
  Flags: 3dnowprefetch acpi aes aperfmperf apic arat arch_capabilities 
  arch_perfmon art bts cat_l2 clflush clflushopt cmov constant_tsc cpuid 
  cpuid_fault cx16 cx8 de ds_cpl dtes64 dtherm dts ept ept_ad erms est 
  flexpriority fpu fsgsbase fxsr ht ibpb ibrs ida intel_pt lahf_lm lm mca mce 
  md_clear mmx movbe mpx msr mtrr nonstop_tsc nopl nx pae pat pbe pclmulqdq 
  pdcm pdpe1gb pebs pge pln pni popcnt pse pse36 pts rdrand rdseed rdt_a 
  rdtscp rep_good sdbg sep sha_ni smap smep ss sse sse2 sse4_1 sse4_2 ssse3 
  stibp syscall tm tm2 tpr_shadow tsc tsc_adjust tsc_deadline_timer 
  tsc_known_freq tsc_reliable vme vmx vnmi vpid x2apic xgetbv1 xsave xsavec 
  xsaveopt xsaves xtopology xtpr 
  Vulnerabilities: Type: itlb_multihit status: Not affected 
  Type: l1tf status: Not affected 
  Type: mds status: Not affected 
  Type: meltdown status: Not affected 
  Type: spec_store_bypass status: Not affected 
  Type: spectre_v1 
  mitigation: usercopy/swapgs barriers and __user pointer sanitization 
  Type: spectre_v2 mitigation: Full generic retpoline, IBPB: conditional, 
  IBRS_FW, STIBP: disabled, RSB filling 
  Type: srbds status: Not affected 
  Type: tsx_async_abort status: Not affected 
Graphics:
  Device-1: Intel HD Graphics 500 driver: i915 v: kernel bus-ID: 00:02.0 
  chip-ID: 8086:5a85 class-ID: 0300 
  Display: x11 server: X.Org 1.20.11 driver: loaded: intel 
  unloaded: modesetting alternate: fbdev,vesa display-ID: :0.0 screens: 1 
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.0x11.2") 
  s-diag: 582mm (22.9") 
  Monitor-1: HDMI1 res: 1920x1080 hz: 60 
  OpenGL: renderer: Mesa Intel HD Graphics 500 (APL 2) v: 4.6 Mesa 21.0.2 
  direct render: Yes 
Audio:
  Device-1: Intel Celeron N3350/Pentium N4200/Atom E3900 Series Audio Cluster 
  driver: snd_hda_intel v: kernel alternate: snd_soc_skl,snd_sof_pci 
  bus-ID: 00:0e.0 chip-ID: 8086:5a98 class-ID: 0403 
  Sound Server-1: ALSA v: k5.10.30-1-MANJARO running: yes 
  Sound Server-2: JACK v: 0.125.0 running: no 
  Sound Server-3: PulseAudio v: 14.2 running: yes 
  Sound Server-4: PipeWire v: 0.3.25 running: no 
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet 
  driver: r8169 v: kernel port: e000 bus-ID: 01:00.0 chip-ID: 10ec:8168 
  class-ID: 0200 
  IF: enp1s0 state: up speed: 1000 Mbps duplex: full mac: <filter> 
  IP v4: <filter> type: dynamic noprefixroute scope: global 
  broadcast: <filter> 
  Device-2: Intel Wireless 3165 driver: iwlwifi v: kernel port: e000 
  bus-ID: 02:00.0 chip-ID: 8086:3165 class-ID: 0280 
  IF: wlp2s0 state: up mac: <filter> 
  IP v4: <filter> type: dynamic noprefixroute scope: global 
  broadcast: <filter> 
  IF-ID-1: nordlynx state: unknown speed: N/A duplex: N/A mac: N/A 
  IP v4: <filter> scope: global 
  WAN IP: <filter> 
Bluetooth:
  Device-1: Intel Bluetooth wireless interface type: USB driver: btusb v: 0.8 
  bus-ID: 1-7:3 chip-ID: 8087:0a2a class-ID: e001 
  Report: rfkill ID: hci0 rfk-id: 1 state: up address: see --recommends 
Logical:
  Message: No logical block device data found. 
RAID:
  Message: No RAID data found. 
Drives:
  Local Storage: total: 235.56 GiB used: 99.64 GiB (42.3%) 
  SMART Message: Required tool smartctl not installed. Check --recommends 
  ID-1: /dev/mmcblk1 maj-min: 179:0 vendor: HP model: DF4128 size: 116.48 GiB 
  block-size: physical: 512 B logical: 512 B rotation: SSD serial: <filter> 
  rev: 0x8 scheme: GPT 
  ID-2: /dev/sdc maj-min: 8:32 type: USB model: Genesys SD USB3 Reader 
  size: 119.08 GiB block-size: physical: 512 B logical: 512 B serial: <filter> 
  rev: 1206 scheme: GPT 
  Message: No optical or floppy data found. 
Partition:
  ID-1: / raw-size: 118.79 GiB size: 116.87 GiB (98.39%) 
  used: 32.34 GiB (27.7%) fs: ext4 dev: /dev/sdc2 maj-min: 8:34 label: N/A 
  uuid: c8e669d6-890c-431a-9083-a5bee720d372 
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%) 
  used: 312 KiB (0.1%) fs: vfat dev: /dev/sdc1 maj-min: 8:33 label: N/A 
  uuid: 6EF9-53C7 
  ID-3: /mnt raw-size: 115.32 GiB size: 115.32 GiB (100.00%) 
  used: 66.1 GiB (57.3%) fs: ntfs dev: /dev/mmcblk1p3 maj-min: 179:3 label: OS 
  uuid: 7802BE5802BE1AD8 
  ID-4: /mnt/veracrypt2 raw-size: 2 GiB size: 2 GiB (100.00%) 
  used: 1.19 GiB (59.7%) fs: fuseblk dev: /dev/dm-0 maj-min: 254:0 
  mapped: veracrypt2 label: N/A uuid: N/A 
Swap:
  Alert: No swap data was found. 
Unmounted:
  ID-1: /dev/mmcblk1p1 maj-min: 179:1 size: 100 MiB fs: vfat label: SYSTEM 
  uuid: C2B5-68AC 
  ID-2: /dev/mmcblk1p2 maj-min: 179:2 size: 128 MiB fs: <superuser required> 
  label: N/A uuid: N/A 
  ID-3: /dev/mmcblk1p4 maj-min: 179:4 size: 957 MiB fs: ntfs label: Recovery 
  uuid: 08B2BED7B2BEC888 
USB:
  Hub-1: 1-0:1 info: Full speed (or root) Hub ports: 8 rev: 2.0 
  speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900 
  Hub-2: 1-2:2 info: Genesys Logic Hub ports: 4 rev: 2.0 speed: 480 Mb/s 
  power: 100mA chip-ID: 05e3:0610 class-ID: 0900 
  Device-1: 1-2.1:4 
  info: Holtek Wired Keyboard (78/79 key) [RPI Wired Keyboard 5] 
  type: Keyboard,HID driver: hid-generic,usbhid interfaces: 2 rev: 2.0 
  speed: 1.5 Mb/s power: 100mA chip-ID: 04d9:0006 class-ID: 0300 
  Device-2: 1-2.3:5 info: Microdia USB Device type: Keyboard,Mouse 
  driver: hid-generic,usbhid interfaces: 4 rev: 1.1 speed: 12 Mb/s 
  power: 100mA chip-ID: 0c45:8101 class-ID: 0301 
  Device-3: 1-2.4:6 info: Logitech Keyboard K120 type: Keyboard,HID 
  driver: hid-generic,usbhid interfaces: 2 rev: 1.1 speed: 1.5 Mb/s 
  power: 90mA chip-ID: 046d:c31c class-ID: 0300 
  Device-4: 1-7:3 info: Intel Bluetooth wireless interface type: Bluetooth 
  driver: btusb interfaces: 2 rev: 2.0 speed: 12 Mb/s power: 100mA 
  chip-ID: 8087:0a2a class-ID: e001 
  Hub-3: 2-0:1 info: Full speed (or root) Hub ports: 7 rev: 3.0 speed: 5 Gb/s 
  chip-ID: 1d6b:0003 class-ID: 0900 
  Device-1: 2-3:2 info: Genesys Logic All-in-One Cardreader type: Mass Storage 
  driver: usb-storage interfaces: 1 rev: 3.0 speed: 5 Gb/s power: 896mA 
  chip-ID: 05e3:0748 class-ID: 0806 serial: <filter> 
Sensors:
  System Temperatures: cpu: 69.0 C mobo: N/A 
  Fan Speeds (RPM): N/A 
Info:
  Processes: 202 Uptime: 16h 45m wakeups: 1 Init: systemd v: 247 
  tool: systemctl Compilers: gcc: 10.2.0 Packages: pacman: 1283 lib: 403 
  flatpak: 0 Shell: Bash v: 5.1.0 running-in: xfce4-terminal inxi: 3.3.04```

Thanks in advance!

R

That seems awfully slow for an SSD either way?

It’s probably slow because they are running Manjaro from an SD card

The blocksize is set way too high at 100M. You might find optimal speeds at bs=1M (and subsequently change the count to count=1024.)

It’s tricky to benchmark like this on an SSD, as it depends on when the last time the file-system was trimmed, let alone when the drive’s firmware ran its own internal garbage collection.

For kicks, I rebooted back and forth between 5.10 and 5.11, and the speeds were practically identical. In fact, 5.11 was slightly faster, but not something worth writing home about. :wink:


MMC are usually those cheapo Multi Media Cards. Technically, they are solid state drives. Performance-wise, they cannot compete with legitimate ones like Samsung and Intel.


UPDATE: Based on the model number, that “SSD” has terrible performance ratings and benchmarks: PassMark - SanDisk DF4128 - Price performance comparison

2 Likes

OP says the writes are going to SSD.
If they were writing to the sd card then the performance difference could also (in part) stem from usb speed differences.

If this is the “working directory” used - then there also is a sub-optimal filesystem (ntfs) in play here.

Thanks, winnie, for actually addressing my question. I’m glad it’s not that the 5.11 kernel is degrading speed.

FWIW, I am mostly interested in speeds when backing up big archives, 1GB or more. But when I ran 1M and 1000 count, I got 60 MB/s; as you say, nothing to write home about.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.