# hdparm on nvme ssd super slow (100 MB/s)

## Gh0str1d3r

I just did a speed test on my nvme ssd (Samsung 951) and found the following numbers:

```
# hdparm -Tt --direct /dev/nvme0n1

/dev/nvme0n1:

 Timing O_DIRECT cached reads:   226 MB in  2.01 seconds = 112.61 MB/sec

 Timing O_DIRECT disk reads: 402 MB in  3.00 seconds = 134.00 MB/sec
```

I believe the speed should be at least a factor 10 larger. What could be the reason for this slow rate? The disk has been completely full recently, but now I made some space:

```
# df -hT

Filesystem     Type      Size  Used Avail Use% Mounted on

/dev/root      ext4      710G  582G   93G  87% /

devtmpfs       devtmpfs   10M     0   10M   0% /dev

tmpfs          tmpfs     1.6G  1.3M  1.6G   1% /run

cgroup_root    tmpfs      10M     0   10M   0% /sys/fs/cgroup

shm            tmpfs     7.8G  7.3M  7.8G   1% /dev/shm

none           tmpfs     7.8G   16K  7.8G   1% /run/user/1000

```

The computer was otherwise idle when I ran the test.

Thanks for any tips.

----------

## Anon-E-moose

That's a wide open question. Similar to "why is their air"  :Laughing: 

But there are many factors that could affect it.

Is it attached to an m.2 slot on the motherboard and is the slot nmve.

If using a pcie card, is it at least 4 lanes and in a 4 lane wide slot. 

Did you test the speed when you first installed it?

Edit to add: that is a little slow, I have an 860 evo 256gb and get this

```
sudo hdparm -Tt --direct /dev/sda

/dev/sda:

 Timing O_DIRECT cached reads:   962 MB in  2.00 seconds = 480.92 MB/sec

 Timing O_DIRECT disk reads: 1462 MB in  3.00 seconds = 487.03 MB/sec
```

----------

## NeddySeagoon

Gh0str1d3r,

hdparm does not care about the filesystem. It reads sequential disk blocks.

Being full will compromise write speeds but have no effect on reads.

That both cached reads and disk reads are slow suggests a problem with the interface, since the drive can do better than that.

----------

## Gh0str1d3r

I have a Dell XPS 13 9350 laptop, in which this drive was natively installed (in an M.2 slot). On Windows, I get the following numbers:

```
-----------------------------------------------------------------------

CrystalDiskMark 6.0.1 x64 (UWP) (C) 2007-2018 hiyohiyo

                          Crystal Dew World : https://crystalmark.info/

-----------------------------------------------------------------------

* MB/s = 1,000,000 bytes/s [SATA/600 = 600,000,000 bytes/s]

* KB = 1000 bytes, KiB = 1024 bytes

   Sequential Read (Q= 32,T= 1) :  1644.301 MB/s

  Sequential Write (Q= 32,T= 1) :   293.704 MB/s

  Random Read 4KiB (Q=  8,T= 8) :   796.675 MB/s [ 194500.7 IOPS]

 Random Write 4KiB (Q=  8,T= 8) :   256.128 MB/s [  62531.3 IOPS]

  Random Read 4KiB (Q= 32,T= 1) :   285.299 MB/s [  69653.1 IOPS]

 Random Write 4KiB (Q= 32,T= 1) :   208.318 MB/s [  50858.9 IOPS]

  Random Read 4KiB (Q=  1,T= 1) :    31.103 MB/s [   7593.5 IOPS]

 Random Write 4KiB (Q=  1,T= 1) :    99.599 MB/s [  24316.2 IOPS]

  Test : 1024 MiB [D: 13.9% (7.0/50.0 GiB)] (x5)  [Interval=5 sec]

  Date : 2018/08/25 9:53:38

    OS : Windows 10  [10.0 Build 17134] (x64)

  
```

Even though some of the speeds are also not super fast, at least the sequential read is 10x faster than with Linux, indicating a Linux-specific problem. What could cause this?

----------

## Anon-E-moose

From the man page:

hdparm  provides  a command line interface to various kernel interfaces supported by the Linux SATA/PATA/SAS "libata" subsystem and the older IDE driver subsystem. 

So the question now is, are you using the nvme drivers?

----------

## Gh0str1d3r

 *Anon-E-moose wrote:*   

> From the man page:
> 
> hdparm  provides  a command line interface to various kernel interfaces supported by the Linux SATA/PATA/SAS "libata" subsystem and the older IDE driver subsystem. 
> 
> So the question now is, are you using the nvme drivers?

 

How can I find this out? The drivers are compiled into the kernel:

```
# grep "NVME" /usr/src/linux/.config

# NVME Support

CONFIG_NVME_CORE=y

CONFIG_BLK_DEV_NVME=y

# CONFIG_NVME_MULTIPATH is not set

# CONFIG_NVME_FC is not set

# CONFIG_NVME_TARGET is not set

CONFIG_RTC_NVMEM=y

CONFIG_NVMEM=y

```

----------

## Anon-E-moose

what does "dmesg |grep -i nvme" show

And "lspci -nnk"

----------

## Gh0str1d3r

 *Anon-E-moose wrote:*   

> what does "dmesg |grep -i nvme" show
> 
> And "lspci -nnk"

 

```

# dmesg |grep -i nvme

[    0.000000] Kernel command line: root=/dev/nvme0n1p6 

[    0.352454] nvme nvme0: pci function 0000:3c:00.0

[    0.461126]  nvme0n1: p1 p2 p3 p4 p5 p6

[    1.521327] EXT4-fs (nvme0n1p6): mounted filesystem with ordered data mode. Opts: (null)

[    3.354839] EXT4-fs (nvme0n1p6): re-mounted. Opts: (null)

[    3.431702] Adding 33554428k swap on /dev/nvme0n1p5.  Priority:-2 extents:1 across:33554428k SS
```

```
# lspci -nnk

00:00.0 Host bridge [0600]: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Host Bridge/DRAM Registers [8086:1904] (rev 08)

        Subsystem: Dell Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Host Bridge/DRAM Registers [1028:0704]

        Kernel driver in use: skl_uncore

00:02.0 VGA compatible controller [0300]: Intel Corporation Skylake GT2 [HD Graphics 520] [8086:1916] (rev 07)

        DeviceName:  Onboard IGD

        Subsystem: Dell Skylake GT2 [HD Graphics 520] [1028:0704]

        Kernel driver in use: i915

00:04.0 Signal processing controller [1180]: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem [8086:1903] (rev 08)

        Subsystem: Dell Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem [1028:0704]

00:14.0 USB controller [0c03]: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller [8086:9d2f] (rev 21)

        Subsystem: Dell Sunrise Point-LP USB 3.0 xHCI Controller [1028:0704]

        Kernel driver in use: xhci_hcd

        Kernel modules: xhci_pci

00:14.2 Signal processing controller [1180]: Intel Corporation Sunrise Point-LP Thermal subsystem [8086:9d31] (rev 21)

        Subsystem: Dell Sunrise Point-LP Thermal subsystem [1028:0704]

00:15.0 Signal processing controller [1180]: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #0 [8086:9d60] (rev 21)

        Subsystem: Dell Sunrise Point-LP Serial IO I2C Controller [1028:0704]

00:15.1 Signal processing controller [1180]: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #1 [8086:9d61] (rev 21)

        Subsystem: Dell Sunrise Point-LP Serial IO I2C Controller [1028:0704]

00:16.0 Communication controller [0780]: Intel Corporation Sunrise Point-LP CSME HECI #1 [8086:9d3a] (rev 21)

        Subsystem: Dell Sunrise Point-LP CSME HECI [1028:0704]

00:17.0 SATA controller [0106]: Intel Corporation Sunrise Point-LP SATA Controller [AHCI mode] [8086:9d03] (rev 21)

        Subsystem: Dell Sunrise Point-LP SATA Controller [AHCI mode] [1028:0704]

        Kernel driver in use: ahci

        Kernel modules: ahci

00:1c.0 PCI bridge [0604]: Intel Corporation Sunrise Point-LP PCI Express Root Port #1 [8086:9d10] (rev f1)

        Kernel driver in use: pcieport

00:1c.4 PCI bridge [0604]: Intel Corporation Sunrise Point-LP PCI Express Root Port #5 [8086:9d14] (rev f1)

        Kernel driver in use: pcieport

00:1c.5 PCI bridge [0604]: Intel Corporation Sunrise Point-LP PCI Express Root Port #6 [8086:9d15] (rev f1)

        Kernel driver in use: pcieport

00:1d.0 PCI bridge [0604]: Intel Corporation Sunrise Point-LP PCI Express Root Port #9 [8086:9d18] (rev f1)

        Kernel driver in use: pcieport

00:1f.0 ISA bridge [0601]: Intel Corporation Sunrise Point-LP LPC Controller [8086:9d48] (rev 21)

        Subsystem: Dell Sunrise Point-LP LPC Controller [1028:0704]

00:1f.2 Memory controller [0580]: Intel Corporation Sunrise Point-LP PMC [8086:9d21] (rev 21)

        Subsystem: Dell Sunrise Point-LP PMC [1028:0704]

00:1f.3 Audio device [0403]: Intel Corporation Sunrise Point-LP HD Audio [8086:9d70] (rev 21)

        Subsystem: Dell Sunrise Point-LP HD Audio [1028:0704]

        Kernel driver in use: snd_hda_intel

        Kernel modules: snd_hda_intel

00:1f.4 SMBus [0c05]: Intel Corporation Sunrise Point-LP SMBus [8086:9d23] (rev 21)

        Subsystem: Dell Sunrise Point-LP SMBus [1028:0704]

        Kernel driver in use: i801_smbus

        Kernel modules: i2c_i801

3a:00.0 Network controller [0280]: Intel Corporation Wireless 7265 [8086:095a] (rev 59)

        Subsystem: Intel Corporation Dual Band Wireless-AC 7265 [8086:5010]

        Kernel driver in use: iwlwifi

        Kernel modules: iwlwifi

3b:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS525A PCI Express Card Reader [10ec:525a] (rev 01)

        Subsystem: Dell RTS525A PCI Express Card Reader [1028:0704]

        Kernel driver in use: rtsx_pci

        Kernel modules: rtsx_pci

3c:00.0 Non-Volatile memory controller [0108]: Samsung Electronics Co Ltd NVMe SSD Controller SM951/PM951 [144d:a802] (rev 01)

        Subsystem: Samsung Electronics Co Ltd NVMe SSD Controller SM951/PM951 [144d:a801]

        Kernel driver in use: nvme

```

----------

## Anon-E-moose

```
3c:00.0 Non-Volatile memory controller [0108]: Samsung Electronics Co Ltd NVMe SSD Controller SM951/PM951 [144d:a802] (rev 01)

        Subsystem: Samsung Electronics Co Ltd NVMe SSD Controller SM951/PM951 [144d:a801]

        Kernel driver in use: nvme 
```

This says you're using the kernel module. But I don't know much beyond that as I don't have an nvme drive.

Which kernel are you using?

And there are a couple of other nvme things to select in the device area, but again I'm not sure what they do.

----------

## Anon-E-moose

https://wiki.archlinux.org/index.php/Solid_state_drive/NVMe though not much info there

https://wiki.gentoo.org/wiki/NVMe same for this one

----------

## Gh0str1d3r

 *Anon-E-moose wrote:*   

> 
> 
> ```
> 3c:00.0 Non-Volatile memory controller [0108]: Samsung Electronics Co Ltd NVMe SSD Controller SM951/PM951 [144d:a802] (rev 01)
> 
> ...

 

 *Quote:*   

> https://wiki.archlinux.org/index.php/Solid_state_drive/NVMe though not much info there 
> 
> https://wiki.gentoo.org/wiki/NVMe same for this one

 

I'm using kernel 4.17.4. I followed the little advice given on the web pages you cited, but things look okay afaik.

```
# nvme get-feature -f 0x0c -H /dev/nvme0

get-feature:0xc (Autonomous Power State Transition), Current value:0x000001

        Autonomous Power State Transition Enable (APSTE): Enabled

        Auto PST Entries        .................

        Entry[ 0]   

        .................

        Idle Time Prior to Transition (ITPT): 275 ms

        Idle Transition Power State   (ITPS): 3

        .................

        Entry[ 1]   

        .................

        Idle Time Prior to Transition (ITPT): 275 ms

        Idle Transition Power State   (ITPS): 3

        .................

        Entry[ 2]   

        .................

        Idle Time Prior to Transition (ITPT): 275 ms

        Idle Transition Power State   (ITPS): 3

        .................

        Entry[ 3]   

        .................

        Idle Time Prior to Transition (ITPT): 1200 ms

        Idle Transition Power State   (ITPS): 4

        .................

        Entry[ 4]   

        .................

        Idle Time Prior to Transition (ITPT): 0 ms

        Idle Transition Power State   (ITPS): 0

        .................

        Entry[ 5]   

        .................

        Idle Time Prior to Transition (ITPT): 0 ms

        Idle Transition Power State   (ITPS): 0

        .................

        Entry[ 6]   

        .................

        Idle Time Prior to Transition (ITPT): 0 ms

        Idle Transition Power State   (ITPS): 0

        .................

        Entry[ 7]   

        .................

        Idle Time Prior to Transition (ITPT): 0 ms

        Idle Transition Power State   (ITPS): 0

        .................

        Entry[ 8]   

        .................

        Idle Time Prior to Transition (ITPT): 0 ms

        Idle Transition Power State   (ITPS): 0

        .................

        Entry[ 9]   

        .................

        Idle Time Prior to Transition (ITPT): 0 ms

        Idle Transition Power State   (ITPS): 0

        .................

        Entry[10]   

        .................

        Idle Time Prior to Transition (ITPT): 0 ms

        Idle Transition Power State   (ITPS): 0

        .................

        Entry[11]   

        .................

        Idle Time Prior to Transition (ITPT): 0 ms

        Idle Transition Power State   (ITPS): 0

        .................

        Entry[12]   

        .................

        Idle Time Prior to Transition (ITPT): 0 ms

        Idle Transition Power State   (ITPS): 0

        .................

        Entry[13]   

        .................

        Idle Time Prior to Transition (ITPT): 0 ms

        Idle Transition Power State   (ITPS): 0

        .................

        Entry[14]   

        .................

        Idle Time Prior to Transition (ITPT): 0 ms

        Idle Transition Power State   (ITPS): 0

        .................

        Entry[15]   

        .................

        Idle Time Prior to Transition (ITPT): 0 ms

        Idle Transition Power State   (ITPS): 0

        .................

        Entry[16]   

        .................

        Idle Time Prior to Transition (ITPT): 0 ms

        Idle Transition Power State   (ITPS): 0

        .................

        Entry[17]   

        .................

        Idle Time Prior to Transition (ITPT): 0 ms

        Idle Transition Power State   (ITPS): 0

        .................

        Entry[18]   

        .................

        Idle Time Prior to Transition (ITPT): 0 ms

        Idle Transition Power State   (ITPS): 0

        .................

        Entry[19]   

        .................

        Idle Time Prior to Transition (ITPT): 0 ms

        Idle Transition Power State   (ITPS): 0

        .................

        Entry[20]   

        .................

        Idle Time Prior to Transition (ITPT): 0 ms

        Idle Transition Power State   (ITPS): 0

        .................

        Entry[21]   

        .................

        Idle Time Prior to Transition (ITPT): 0 ms

        Idle Transition Power State   (ITPS): 0

        .................

        Entry[22]   

        .................

        Idle Time Prior to Transition (ITPT): 0 ms

        Idle Transition Power State   (ITPS): 0

        .................

        Entry[23]   

        .................

        Idle Time Prior to Transition (ITPT): 0 ms

        Idle Transition Power State   (ITPS): 0

        .................

        Entry[24]   

        .................

        Idle Time Prior to Transition (ITPT): 0 ms

        Idle Transition Power State   (ITPS): 0

        .................

        Entry[25]   

        .................

        Idle Time Prior to Transition (ITPT): 0 ms

        Idle Transition Power State   (ITPS): 0

        .................

        Entry[26]   

        .................

        Idle Time Prior to Transition (ITPT): 0 ms

        Idle Transition Power State   (ITPS): 0

        .................

        Entry[27]   

        .................

        Idle Time Prior to Transition (ITPT): 0 ms

        Idle Transition Power State   (ITPS): 0

        .................

        Entry[28]   

        .................

        Idle Time Prior to Transition (ITPT): 0 ms

        Idle Transition Power State   (ITPS): 0

        .................

        Entry[29]   

        .................

        Idle Time Prior to Transition (ITPT): 0 ms

        Idle Transition Power State   (ITPS): 0

        .................

        Entry[30]   

        .................

        Idle Time Prior to Transition (ITPT): 0 ms

        Idle Transition Power State   (ITPS): 0

        .................

        Entry[31]   

        .................

        Idle Time Prior to Transition (ITPT): 0 ms

        Idle Transition Power State   (ITPS): 0

        .................

       0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f

0000: 18 13 01 00 00 00 00 00 18 13 01 00 00 00 00 00 "................"

0010: 18 13 01 00 00 00 00 00 20 b0 04 00 00 00 00 00 "................"

0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 "................"

0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 "................"

0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 "................"

0050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 "................"

0060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 "................"

0070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 "................"

0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 "................"

0090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 "................"

00a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 "................"

00b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 "................"

00c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 "................"

00d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 "................"

00e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 "................"

00f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 "................"

```

----------

## Anon-E-moose

Maybe someone else with some real nvme experience will weigh in.

I've been thinking about getting an nvme drive, but I'd have to go with a pcie type interface, and truly the ssd/sata is fast enough at least for now.

Sorry I can't help more than this and hope you find some answers. 

If it even sped up by twice or three times, you'd notice an improvement.

----------

## NeddySeagoon

Gh0str1d3r,

Hmm Sunrisepoint hardware and devices with no drivers ...

```
00:14.2 Signal processing controller [1180]: Intel Corporation Sunrise Point-LP Thermal subsystem [8086:9d31] (rev 21)

        Subsystem: Dell Sunrise Point-LP Thermal subsystem [1028:0704]

00:15.0 Signal processing controller [1180]: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #0 [8086:9d60] (rev 21)

        Subsystem: Dell Sunrise Point-LP Serial IO I2C Controller [1028:0704]

00:15.1 Signal processing controller [1180]: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #1 [8086:9d61] (rev 21)

        Subsystem: Dell Sunrise Point-LP Serial IO I2C Controller [1028:0704]

00:16.0 Communication controller [0780]: Intel Corporation Sunrise Point-LP CSME HECI #1 [8086:9d3a] (rev 21)

        Subsystem: Dell Sunrise Point-LP CSME HECI [1028:0704] 
```

Please put your entire kernel .config file onto a pastebin site.

Sunrise Point has some of its very own drivers.

----------

## Anon-E-moose

One more link that might have some pointers https://askubuntu.com/questions/698395/poor-io-performance-pcie-nvme-samsung-950-pro

----------

## Gh0str1d3r

 *NeddySeagoon wrote:*   

> Gh0str1d3r,
> 
> Hmm Sunrisepoint hardware and devices with no drivers ...
> 
> ```
> ...

 

https://pastebin.com/0MJKp49L

Anon-E-moose, thanks for your help so far! Indeed, the GB/s speeds are rarely necessary, which is why I didn't notice the slow speed up to now (I was thinking of buying a 2TB Samsung 860 EVO, which is supposedly slower than my current drive, so I wanted to know what the actual speed is. If I can get high speeds I might instead go for the new 970 EVO.

----------

## Anon-E-moose

drivers for sunrise should be

intel_pch_thermal

intel-lpss

mei_me

(similar enough to the acer ones on my system, I think those work for the intel sunrise stuff)

----------

## apiaio

Do I have the same problem?

```
miropc miro # hdparm -Tt --direct /dev/sda                                                                               

                                                                                                                                    

/dev/sda:                                                                                                                           

 Timing O_DIRECT cached reads:   598 MB in  2.00 seconds = 299.01 MB/sec

 Timing O_DIRECT disk reads: 566 MB in  3.00 seconds = 188.48 MB/sec

miropc miro # hdparm -Tt --direct /dev/sdb

/dev/sdb:

 Timing O_DIRECT cached reads:   998 MB in  2.00 seconds = 498.37 MB/sec

 Timing O_DIRECT disk reads: 398 MB in  3.01 seconds = 132.19 MB/sec

miropc miro # 

```

sda is sdd and sdb is rotational hard disk drive.

```
miropc miro # lspci -nnk

...

00:17.0 SATA controller [0106]: Intel Corporation Sunrise Point-H SATA controller [AHCI mode] [8086:a102] (rev 31)

        Subsystem: ASUSTeK Computer Inc. Sunrise Point-H SATA controller [AHCI mode] [1043:8694]

        Kernel driver in use: ahci

...
```

Should I enable sunrise drivers too?

Thanks

----------

## Gh0str1d3r

 *Anon-E-moose wrote:*   

> drivers for sunrise should be
> 
> intel_pch_thermal
> 
> intel-lpss
> ...

 

I compiled the new 4.18.3 kernel with these options, but still no improvement. The new kernel config is here:

https://pastebin.com/KqebdH8n

----------

## russK

I have a Samsung 951 and it is indeed more than a factor of 10 faster than what you are seeing:

```
hdparm -Tt --direct /dev/nvme0n1

/dev/nvme0n1:

 Timing O_DIRECT cached reads:   3300 MB in  2.00 seconds = 1650.48 MB/sec

 Timing O_DIRECT disk reads: 6308 MB in  3.00 seconds = 2102.38 MB/sec

```

I don't recall doing anything special to get these speeds which may be typical speeds.

I compared our kernel .config files and they are substantially different.  One thing that stood out to me though was this in your .config:

```
CONFIG_BLK_DEV_THROTTLING=y
```

I'm not familiar with this setting.  Are you using this feature?  If not, maybe try turning it off.

russK

----------

## Anon-E-moose

Never noticed the throttling parm, but I wouldn't turn it on

```
config BLK_DEV_THROTTLING

    bool "Block layer bio throttling support"

    depends on BLK_CGROUP=y

    default n

    ---help---

    Block layer bio throttling support. It can be used to limit

    the IO rate to a device. IO rate policies are per cgroup and

    one needs to mount and use blkio cgroup controller for creating

    cgroups and specifying per device IO rate policies.

    See Documentation/cgroups/blkio-controller.txt for more information.

config BLK_DEV_THROTTLING_LOW

    bool "Block throttling .low limit interface support (EXPERIMENTAL)"

    depends on BLK_DEV_THROTTLING

    default n

    ---help---

    Add .low limit interface for block throttling. The low limit is a best

    effort limit to prioritize cgroups. Depending on the setting, the limit

    can be used to protect cgroups in terms of bandwidth/iops and better

    utilize disk resource.

    Note, this is an experimental interface and could be changed someday.
```

It does say it needs cgroup and controller, but I wouldn't have it installed anyway.

----------

## Gh0str1d3r

 *russK wrote:*   

> I have a Samsung 951 and it is indeed more than a factor of 10 faster than what you are seeing:
> 
> ```
> hdparm -Tt --direct /dev/nvme0n1
> 
> ...

 

I disabled this feature, disabled X86_INTEL_LPSS and also changed the the other new features to modules:

CONFIG_MFD_INTEL_LPSS=m

CONFIG_MFD_INTEL_LPSS_ACPI=m

CONFIG_MFD_INTEL_LPSS_PCI=m

CONFIG_INTEL_PCH_THERMAL=m

CONFIG_INTEL_MEI_ME=m

The changes were made because the kernel with compiled-in features was very unstable (frequently freezing and definitely crashing on every attempt to suspend).

Unfortunately, the access speed to the NVME has not changed by any of this.

russK, what type of computer do you have? Would you mind sharing your .config and your lspci -nnk?

Here is my current version:

https://pastebin.com/smRCgNNx

and my updated lspci:

```
# lspci -nnk

00:00.0 Host bridge [0600]: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Host Bridge/DRAM Registers [8086:1904] (rev 08)

        Subsystem: Dell Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Host Bridge/DRAM Registers [1028:0704]

        Kernel driver in use: skl_uncore

00:02.0 VGA compatible controller [0300]: Intel Corporation Skylake GT2 [HD Graphics 520] [8086:1916] (rev 07)

        DeviceName:  Onboard IGD

        Subsystem: Dell Skylake GT2 [HD Graphics 520] [1028:0704]

        Kernel driver in use: i915

00:04.0 Signal processing controller [1180]: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem [8086:1903] (rev 08)

        Subsystem: Dell Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem [1028:0704]

00:14.0 USB controller [0c03]: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller [8086:9d2f] (rev 21)

        Subsystem: Dell Sunrise Point-LP USB 3.0 xHCI Controller [1028:0704]

        Kernel driver in use: xhci_hcd

        Kernel modules: xhci_pci

00:14.2 Signal processing controller [1180]: Intel Corporation Sunrise Point-LP Thermal subsystem [8086:9d31] (rev 21)

        Subsystem: Dell Sunrise Point-LP Thermal subsystem [1028:0704]

        Kernel driver in use: intel_pch_thermal

        Kernel modules: intel_pch_thermal

00:15.0 Signal processing controller [1180]: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #0 [8086:9d60] (rev 21)

        Subsystem: Dell Sunrise Point-LP Serial IO I2C Controller [1028:0704]

        Kernel driver in use: intel-lpss

        Kernel modules: intel_lpss_pci

00:15.1 Signal processing controller [1180]: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #1 [8086:9d61] (rev 21)

        Subsystem: Dell Sunrise Point-LP Serial IO I2C Controller [1028:0704]

        Kernel driver in use: intel-lpss

        Kernel modules: intel_lpss_pci

00:16.0 Communication controller [0780]: Intel Corporation Sunrise Point-LP CSME HECI #1 [8086:9d3a] (rev 21)

        Subsystem: Dell Sunrise Point-LP CSME HECI [1028:0704]

        Kernel driver in use: mei_me

        Kernel modules: mei_me

00:17.0 SATA controller [0106]: Intel Corporation Sunrise Point-LP SATA Controller [AHCI mode] [8086:9d03] (rev 21)

        Subsystem: Dell Sunrise Point-LP SATA Controller [AHCI mode] [1028:0704]

        Kernel driver in use: ahci

        Kernel modules: ahci

00:1c.0 PCI bridge [0604]: Intel Corporation Sunrise Point-LP PCI Express Root Port #1 [8086:9d10] (rev f1)

        Kernel driver in use: pcieport

00:1c.4 PCI bridge [0604]: Intel Corporation Sunrise Point-LP PCI Express Root Port #5 [8086:9d14] (rev f1)

        Kernel driver in use: pcieport

00:1c.5 PCI bridge [0604]: Intel Corporation Sunrise Point-LP PCI Express Root Port #6 [8086:9d15] (rev f1)

        Kernel driver in use: pcieport

00:1d.0 PCI bridge [0604]: Intel Corporation Sunrise Point-LP PCI Express Root Port #9 [8086:9d18] (rev f1)

        Kernel driver in use: pcieport

00:1f.0 ISA bridge [0601]: Intel Corporation Sunrise Point-LP LPC Controller [8086:9d48] (rev 21)

        Subsystem: Dell Sunrise Point-LP LPC Controller [1028:0704]

00:1f.2 Memory controller [0580]: Intel Corporation Sunrise Point-LP PMC [8086:9d21] (rev 21)

        Subsystem: Dell Sunrise Point-LP PMC [1028:0704]

00:1f.3 Audio device [0403]: Intel Corporation Sunrise Point-LP HD Audio [8086:9d70] (rev 21)

        Subsystem: Dell Sunrise Point-LP HD Audio [1028:0704]

        Kernel driver in use: snd_hda_intel

        Kernel modules: snd_hda_intel

00:1f.4 SMBus [0c05]: Intel Corporation Sunrise Point-LP SMBus [8086:9d23] (rev 21)

        Subsystem: Dell Sunrise Point-LP SMBus [1028:0704]

        Kernel driver in use: i801_smbus

        Kernel modules: i2c_i801

3a:00.0 Network controller [0280]: Intel Corporation Wireless 7265 [8086:095a] (rev 59)

        Subsystem: Intel Corporation Dual Band Wireless-AC 7265 [8086:5010]

        Kernel driver in use: iwlwifi

        Kernel modules: iwlwifi

3b:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS525A PCI Express Card Reader [10ec:525a] (rev 01)

        Subsystem: Dell RTS525A PCI Express Card Reader [1028:0704]

        Kernel driver in use: rtsx_pci

        Kernel modules: rtsx_pci

3c:00.0 Non-Volatile memory controller [0108]: Samsung Electronics Co Ltd NVMe SSD Controller SM951/PM951 [144d:a802] (rev 01)

        Subsystem: Samsung Electronics Co Ltd NVMe SSD Controller SM951/PM951 [144d:a801]

        Kernel driver in use: nvme

```

I'm still missing some drivers, in particular for these three:

```
00:04.0 Signal processing controller [1180]: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem [8086:1903] (rev 08)

        Subsystem: Dell Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem [1028:0704]

00:1f.0 ISA bridge [0601]: Intel Corporation Sunrise Point-LP LPC Controller [8086:9d48] (rev 21)

        Subsystem: Dell Sunrise Point-LP LPC Controller [1028:0704]

00:1f.2 Memory controller [0580]: Intel Corporation Sunrise Point-LP PMC [8086:9d21] (rev 21)

        Subsystem: Dell Sunrise Point-LP PMC [1028:0704]
```

Not sure if they need a driver, or which driver it would be.

Thanks for all your help so far!

----------

## russK

 *Gh0str1d3r wrote:*   

> russK, what type of computer do you have? Would you mind sharing your .config and your lspci -nnk?

 

This is a MSI X470 Gaming Pro Carbon.  Lots of AMD stuff, so the details are pretty different from yours.  Note I have a slower Corsair NVME because there is another M.2 slot and I figured there was no point leaving it empty.

```
lspci -nnk 

00:00.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Root Complex [1022:1450]

   Subsystem: Micro-Star International Co., Ltd. [MSI] Family 17h (Models 00h-0fh) Root Complex [1462:7b78]

00:00.2 IOMMU [0806]: Advanced Micro Devices, Inc. [AMD] Device [1022:1451]

   Subsystem: Advanced Micro Devices, Inc. [AMD] Device [1022:1451]

00:01.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) PCIe Dummy Host Bridge [1022:1452]

00:01.1 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:1453]

   Kernel driver in use: pcieport

   Kernel modules: shpchp

00:01.3 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:1453]

   Kernel driver in use: pcieport

   Kernel modules: shpchp

00:02.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) PCIe Dummy Host Bridge [1022:1452]

00:03.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) PCIe Dummy Host Bridge [1022:1452]

00:03.1 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:1453]

   Kernel driver in use: pcieport

   Kernel modules: shpchp

00:03.2 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:1453]

   Kernel driver in use: pcieport

   Kernel modules: shpchp

00:04.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) PCIe Dummy Host Bridge [1022:1452]

00:07.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) PCIe Dummy Host Bridge [1022:1452]

00:07.1 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Internal PCIe GPP Bridge 0 to Bus B [1022:1454]

   Kernel driver in use: pcieport

   Kernel modules: shpchp

00:08.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) PCIe Dummy Host Bridge [1022:1452]

00:08.1 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Internal PCIe GPP Bridge 0 to Bus B [1022:1454]

   Kernel driver in use: pcieport

   Kernel modules: shpchp

00:14.0 SMBus [0c05]: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller [1022:790b] (rev 59)

   Subsystem: Micro-Star International Co., Ltd. [MSI] FCH SMBus Controller [1462:7b78]

   Kernel driver in use: piix4_smbus

   Kernel modules: i2c_piix4, sp5100_tco

00:14.3 ISA bridge [0601]: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge [1022:790e] (rev 51)

   Subsystem: Micro-Star International Co., Ltd. [MSI] FCH LPC Bridge [1462:7b78]

00:18.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 0 [1022:1460]

00:18.1 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 1 [1022:1461]

00:18.2 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 2 [1022:1462]

00:18.3 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 3 [1022:1463]

00:18.4 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 4 [1022:1464]

00:18.5 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 5 [1022:1465]

00:18.6 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric Device 18h Function 6 [1022:1466]

00:18.7 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 7 [1022:1467]

01:00.0 Non-Volatile memory controller [0108]: Samsung Electronics Co Ltd NVMe SSD Controller SM951/PM951 [144d:a802] (rev 01)

   Subsystem: Samsung Electronics Co Ltd NVMe SSD Controller SM951/PM951 [144d:a801]

   Kernel driver in use: nvme

03:00.0 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] Device [1022:43d0] (rev 01)

   Subsystem: ASMedia Technology Inc. Device [1b21:1142]

   Kernel driver in use: xhci_hcd

03:00.1 SATA controller [0106]: Advanced Micro Devices, Inc. [AMD] Device [1022:43c8] (rev 01)

   Subsystem: ASMedia Technology Inc. Device [1b21:1062]

   Kernel driver in use: ahci

03:00.2 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:43c6] (rev 01)

   Kernel driver in use: pcieport

   Kernel modules: shpchp

16:00.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:43c7] (rev 01)

   Kernel driver in use: pcieport

   Kernel modules: shpchp

16:01.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:43c7] (rev 01)

   Kernel driver in use: pcieport

   Kernel modules: shpchp

16:02.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:43c7] (rev 01)

   Kernel driver in use: pcieport

   Kernel modules: shpchp

16:03.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:43c7] (rev 01)

   Kernel driver in use: pcieport

   Kernel modules: shpchp

16:04.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:43c7] (rev 01)

   Kernel driver in use: pcieport

   Kernel modules: shpchp

18:00.0 Ethernet controller [0200]: Intel Corporation I211 Gigabit Network Connection [8086:1539] (rev 03)

   Subsystem: Micro-Star International Co., Ltd. [MSI] I211 Gigabit Network Connection [1462:7b78]

1b:00.0 Non-Volatile memory controller [0108]: Device [1987:5008] (rev 01)

   Subsystem: Device [1987:5008]

   Kernel driver in use: nvme

1c:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP106 [GeForce GTX 1060 6GB] [10de:1c03] (rev a1)

   Subsystem: Gigabyte Technology Co., Ltd GP106 [GeForce GTX 1060 6GB] [1458:3716]

   Kernel driver in use: nvidia

   Kernel modules: nvidia_drm, nvidia

1c:00.1 Audio device [0403]: NVIDIA Corporation GP106 High Definition Audio Controller [10de:10f1] (rev a1)

   Subsystem: Gigabyte Technology Co., Ltd GP106 High Definition Audio Controller [1458:3716]

   Kernel driver in use: snd_hda_intel

   Kernel modules: snd_hda_intel

1d:00.0 SATA controller [0106]: Marvell Technology Group Ltd. 88SE9235 PCIe 2.0 x2 4-port SATA 6 Gb/s Controller [1b4b:9235] (rev 11)

   Subsystem: Marvell Technology Group Ltd. 88SE9235 PCIe 2.0 x2 4-port SATA 6 Gb/s Controller [1b4b:9235]

   Kernel driver in use: ahci

1e:00.0 Non-Essential Instrumentation [1300]: Advanced Micro Devices, Inc. [AMD] Device [1022:145a]

   Subsystem: Advanced Micro Devices, Inc. [AMD] Device [1022:145a]

1e:00.2 Encryption controller [1080]: Advanced Micro Devices, Inc. [AMD] Device [1022:1456]

   Subsystem: Advanced Micro Devices, Inc. [AMD] Device [1022:1456]

1e:00.3 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] USB 3.0 Host controller [1022:145f]

   Subsystem: Micro-Star International Co., Ltd. [MSI] USB 3.0 Host controller [1462:7b78]

   Kernel driver in use: xhci_hcd

1f:00.0 Non-Essential Instrumentation [1300]: Advanced Micro Devices, Inc. [AMD] Device [1022:1455]

   Subsystem: Advanced Micro Devices, Inc. [AMD] Device [1022:1455]

1f:00.2 SATA controller [0106]: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] [1022:7901] (rev 51)

   Subsystem: Micro-Star International Co., Ltd. [MSI] FCH SATA Controller [AHCI mode] [1462:7b78]

   Kernel driver in use: ahci

1f:00.3 Audio device [0403]: Advanced Micro Devices, Inc. [AMD] Device [1022:1457]

   Subsystem: Micro-Star International Co., Ltd. [MSI] Device [1462:cb78]

   Kernel driver in use: snd_hda_intel

   Kernel modules: snd_hda_intel
```

My 4.14.65-gentoo .config is here:  https://paste.pound-python.org/show/NWzIyWeYiOObVOfYQ24A/

One thing I did some time ago during a kernel upgrade was a 'make localmodconfig' and looked at the result against my previous .config with meld.  I turned off a lot of modules I was not using.  I may do this exercise again soon because this motherboard is new for me, I just did a heart transplant on this box.

HTH

----------

## P.Kosunen

 *Gh0str1d3r wrote:*   

> Not sure if they need a driver, or which driver it would be.

 

You could boot SystemRescueCd etc livecd and see what drivers it use.

----------

## Anon-E-moose

 *P.Kosunen wrote:*   

>  *Gh0str1d3r wrote:*   Not sure if they need a driver, or which driver it would be. 
> 
> You could boot SystemRescueCd etc livecd and see what drivers it use.

 

Good idea, I believe that sysrescuecd has hdparm on it also, so could be run from there.

----------

## russK

Gh0str1d3r,

Maybe you should also check the health of the device with smartctl or nvme-cli.  Can't say that I know how to interpret much of this:

```
smartctl -a /dev/nvme0

Password: 

smartctl 6.6 2017-11-05 r4594 [x86_64-linux-4.14.65-gentoo] (local build)

Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===

Model Number:                       Samsung SSD 950 PRO 256GB

Serial Number:                      S2GLNCAGC19033E

Firmware Version:                   1B0QBXX7

PCI Vendor/Subsystem ID:            0x144d

IEEE OUI Identifier:                0x002538

Controller ID:                      1

Number of Namespaces:               1

Namespace 1 Size/Capacity:          256,060,514,304 [256 GB]

Namespace 1 Utilization:            89,343,729,664 [89.3 GB]

Namespace 1 Formatted LBA Size:     512

Namespace 1 IEEE EUI-64:            002538 5cf150576c

Local Time is:                      Tue Aug 28 21:11:49 2018 EDT

Firmware Updates (0x06):            3 Slots

Optional Admin Commands (0x0007):   Security Format Frmw_DL

Optional NVM Commands (0x001f):     Comp Wr_Unc DS_Mngmt Wr_Zero Sav/Sel_Feat

Maximum Data Transfer Size:         32 Pages

Supported Power States

St Op     Max   Active     Idle   RL RT WL WT  Ent_Lat  Ex_Lat

 0 +     6.50W       -        -    0  0  0  0        5       5

 1 +     5.80W       -        -    1  1  1  1       30      30

 2 +     3.60W       -        -    2  2  2  2      100     100

 3 -   0.0700W       -        -    3  3  3  3      500    5000

 4 -   0.0050W       -        -    4  4  4  4     2000   22000

Supported LBA Sizes (NSID 0x1)

Id Fmt  Data  Metadt  Rel_Perf

 0 +     512       0         0

=== START OF SMART DATA SECTION ===

SMART overall-health self-assessment test result: PASSED

SMART/Health Information (NVMe Log 0x02, NSID 0xffffffff)

Critical Warning:                   0x00

Temperature:                        47 Celsius

Available Spare:                    100%

Available Spare Threshold:          10%

Percentage Used:                    2%

Data Units Read:                    11,612,980 [5.94 TB]

Data Units Written:                 28,078,858 [14.3 TB]

Host Read Commands:                 181,723,842

Host Write Commands:                839,061,593

Controller Busy Time:               3,172

Power Cycles:                       494

Power On Hours:                     15,780

Unsafe Shutdowns:                   300

Media and Data Integrity Errors:    0

Error Information Log Entries:      5

Error Information (NVMe Log 0x01, max 64 entries)

Num   ErrCount  SQId   CmdId  Status  PELoc          LBA  NSID    VS

  0          5     0  0x0014  0x4004  0x000            0     0     -

  1          4     0  0x0005  0x4004  0x000            0     0     -

  2          3     0  0x0005  0x4004  0x000            0     0     -

  3          2     0  0x0017  0x4004  0x000            0     0     -

  4          1     0  0x001d  0x4004  0x000            0     0     -

```

```
nvme smart-log /dev/nvme0n1

Smart Log for NVME device:nvme0n1 namespace-id:ffffffff

critical_warning                    : 0

temperature                         : 47 C

available_spare                     : 100%

available_spare_threshold           : 10%

percentage_used                     : 2%

data_units_read                     : 11,612,985

data_units_written                  : 28,078,971

host_read_commands                  : 181,723,869

host_write_commands                 : 839,064,074

controller_busy_time                : 3,172

power_cycles                        : 494

power_on_hours                      : 15,780

unsafe_shutdowns                    : 300

media_errors                        : 0

num_err_log_entries                 : 5

Warning Temperature Time            : 0

Critical Composite Temperature Time : 0

Thermal Management T1 Trans Count   : 0

Thermal Management T2 Trans Count   : 0

Thermal Management T1 Total Time    : 0

Thermal Management T2 Total Time    : 0

```

----------

## Gh0str1d3r

The SystemRescueCd live USB gives the same slow speed of the SSD:

```
/dev/nvme0n1:

 Timing O_DIRECT cached reads:   428 MB in  2.00 seconds = 213.52 MB/sec

 Timing O_DIRECT disk reads: 516 MB in  3.00 seconds = 171.85 MB/sec

```

If Windows wouldn't be faster I'd say the device is broken. But like this is seems to be a Linux issue.

For comparison, the result of lspci -nkk in the live USB environment:

```
00:00.0 0600: 8086:1904 (rev 08)

   Subsystem: 1028:0704

   Kernel driver in use: skl_uncore

00:02.0 0300: 8086:1916 (rev 07)

   Subsystem: 1028:0704

   Kernel driver in use: i915

   Kernel modules: i915

00:04.0 1180: 8086:1903 (rev 08)

   Subsystem: 1028:0704

   Kernel driver in use: proc_thermal

   Kernel modules: processor_thermal_device

00:14.0 0c03: 8086:9d2f (rev 21)

   Subsystem: 1028:0704

   Kernel driver in use: xhci_hcd

00:14.2 1180: 8086:9d31 (rev 21)

   Subsystem: 1028:0704

   Kernel driver in use: intel_pch_thermal

   Kernel modules: intel_pch_thermal

00:15.0 1180: 8086:9d60 (rev 21)

   Subsystem: 1028:0704

   Kernel driver in use: intel-lpss

   Kernel modules: intel_lpss_pci

00:15.1 1180: 8086:9d61 (rev 21)

   Subsystem: 1028:0704

   Kernel driver in use: intel-lpss

   Kernel modules: intel_lpss_pci

00:16.0 0780: 8086:9d3a (rev 21)

   Subsystem: 1028:0704

   Kernel driver in use: mei_me

   Kernel modules: mei_me

00:17.0 0106: 8086:9d03 (rev 21)

   Subsystem: 1028:0704

   Kernel driver in use: ahci

00:1c.0 0604: 8086:9d10 (rev f1)

   Kernel driver in use: pcieport

   Kernel modules: shpchp

00:1c.4 0604: 8086:9d14 (rev f1)

   Kernel driver in use: pcieport

   Kernel modules: shpchp

00:1c.5 0604: 8086:9d15 (rev f1)

   Kernel driver in use: pcieport

   Kernel modules: shpchp

00:1d.0 0604: 8086:9d18 (rev f1)

   Kernel driver in use: pcieport

   Kernel modules: shpchp

00:1f.0 0601: 8086:9d48 (rev 21)

   Subsystem: 1028:0704

00:1f.2 0580: 8086:9d21 (rev 21)

   Subsystem: 1028:0704

   Kernel driver in use: intel_pmc_core

00:1f.3 0403: 8086:9d70 (rev 21)

   Subsystem: 1028:0704

00:1f.4 0c05: 8086:9d23 (rev 21)

   Subsystem: 1028:0704

   Kernel driver in use: i801_smbus

   Kernel modules: i2c_i801

3a:00.0 0280: 8086:095a (rev 59)

   Subsystem: 8086:5010

   Kernel driver in use: iwlwifi

   Kernel modules: iwlwifi

3b:00.0 ff00: 10ec:525a (rev 01)

   Subsystem: 1028:0704

   Kernel driver in use: rtsx_pci

   Kernel modules: rtsx_pci

3c:00.0 0108: 144d:a802 (rev 01)

   Subsystem: 144d:a801

   Kernel driver in use: nvme

   Kernel modules: nvme

```

The only issue I could find is an extremely high number of Error Log Entries:

```
# smartctl -a /dev/nvme0     

smartctl 6.6 2017-11-05 r4594 [x86_64-linux-4.18.3-gentoo] (local build)

Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===

Model Number:                       PM951 NVMe SAMSUNG 1024GB

Serial Number:                      S2FZNXAG900687

Firmware Version:                   BXV76D0Q

PCI Vendor/Subsystem ID:            0x144d

IEEE OUI Identifier:                0x002538

Controller ID:                      1

Number of Namespaces:               1

Namespace 1 Size/Capacity:          1,024,209,543,168 [1.02 TB]

Namespace 1 Utilization:            935,313,330,176 [935 GB]

Namespace 1 Formatted LBA Size:     512

Namespace 1 IEEE EUI-64:            002538 45591b02af

Local Time is:                      Fri Aug 31 16:18:29 2018 EDT

Firmware Updates (0x06):            3 Slots

Optional Admin Commands (0x0017):   Security Format Frmw_DL Self_Test

Optional NVM Commands (0x001f):     Comp Wr_Unc DS_Mngmt Wr_Zero Sav/Sel_Feat

Maximum Data Transfer Size:         32 Pages

Supported Power States

St Op     Max   Active     Idle   RL RT WL WT  Ent_Lat  Ex_Lat

 0 +     6.00W       -        -    0  0  0  0        5       5

 1 +     4.20W       -        -    1  1  1  1       30      30

 2 +     3.10W       -        -    2  2  2  2      100     100

 3 -   0.0700W       -        -    3  3  3  3      500    5000

 4 -   0.0050W       -        -    4  4  4  4     2000   22000

Supported LBA Sizes (NSID 0x1)

Id Fmt  Data  Metadt  Rel_Perf

 0 +     512       0         0

=== START OF SMART DATA SECTION ===

SMART overall-health self-assessment test result: PASSED

SMART/Health Information (NVMe Log 0x02, NSID 0xffffffff)

Critical Warning:                   0x00

Temperature:                        42 Celsius

Available Spare:                    100%

Available Spare Threshold:          50%

Percentage Used:                    1%

Data Units Read:                    48,210,029 [24.6 TB]

Data Units Written:                 21,591,699 [11.0 TB]

Host Read Commands:                 669,617,398

Host Write Commands:                534,740,380

Controller Busy Time:               3,647

Power Cycles:                       2,969

Power On Hours:                     7,495

Unsafe Shutdowns:                   162

Media and Data Integrity Errors:    0

Error Information Log Entries:      10,090

Error Information (NVMe Log 0x01, max 64 entries)

Num   ErrCount  SQId   CmdId  Status  PELoc          LBA  NSID    VS

  0      10090     0  0x001b  0x4004  0x000            0     0     -

  1      10089     0  0x0013  0x4212  0x000            0   255     -

  2      10088     0  0x0051  0x4004  0x000            0     0     -

  3      10087     0  0x0050  0x4004  0x000            0     0     -

  4      10086     0  0x004f  0x4004  0x000            0     0     -

  5      10085     0  0x004e  0x4004  0x000            0     0     -

  6      10084     0  0x0015  0x4004  0x000            0     0     -

  7      10083     0  0x0014  0x4004  0x000            0     0     -

  8      10082     0  0x006a  0x4004  0x000            0     0     -

  9      10081     0  0x00e4  0x4004  0x000            0     0     -

 10      10080     0  0x0060  0x4004  0x000            0     0     -

 11      10079     0  0x00a6  0x4004  0x000            0     0     -

 12      10078     0  0x00d6  0x4004  0x000            0     0     -

 13      10077     0  0x00cd  0x4004  0x000            0     0     -

 14      10076     0  0x00f3  0x4004  0x000            0     0     -

 15      10075     0  0x0017  0x4004  0x000            0     0     -

... (48 entries not shown)

```

```
# nvme smart-log /dev/nvme0n1

Smart Log for NVME device:nvme0n1 namespace-id:ffffffff

critical_warning                    : 0

temperature                         : 41 C

available_spare                     : 100%

available_spare_threshold           : 50%

percentage_used                     : 1%

data_units_read                     : 48,210,030

data_units_written                  : 21,591,751

host_read_commands                  : 669,617,435

host_write_commands                 : 534,740,950

controller_busy_time                : 3,647

power_cycles                        : 2,969

power_on_hours                      : 7,495

unsafe_shutdowns                    : 162

media_errors                        : 0

num_err_log_entries                 : 10,090

Warning Temperature Time            : 0

Critical Composite Temperature Time : 0

Thermal Management T1 Trans Count   : 0

Thermal Management T2 Trans Count   : 0

Thermal Management T1 Total Time    : 0

Thermal Management T2 Total Time    : 0

```

Does anyone know me what this means?

----------

## russK

Gh0str1d3r,

It looks like the device believes it is healthy and has had no errors, which is good to know.

sysrescue does not have some drivers, like Anon-E-moose and NeddySeagoon were helping you solve for your gentoo kernel.  If that's still also the case in your gentoo boot, there is still more to solve here, since the device is fast as expected in Windows.   Unfortunately sysrescue did not load them by default, maybe you could modprobe them and see if the speed changes.

Have you noticed this wiki page:   https://wiki.gentoo.org/wiki/Dell_XPS_13_9350

It does not talk about nvme specifically but it may show the special sauce you need.

Also Arch wiki has a similar page for that laptop, although there may be many variants.

HTH

----------

## Blind_Sniper

I would try to use other utility, just to make sure that hdparm is correct, e.g. dd command:

write speed:

```
dd if=/dev/zero of=/device/mount/point/output.img bs=8k count=256k
```

Then clean cache:

```
sync; echo 1 > /proc/sys/vm/drop_caches

sync; echo 2 > /proc/sys/vm/drop_caches

sync; echo 3 > /proc/sys/vm/drop_caches
```

and finally read speed:

```
dd if=/device/mount/point/output.img of=/dev/null bs=8k count=256k
```

will it be the same values like you got from hdparm?

As for hdd, it gives comparable results (dd vs hdparm)

added: make sure you have enough free space at the drive ( 2Gb )

----------

## Gh0str1d3r

I now have all drivers, thanks for the tip with the live USB! But the ssd is still as slow as it was before. The dd command runs a little faster, thanks for the suggestion!

```
root@dell-laptop # hdparm -Tt --direct /dev/nvme0n1

/dev/nvme0n1:

 Timing O_DIRECT cached reads:   544 MB in  2.01 seconds = 271.23 MB/sec

 Timing O_DIRECT disk reads: 662 MB in  3.00 seconds = 220.49 MB/sec

```

```
root@dell-laptop # dd if=/dev/zero of=/root/aa.img bs=8k count=256k

262144+0 records in

262144+0 records out

2147483648 bytes (2.1 GB, 2.0 GiB) copied, 17.8105 s, 121 MB/s

```

```
root@dell-laptop # sync; echo 1 > /proc/sys/vm/drop_caches; sync; echo 2 > /proc/sys/vm/drop_caches ;sync; echo 3 > /proc/sys/vm/drop_caches 

```

```
root@dell-laptop # dd if=/root/aa.img of=/dev/null bs=8k count=256k

262144+0 records in

262144+0 records out

2147483648 bytes (2.1 GB, 2.0 GiB) copied, 2.6398 s, 814 MB/s

```

But first this is still not the ~2.5-3.5 GB/s that is specified and second everyone is using 'hdparm -tT --direct' to test the speed of this drive. Why would mine not work?

----------

## P.Kosunen

```
nvme error-log /dev/nvme0n1
```

What kind of errors are there?

----------

## Gh0str1d3r

 *P.Kosunen wrote:*   

> 
> 
> ```
> nvme error-log /dev/nvme0n1
> ```
> ...

 

https://pastebin.com/0KAXPM5v

I don't know how to interpret this.

----------

## P.Kosunen

Can you test if these errors are coming on Windows, Gentoo or both sides?

----------

## russK

Sorry I did not notice the number of error log entries a 4 or 5 days ago.

I don't know what it means, but my device only has an error count of 5.  I will try to keep watching this thread.

Regards

----------

