How to boost the AHCI/NVMe performance of Intel Chipset systems

About the secure erase… Can I use the tool within my motherboard (Asus Z270E) or it must be a specific ssd tool? I have a Samsung 850 EVO.

@guigo21 :
Usually a secure erasure of the data is only required, if TRIM is not able to make all unusable SSD cells fit again. When I am going to secure erase the data of an SSD, I always use the tool Parted Magic.

I’m sorry if this post isn’t in proper place.
@Fernando I’m a huge fan of your forum and always followed your guides. Last week, I was unhappy about the performance of my NVMe SSD PM951 because it lacked proper drivers from Samsung and MSFT default driver was giving too slow write speed and I decided to try newer Samsung driver v2.1 and was delighted to see the snappiness of the system, it was difference of night and day for me. That happiness was short lived, tuned out it had a bug wherein your becomes undetectable after a restart. Windows Boot mgr throws errors saying boot media inaccessible. So, I did a soft reset and viola! it worked. So I thought soft resetting every time is not a good idea and saw Side by side inf files stornvme and secnvme. Interestingly, in secnvme I noticed that most options including power savings and other things were similar to stornvme but with one difference the driver had Message Signal Queue or MSI-X queue set to 2048 instead of deafult value of stornvme driver set to 65.
I tried changing the value in inf and every time it threw a error saying file not found. So, I started digging registry editor using Dev id in device manager of Microsoft NVMe controller on PM951 and then I came to a conclusion to change MSI-X queue limit on default storage driver of nvme to that of Samsung’s value.
After that tweak everything was super snappy like Samsung nvme driver but this is the full potential of Microsoft nvme driver when tweaked correctly. Hopefully, I can say the tweak is applicable to Samsung PM/SM/Consumer ones(950,960 and above), Toshiba branded SSDs, Hynix, Lite-On etc. Give this tweak a try. But to be on safe side make a restore point.

You can use this image to understand everything:

Pic7.jpg



Initially I used the above trick for this tweak then after a lot googling, I found a utility created just for this process by mbk1969 at git https://github.com/CHEF-KOCH/MSI-utility
So if you use that utility, just change the Message Number limit to 2048 from 65. This limit is the max value PCIe 3.0 can handle, so NVMe drives will benefit from that.
See this picture:

Pic1.png



Benchmarks to prove the tweak works:

1. Samsung NVMe driver on PM951:

Pic2.png



2. MSFT Stock NVMe driver (No tweak):

Pic4.png

Pic3.png

Pic5.png



3. MSFT Stock Nvme driver (with tweak):

Pic6.png




I hope everybody can find this tweak helpful especially for those people who have issues with Samsung drivers like High Number of Unsafe shutddown counts in HWINFO, Boot media inaccessible after a reboot, BSOD/GSOD etc…
If you are on laptop with NVMe and after using this tweak you can enable power savings for RST driver for SATA link for power savings and also run this bat file for better battery life and control over how windows can be further optimised for power savings. These tweaks add 10-30 mins of battery life. See this link https://gist.github.com/theultramage/cbd…2669a6255b4b94b
EDIT: Mods can edit the post if needed.
EDIT2: Posted the wrong picture in changing message limit using msiutil.

EDIT by Fernando: Inserted pictures resized and re-attached by using the Forum software (can be enlarged by clicking onto them)

@Vasudev :
Welcome to the Win-RAID Forum and thank you very much for your interesting report and your find how to boost the performance of the MS Win10 in-box NVMe driver.
Since all your WRITE scores (incl. those after having done the tweak) are much lower than they should be, I would like to know, whether you had followed point 8 of my advices given within the start post of this thread.

Although I haven’t yet tried your tweak, I want to show you the benchmark results I got with my untweaked new notebook Xiaomi Air 13,3 (with Kaby Lake CPU) running Win10 x64 v1709 with different NVMe drivers on a 250 GB Samsung PM961 NVMe SSD:

Left picture: Win10 in-box NVMe driver - Right picture: Samsung NVMe driver v2.3.0.1709 WHQL

Anvil-Xiaomi-PM961-inboxNVMe.png

Anvil-Xiaomi-PM961-Samsung-v2301709_Pic2.png



Regards
Dieter (alias Fernando)

@Fernando :
I tried those tweaks and reverted back to defaults because couple of weeks ago my battery died suddenly w/o any notice so I switched back.
With write cache off and cache flushing turned off on tweaked stornvme

nvme-wc_0ff.png



With write cache ON and unchecked Turn off cache flush

nvme_tweak_msft.png



Even with FUA the write speed are better. On your laptop you can enable IRST’s SATA power link management to reduce CPU idle wattage to 0.5-0.7W instead of 1.5W.
One more thing I found using Linux is that in Gnome Disk utility benching of 100 Samples of 100-500MB gave a read speeds of 2.1GB and writes of 174MB. Tried for a 1GB data for 100 samples too, the performance readings was similar. So I came to a conclusion that Windows or its driver is holding back its full performance somehow.
You can test it yourself on SM951, PM961 or on 950 pro NVMe SSDs or even ask your friends to try this tweak. I can’t say about desktop because I have only a laptop with me, so battery life is most important to me when I’m unplugged.
Thank you @Fernando

EDIT by Fernando: Unneeded fully quoted post replaced by a directly addressing to the author (to save space)

@Vasudev :
It is hard to believe, that your notebook’s battery died because you had followed by advices given within the start post of this thread.
Note: If you want to compare the performance of dfferent storage drivers (here: NVMe) on a mobile system, you should plug in your power connector from the beginning to the end of your tests.

Can you please repeat your benchmark comparison tests without any registry tweaks by using Anvil’s Storage Utilities (gives more realistic and meaningful results)?

@Fernando :
I never said that the battery died because of your guide. Not your fault at all. You can check alienware battery related issue where your battery dies within a year suddenly. So that’s the reason I reverted to Windows default. I never said I run any benchmark on battery. The battery simply gets very hot, I mean very hot when you bench or game, so I refrained from doing it.

Okay I’ll try it out.

EDIT by Fernando: Unneeded part of the fully quoted post removed and replaced by directly addressing (to save space)

Guys i have mp500 my standard NVM express controller is a 65 Limit is ok?

If your PC is post-Haswell you can increase it to 2048.
Fernando needs to test it and approve so for now don’t change it.

i have broadwell-e 6950X on asus rampage V x99

1. Anvil using NVMe Tweaked:

Pic1.png



2. Anvil NVMe Stock MSFT:

Pic2.png



3. CDM on STOCK NVMe:

Pic3.jpg



4. CDM on NVMe Tweaked:

Pic4.jpg



5. Anvil Write Through Cache on Stock NVMe:

Pic5.png



6. Anvil Write through cache enabled on NVME tweaked:

Pic6.png



Note: Stock NVMe means default MSFT NVME driver with Message limit 65 {MSI-X enabled}
Tweaked NVME means default MSFT driver with Message limit increased to 2048.{MSI-X enabled}
Anvil Storage app. settings was changed to enable Write Through to speed up writing.
Write cache was enabled and disk flushing was unchecked.

What means “tweaked”? Did you execute just your registry tweak, the “Write Caching” tweak I propose or did you tweak everything?
All I can say is: You will never get that bad WRITE scores, if you had checked both “Write Caching options” of the related Disk Drive from within the Device Manager.

By the way:
1. The inserted 2 last pictures (“Stock NVme” and “Tweaked NVMe”) are obviously identical.
2. Screenshot images look much better, if you hit Alt+Print, open the MS tool named “Paint”, paste and crop the screenshot, save it as *.png or *.jpg picture and insert it by using the Forum Software. For details please (look >here< and >here<.

What means "tweaked"? Did you execute just your registry tweak, the "Write Caching" tweak I propose or did you tweak everything?
All I can say is: You will never get that bad WRITE scores, if you had checked both "Write Caching options" of the related Disk Drive from within the Device Manager.

By the way:
1. The inserted 2 last pictures ("Stock NVme" and "Tweaked NVMe") are obviously identical.
2. Screenshot images look much better, if you hit Alt+Print, open the MS tool named "Paint", paste and crop the screenshot, save it as *.png or *.jpg picture and insert it by using the Forum Software. For details please (look >here< and >here<.



I’ll re-upload it. It seems some portion is cut-off. I’ll take a look.
Okay fixed it.
Write caching was enabled and Disk buffer flushing is unchecked.
Stock NVMe means MSFT default NVMe driver while Tweaked NVMe means MSFT default NVMe driver which has Message Limit increased from 65 to 2048.

To prevent this, I recommend to hit Alt+Print simultaneously (the keys may be different for your mobile system). This will take just the screenshot of the currently open window (here: GUI of the benchmark tool).

To prevent this, I recommend to hit Alt+Print simultaneously (the keys may be different for your mobile system). This will take just the screenshot of the currently open window (here: GUI of the benchmark tool).



I used in built screenshot of Anvil and snipping tool. maybe its resizing issue from my end when I select Auto sizing for images. Next time I’ll upload the full size. I got the option in forum software. It seems Anvil built in screenshot only selects the needed portions.

@Fernando I missed some text, don’t even remember what it was. Well, I added my test methodology and you can test it as well. Your drive will be 2X faster than mine.

Is there any name limit on images? Totally confused.

@Vasudev :
Thanks for having added the text. I think, that post #51 is now as it should be. Your first pictures were too big and used much more space than needed.

I will test it tomorrow, if I have the required time.

No, I have renamed your pictures to remember the exact order.

@Vasudev :
The more I compare your and my benchmark results, the more I doubt, that your proposed registry modification has any noticeable effect on the performance of your NVMe SSD. As I already have written, I suspect, that it were just the wrong resp. not optimized "Write-caching Policy"settings within the Device Manager, which may have caused the poor NVMe SSD performance while WRITING.
Before I do the related tests myself with my Xiaomi notebook, I would like to see just 2 additional Anvil benchmark results from your side:

  • a) running the Win10 in-box NVMe driver without your registry tweak and
  • b) running the Win10 in-box NVMe driver after having executed your proposed registry tweak.

Very important: Both tests should be done under the following conditions:
  1. Before you start with the tests, make sure, that both “Write-caching Policies” of your Samsung NVMe SSD are enabled. Here is the picture:

    Write-caching Policies NVMe SSD.png

  2. During the tests the power connector has to be plugged in and loading.

@Fernando Here are the results as per your requirement:

pic8.PNG



1. Storenvme Tweaked:

pic5.PNG




2. Stornvme Default Settings:

pic6.PNG




3. Stornvme tweaked version with Write through option enabled in anvil

pic7.PNG



EDIT by Fernando: Inserted pictures resized (they were too big), but can easily been enlarged by clicking onto them

@Vasudev :
Thanks for having done the tests I had asked for.
As you can see, all your previously measured very bad WRITE scores are blown away, but not by your registry tweak, but by the changed “Write-caching Policy” settings.
The differences between your 3 test results are minimal (probably within the fault tolerance) and definitely not noticeable by the user.
My conclusion: Your test results verify, that the registry tweak has no noticeable positive impact on the performance of the SSD.

Anyway it was a good idea to start this discussion and to do the related tests. Thanks again for your input!