📅 June 8, 2017
What? Your M.2 NVMe SSD is not fast enough and you want faster speeds?
I have had superb, speedy success using the Samsung 950 Pro NVMe SSD in Linux. Everything from system installation, booting, and everyday usage is a resounding success — even on a Z87-based motherboard.
With the release of the newer Samsung 960 EVO, would Linux performance be as good as or better than the 950 Pro?
Having finally acquired a Samsung 960 EVO 250G SSD for myself, it was time to find out.
The Short Answer
“Does it work with Linux?”
Yes, the Samsung 960 EVO 250G SSD is 100% compatible with Linux, so you can purchase with confidence. I have used it with older Z87 and A88X motherboards via a PCIe-to-NVMe adapter, and Linux installs and runs perfectly.
Unlike the 950 Pro, the 960 EVO is NOT recognized on these older motherboards. This means that you cannot boot Linux straight from the 960 EVO like you can with the 950 Pro. I used the latest BIOS for both motherboards, but neither would detect the 960 EVO as a boot device.
Linux itself recognizes the 960 EVO just fine. No problems at all…once Linux is loaded. Booting from the 960 EVO is another matter, but there is a workaround that does not involve reflashing the motherboard’s BIOS.
More on that later. For now, let’s have a look at the 960 EVO itself.
Two different motherboards were screaming for some M.2 love from the Samsung 960 EVO, but neither board had an M.2 slot. No problem! I used an M.2 to PCIe adapter.
I used a Lycom DT-120 adapter with the Samsung 950 Pro, and it worked beautifully. To try something new, I used the IO Crest M.2 Adapter Card. Installation is easy. Simply screw the 960 EVO in place, and it is ready to be plugged into a free PCIe slot (x4 or larger).
Note that both adapters require x4 PCIe slots. If a PCIe x4 slot is nonexistent, then you will need to plug it into a PCIe x16 slot, which works fine.
“Do I need PCIe 2.0 or PCIe 3.0?”
Both work. Only the speed will differ. The 960 EVO is very fast, so it requires a PCIe 3.0 slot for best results. It will still operate in a PCIe 2.0 slot, but at only about half of its potential. That would be a waste.
“Should I use the shorter Lycom or the longer IO Crest?”
For myself, I would use another Lycom DT-120 because the build quality feels more solid, and the card is shorter. The IO Crest was cheaper, but it felt to be constructed of cheaper quality too. The main issue I had was the slot on the IO Crest – it required more force than was comfortable to insert the NVMe SSD. Also, the mounting screw was loose.
Both adapter cards work with both NVMe SSDs. I swapped them around, and Linux showed both operating properly.
How Fast Is It?
I tested the 960 EVO in Windows 7 first to see if my benchmarks would match online reviews…just in case the 960 EVO had other ideas. Windows 7 compatibility with the 960 EVO was similar to the 950 Pro: Non-existent. Windows 7 requires that the 960 EVO driver first be downloaded and installed.
Given that the 960 EVO should have reads in the 2.1GB/s range and writes near the 1.2GB/s range, I tried adjusting BIOS and other settings, but to no avail. Yes, the adapter was plugged into a PCIe 3.0 x16 slot. Was the SSD faulty? Let’s look at Linux to find out.
Linux Mint installs gnome-disk-utility (Disks) by default. This handy program configures and benchmarks hard drives. We will use this to see how the 960 EVO performs.
Apparently, it was a Windows issue or an issue involving my hardware. Windows 7 refused to reach these numbers using CrystalDiskMark. Not sure why, but I do not really care since I want to use the 960 EVO with Linux.
PCIe 3.0 vs. PCIe 2.0
I tried the 960 EVO 250G in two different slots (PCIe 3.0 and PCIe 2.0) within the same system running Linux Mint 18.1 and kernel 4.4.0. PCIe 3.0 yielded the highest results: 2.1/1.2 GB/s (R/W). PCIe 2.0 produced lower results because PCIe 2.0 is slower. The 960 EVO still worked flawlessly, but reads were ~764 MB/s and writes were ~709 MB/s. Yes, the PCIe version of the slot you pick does make a difference.
What is nvme0n1p1?
Linux identifies an NVMe SSD with a device name such as nvme0n1, not /dev/sda1 or /dev/hdd2. In my case, the system recognized the 960 EVO as /dev/nvme0n1. The “p1” refers to the partition. For example, /dev/nvme0n1p1 is the first partition, and /dev/nvme0n1p2 is the second partition.
You can partition, format, and use the /dev/nvme0n1 device the same way as any other /dev/sda,b,c,d,e,f…
NVMe Boot Solution
Get ready for an undisclosed truth: Older motherboards will not recognize or boot from the 960 EVO.
I discovered this after I purchased my 960 EVO and tried to boot Linux from it. Sure, the Linux installation, whether it be Xubuntu 17.04 or Linux Mint 18.1, would detect and use the 960 EVO immediately. Even LiveCD/USB versions of Linux utilize the 960 EVO. The Linux installation completes fine. However, the system will not boot from the 960 EVO if the motherboard’s BIOS does not see the 960 EVO.
This is strange because the 950 Pro had no such issues. I tried two different motherboards: a Z87 and an A88X. Both boards see the Samsung 950 Pro.
After some research, it seems others experience this issue too, and this is due to differences between the 950 and the 960. Despite the 950 Pro being older, is has better built-in compatibility with BIOSes that do not recognize NVMe.
“How can I boot Linux from the Samsung 960 EVO?”
All is not lost!
Yes, you can boot Linux and use the 960 EVO as the system drive, but it requires a workaround. No, there is no need to reflash the motherboard with a modified BIOS.
The solution is to install /boot and the bootloader onto a bootable device, such as another SSD or a USB. Root (/) and the swap space are placed on partitions on the 960 EVO.
- Boot using a LiveCD/USB or however you like to load Linux for installation.
- Insert an unused USB or, if a secondary SSD is present on the system, partition some extra space on it. 4GB of free space is more than plenty. This USB/partition is used solely for booting Linux. Nothing else. /boot will consume about 53MB of space after installation, but 4G will allow room for growth — just in case.
- Run the Linux installer and choose to manually configure the partitions. Pick “Something else” when asked.
- All devices will appear, including the USB we will use for booting. The USB/partition should read something like /dev/sda or /dev/sdd depending upon what other devices are present. Format the USB/partition as ext4 (or whatever works for you) and specify the /boot directory for it.
- For the 960 EVO, the installer will list it as /dev/nvme0n1. Create two partitions on it: The bulk of the space is for the root directory (/) and the smaller partition is for the swap space.
- Set the bootloader to the USB/partition.
- Confirm and complete the installation as normal.
- Upon system restart, enter the motherboard BIOS and set the boot priority to the USB/partition containing the bootloader and /boot.
The trick is to perform the bootstrap from a device that the motherboard BIOS sees. Linux has no trouble with the 960 EVO. We just need to load Linux. After that, the Linux system will run fine from the 960 EVO.
Once you become familiar with the ways in which a Linux system can be configured across multiple partitions and devices, then you can modify this to suit your special needs in order to take advantage of various storage hardware.
Of course, you can probably see a weakness in this technique. If the boot USB/partition is missing, then you cannot boot your Linux system until it is fixed.
Another weakness is the speed of the boot USB. A USB 2 boot device increases the system boot time by 5-8 seconds. USB 3 is faster, and a dedicated partition on an internal SSD adds almost nothing to the boot time.
Despite the weaknesses, both are better than no Linux running from the 960 EVO. If you have a motherboard that supports NVMe, then this workaround is unnecessary.
If you choose to use a secondary SSD, use GParted to create a dedicated 4G partition. You might need to resize a partition in order to do this depending upon how much free space is available on the SSD.
This NVMe device works perfectly with Linux without the need to install any drivers or additional software. Just plug it in and go. Simple.
The LiveCD versions of Xubuntu 17.04 (64-bit) and Linux Mint 18.1 (64-bit) with kernels 4.4.0 recognize and use the 960 EVO fine. You can format the NVMe SSD to any filesystem you like. The Linux installer lets you install your entire Linux OS to the 960 EVO.
I have also used this SSD in both new and existing versions of Linux Mint 18.1 with kernel 4.10.17, and it works superb. Absolutely no issues were encountered.
“Will I See A Major Speed Boost?”
That depends upon what you are upgrading from. I have been using the 950 Pro for quite a while now, so I could not notice any real-world difference during everyday usage. The 950 Pro is already fast, and the 960 EVO exceeds it. The entire Linux system feels snappy and responsive.
If you are upgrading from a mechanical hard drive, then, yes, definitely. You will see a major improvement. If upgrading from an SSD, yes, there is a somewhat noticeable speed boost, but if upgrading from another speedy NVMe SSD, such as the 950 Pro, then the system will feel the same as before. The only real noticeable areas are file copies from one NVMe to another, but then you are limited to the slowest speeds in the copy chain.
Regardless of whether you see a speed boost or not, NVMe on Linux is worth the upgrade simply due to its small size.
I am spoiled!
The 950 Pro opened a new level of storage speed and system usage, and the 960 EVO improves upon it by offering much faster reads and writes. Yes, after experiencing the elite goodness of the 950 and 960, it is hard to return to a lowly SSD.
The only downside to the 960 EVO is that an older motherboard BIOS might not recognize it or boot from it. This is not a fault of Linux but with the BIOS itself. Most new motherboards should include an M.2 slot with NVMe boot abilities. In that case, the boot workaround and PCIe adapter card are not needed.
Upgrading or constructing a new system? NVMe opens a new realm of fun.
- The Samsung 950 Pro 256G and Linux. Does it Work?
- Linux Mint 18, Ubuntu 16.04, Xubuntu 16.04, and the Samsung 950 Pro 256G M.2