Data transfer speed Nixos on LVM

Hello,

I use an Samsung 970 PRO on a L490i7.
besides Win10 there is a LVM with a share, NixOS 20.03 and Ubuntu 20.04 partition.
It lives on an Lenovo Pro Dock.

Data transfer from Ubuntu to ssd (3.x) takes 20 seconds (writing) BUT copying the data from the ssd via the same ports into NixOS takes 4 minutes.

How is this possible and how to make NixOS as fast as Ubuntu?

there are a few LVM tweak parameters. Can you try Linux md vs. LVM performance - Server Fault suggestion?

Good morning danbst,

it appears that nixos uses usb 2.x speed instead of usb 3.1.
Do you have any idea about that?

So by “via the same ports” you meant that you’re copying from an external drive?

As for USB2 vs. 3.x you can compare what the two distros show in dmesg/the journal when they discover the drive. Although the NixOS kernel config most certainly enables all the relevant options (like USB_UAS).

dmesg

[20020.259452] mce: CPU6: Package temperature/speed normal
[20800.898119] usb 2-1.2.2: new SuperSpeed Gen 1 USB device number 7 using xhci_hcd
[20800.917573] usb 2-1.2.2: New USB device found, idVendor=04e8, idProduct=61f3, bcdDevice= 1.00
[20800.917576] usb 2-1.2.2: New USB device strings: Mfr=2, Product=3, SerialNumber=1
[20800.917577] usb 2-1.2.2: Product: Portable SSD T3
[20800.917578] usb 2-1.2.2: Manufacturer: Samsung
[20800.917579] usb 2-1.2.2: SerialNumber: 1234567AA0A2
[20800.929798] scsi host1: uas
[20800.930771] scsi 1:0:0:0: Direct-Access     Samsung  Portable SSD T3  0    PQ: 0 ANSI: 6
[20800.931866] sd 1:0:0:0: [sdc] 976773168 512-byte logical blocks: (500 GB/466 GiB)
[20800.931940] sd 1:0:0:0: [sdc] Write Protect is off
[20800.931942] sd 1:0:0:0: [sdc] Mode Sense: 43 00 00 00
[20800.932139] sd 1:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[20800.932336] sd 1:0:0:0: [sdc] Optimal transfer size 33553920 bytes
[20800.944654]  sdc: sdc1
[20800.946231] sd 1:0:0:0: [sdc] Attached SCSI disk
[20843.725955] EXT4-fs (dm-5): mounted filesystem with ordered data mode. Opts: (null)

journalctl --since “5 minutes ago”

Jun 18 14:32:09 nixos kernel: mce: CPU6: Package temperature/speed normal
Jun 18 14:32:20 nixos xsession[2414]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 3344, resource id: 23068704, major code: 18 (ChangeProperty), minor code: 0
Jun 18 14:32:21 nixos xsession[2414]: file:///nix/store/b84smlf133v9n5wy9jg955pkba8pfglj-kwin-5.17.5-bin/lib/qt-5.12.7/qml/org/kde/kwin/decoration/MenuButton.qml:22: TypeError: Type error
Jun 18 14:32:21 nixos xsession[2414]: file:///nix/store/b84smlf133v9n5wy9jg955pkba8pfglj-kwin-5.17.5-bin/share/kwin/decorations/kwin4_decoration_qml_plastik/contents/ui/main.qml:92: TypeError: Type error
Jun 18 14:32:21 nixos xsession[2414]: file:///nix/store/b84smlf133v9n5wy9jg955pkba8pfglj-kwin-5.17.5-bin/lib/qt-5.12.7/qml/org/kde/kwin/decoration/MenuButton.qml:22: TypeError: Type error
Jun 18 14:32:21 nixos xsession[2414]: file:///nix/store/b84smlf133v9n5wy9jg955pkba8pfglj-kwin-5.17.5-bin/share/kwin/decorations/kwin4_decoration_qml_plastik/contents/ui/main.qml:92: TypeError: Type error
Jun 18 14:32:21 nixos xsession[2414]: file:///nix/store/b84smlf133v9n5wy9jg955pkba8pfglj-kwin-5.17.5-bin/lib/qt-5.12.7/qml/org/kde/kwin/decoration/MenuButton.qml:22: TypeError: Type error
Jun 18 14:32:21 nixos xsession[2414]: file:///nix/store/b84smlf133v9n5wy9jg955pkba8pfglj-kwin-5.17.5-bin/share/kwin/decorations/kwin4_decoration_qml_plastik/contents/ui/main.qml:92: TypeError: Type error
Jun 18 14:32:21 nixos xsession[2414]: file:///nix/store/b84smlf133v9n5wy9jg955pkba8pfglj-kwin-5.17.5-bin/lib/qt-5.12.7/qml/org/kde/kwin/decoration/MenuButton.qml:22: TypeError: Type error
Jun 18 14:32:21 nixos xsession[2414]: file:///nix/store/b84smlf133v9n5wy9jg955pkba8pfglj-kwin-5.17.5-bin/share/kwin/decorations/kwin4_decoration_qml_plastik/contents/ui/main.qml:92: TypeError: Type error
Jun 18 14:32:21 nixos xsession[2414]: file:///nix/store/b84smlf133v9n5wy9jg955pkba8pfglj-kwin-5.17.5-bin/lib/qt-5.12.7/qml/org/kde/kwin/decoration/MenuButton.qml:22: TypeError: Type error
Jun 18 14:32:21 nixos xsession[2414]: file:///nix/store/b84smlf133v9n5wy9jg955pkba8pfglj-kwin-5.17.5-bin/share/kwin/decorations/kwin4_decoration_qml_plastik/contents/ui/main.qml:92: TypeError: Type error
Jun 18 14:32:21 nixos xsession[2414]: file:///nix/store/b84smlf133v9n5wy9jg955pkba8pfglj-kwin-5.17.5-bin/lib/qt-5.12.7/qml/org/kde/kwin/decoration/MenuButton.qml:22: TypeError: Type error
Jun 18 14:32:21 nixos xsession[2414]: file:///nix/store/b84smlf133v9n5wy9jg955pkba8pfglj-kwin-5.17.5-bin/share/kwin/decorations/kwin4_decoration_qml_plastik/contents/ui/main.qml:92: TypeError: Type error
Jun 18 14:32:21 nixos xsession[2414]: file:///nix/store/b84smlf133v9n5wy9jg955pkba8pfglj-kwin-5.17.5-bin/lib/qt-5.12.7/qml/org/kde/kwin/decoration/MenuButton.qml:22: TypeError: Type error
Jun 18 14:32:21 nixos xsession[2414]: file:///nix/store/b84smlf133v9n5wy9jg955pkba8pfglj-kwin-5.17.5-bin/share/kwin/decorations/kwin4_decoration_qml_plastik/contents/ui/main.qml:92: TypeError: Type error
Jun 18 14:32:21 nixos xsession[2414]: file:///nix/store/b84smlf133v9n5wy9jg955pkba8pfglj-kwin-5.17.5-bin/lib/qt-5.12.7/qml/org/kde/kwin/decoration/MenuButton.qml:22: TypeError: Type error
Jun 18 14:32:21 nixos xsession[2414]: file:///nix/store/b84smlf133v9n5wy9jg955pkba8pfglj-kwin-5.17.5-bin/share/kwin/decorations/kwin4_decoration_qml_plastik/contents/ui/main.qml:92: TypeError: Type error
Jun 18 14:32:21 nixos xsession[2414]: file:///nix/store/b84smlf133v9n5wy9jg955pkba8pfglj-kwin-5.17.5-bin/lib/qt-5.12.7/qml/org/kde/kwin/decoration/MenuButton.qml:22: TypeError: Type error
Jun 18 14:32:21 nixos xsession[2414]: file:///nix/store/b84smlf133v9n5wy9jg955pkba8pfglj-kwin-5.17.5-bin/share/kwin/decorations/kwin4_decoration_qml_plastik/contents/ui/main.qml:92: TypeError: Type error
Jun 18 14:32:21 nixos xsession[2414]: file:///nix/store/b84smlf133v9n5wy9jg955pkba8pfglj-kwin-5.17.5-bin/lib/qt-5.12.7/qml/org/kde/kwin/decoration/MenuButton.qml:22: TypeError: Type error
Jun 18 14:32:21 nixos xsession[2414]: file:///nix/store/b84smlf133v9n5wy9jg955pkba8pfglj-kwin-5.17.5-bin/share/kwin/decorations/kwin4_decoration_qml_plastik/contents/ui/main.qml:92: TypeError: Type error
Jun 18 14:32:21 nixos xsession[2414]: file:///nix/store/b84smlf133v9n5wy9jg955pkba8pfglj-kwin-5.17.5-bin/share/kwin/decorations/kwin4_decoration_qml_plastik/contents/ui/main.qml:92: TypeError: Type error
Jun 18 14:32:21 nixos xsession[2414]: file:///nix/store/b84smlf133v9n5wy9jg955pkba8pfglj-kwin-5.17.5-bin/lib/qt-5.12.7/qml/org/kde/kwin/decoration/MenuButton.qml:22: TypeError: Type error
Jun 18 14:32:43 nixos xsession[2414]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 7803, resource id: 104857611, major code: 18 (ChangeProperty), minor code: 0

whie transfering data :

Jun 18 14:40:25 nixos xsession[2414]: kf5.kio.kio_file: Couldn't preserve group for "/home/user/Downloads/x_unwichtig/file.doc"
Jun 18 14:40:25 nixos xsession[2414]: Invalid encoding. Ignoring "/home/user/file.txt

all files show the first message

no, I don’t have experience here

perhaps you know the following error?

[ 16.223049] ucsi_acpi USBC000:00: con2: failed to get status

perhaps "xhci_hcd" kernel module fixed it

1 Like

you may contribute your finding to https://github.com/NixOS/nixos-hardware repo