NVMe – Linux Hint https://linuxhint.com Exploring and Master Linux Ecosystem Wed, 23 Dec 2020 15:25:28 +0000 en-US hourly 1 https://wordpress.org/?v=5.6.2 Does NVMe use PCIe? https://linuxhint.com/does_nvme_use_pcie/ Sat, 19 Dec 2020 16:10:19 +0000 https://linuxhint.com/?p=82236 Data processing is at the core of every business. A PC with mediocre specs is decent enough for simple data processing, but on a larger scale, it will not suffice. As data continues to grow, businesses are always searching for the latest technologies that can accelerate data processing. High-speed computer components are crucial in processing big chunks of data real-time. One of the key components that require upgrading is the internal secondary storage device. These devices play a vital role in capturing, accessing, processing and transforming data, and these have evolved significantly to meet business demands. NVMe (Non-Volatile Memory Express) drive is the latest and by far the fastest evolution of storage devices. Before we delve deeper into NVMe, let’s briefly look at the different internal secondary storage media utilized today.

Hard Disk Drive (HDD). The magnetic and mechanical spinning drive is considered a legacy storage device. It’s been around since the mid-20th century. HDDs are made of moving parts which more often cause the device to fail. Currently, the form factors available are the 3.5” and 2.5” HDDs. Today’s HDDs are using the SATA standard (Serial Advanced Technology Attachment) interface which replaced the already obsolete IDE (Integrated Drive Electronics) and PATA (Parallel Advanced Technology Attachment) standards.

Solid State Drive (SSD). SSD is the new generation storage device which stores the information in flash-based memories. It does the same functions of HDD, only faster. Unlike  HDD, it is unlikely to fail as there are no moving parts. SSDs use either the SATA or PCIe (Peripheral Component Interconnect Express) interface.

So where does NVMe fit in? To understand NVMe better, let us first know the differences between SATA and PCIe interface.

SATA vs PCIe

SATA and PCIe are the interface media for internal storage devices. SATA is used for both HDD and SSD while the more recent PCIe is used for SSDs.

The hard drive is the slowest among the hardware components of computers. To keep up with the speed of other components, it was an absolute necessity to replace IDE and PATA standards with the faster interface, SATA.

SATA is both a connector and a bus standard. The SATA connector connects HDDs and SSDs to the SATA bus of the computer’s motherboard. This simple connector had several developments and its latest iteration, SATA III is widely used in modern HDDs and SSDs. SATA III has a transfer rate of 600 MB/s and uses AHCI (Advanced Host Controller Interface) to communicate with SATA devices. AHCI was designed explicitly for the spinning HDDs, but because there was no standard for SATA drives upon its development, AHCI was endorsed to work with SATA. Although AHCI was compatible with SATA drives, it didn’t fully optimize the potential of the flash-based SSDs because of its slow transfer rate. Also, there is a need for a SATA controller for AHCI to communicate with the SATA drive further slowing down the data transfer. Manufacturers then explored other interfaces that could deliver faster transfer rates.

PCIe is a high-speed expansion bus standard that replaced the older and slower PCI, PCI-X, and AGP bus standards. It was used mainly for graphics, Wi-Fi and Ethernet cards. PCIe has a direct connection to the CPU, which significantly speeds-up the transfer rate. Unlike SATA, PCIe does not require a controller in between the drive and the CPU for data to be shuttled to and fro. PCIe also comes with other impressive advantages such as lower latency, scalable performance, increased I/O of up to 40 lanes per CPU socket, and low power.[1] PCIe 3.0 is the latest generation of PCIe and has a transfer rate of 985 MB/s per lane and can consist of up to 16 lanes. These superb attributes of PCIe make it an ideal slot for SSDs. But one thing’s still missing; the communication standard between SSDs and the PCIe interface. This is when NVMe gets into the picture.

Does NVMe use PCIe?

There’s a lot of confusion between NVMe and PCIe as these two words are often used interchangeably. In other cases, SSD and NVMe are considered as two different drives. But what exactly is NVMe?

NVMe is neither an interface nor a drive. It is currently the industrial communication standard for NVM storage devices such as SSDs. As a matter of fact, it is designed specifically for flash-based SSDs. While PCIe is the physical interface, NVMe is the protocol that manages the NVM devices that’s using the PCIe. It is, therefore, similar to AHCI, only much faster.

In comparison, AHCI has only one command queue and can send 32 commands per queue, NVMe, on the other hand, has a mind-blowing 64K queues and can send 64K commands per queue. That’s an overwhelming 4M commands in total! Unlike AHCI which goes through the SATA controller before data is sent to the CPU, NVMe communicates directly to the CPU without the need for any controller. Moreover, it has over a million IOPs (Input/Output Operations per second) as opposed to 100K of AHCI. Additionally, it has a lower latency of just a few microseconds as compared to AHCI’s 30-100 microseconds. Let’s talk about the transfer rate. As previously mentioned, PCIe has a transfer rate of 1GB/s per lane. NVMe is using four lanes of PCIe, which means, theoretically, NVMe SSDs have a transfer rate of 3.9 GB/s.[2] More than 6x faster compared to the 600MB/s transfer rate of SATA drives.

It’s a done deal, NVMe is the sure winner in all aspects, but there’s one drawback – the price. NVMe carries a higher price tag, and for some, it is an impractical choice. SATA SSDs can run programs, transfer files and start-up a computer relatively quickly but for processing large video files for example, or in industries that require running multiple applications simultaneously and real-time processing of huge files, the extra bucks spent on NVMe drives is a worthy pay off.

Does NVMe use PCIe? It’s a definite Yes! NVMe works hand in hand with PCIe for an exceptionally high-speed data transfer and is a significant improvement over the older AHCI standard.

Sources:

[1] J. Metz, “NVMe for Absolute Beginners”, November 11, 2014, https://blogs.cisco.com/datacenter/nvme-for-absolute-beginners, Accessed December 16, 2020

[2] Westrick, Tom, “What Are NVMe Drives, and Should You Buy One?”, September 16, 2020, https://www.howtogeek.com/404627/what-are-nvme-drives-and-should-you-buy-one/, Accessed December 16, 2020 ]]> Best Internal NVME Drives https://linuxhint.com/best_linux_nvme_drives/ Tue, 14 Jul 2020 16:54:56 +0000 https://linuxhint.com/?p=63093 The internal NVMe drives are considered the fastest internal storage drives you can purchase today to upgrade or build a new computer. They are also smaller than any other SSD or HDD, making them ideal for that monstrous high-end computing machine in a compact farm factor build you always wanted. What’s more, the prices have also fallen considerably in recent years, making internal NVMe drives all the more affordable.

That said, the Linux Kernel 3.3 and higher natively include the Linux NVMe driver. This means you just need a motherboard with an NVMe support to start working with NVMe drives for Linux. Unfortunately, older motherboards lack NVMe support. Therefore we advise investing in the latest motherboard instead.

For this article, we are reviewing the top five best internal NVMe drives for building a Linux desktop system. But first, let’s take a peek at different form factors and features to consider before making a purchase. Scroll on!

Understanding the major NVMe farm factors

The NVMe SSDs come in three major farm factors. These are:

U.2 – Mechanically similar to the SATA Express device plug, the U.2 offers 4 PCI express lanes offering a max theoretical throughput of 4GB per second on Gen3. It is the most compact and expensive of the three. It has a storage capacity of up to 4TB.

M.2 – The most popular, M.2 utilizes PCI Express Mini Card layout and connectors. It offers similar four-lane throughput but has a significantly greater footprint on the motherboard. The maximum storage capacity for M.2 is 2TB.

HHHL – The Half Height Half Length or the AIC takes advantage of the full-sized PCIe card slots. This makes it suitable for any legacy application. Because of the greater size, they are more suitable for servers.

So which one’s better? You may ask. The answer depends on the requirements. If you need 2TB or less storage, then the M.2 is ideal for fast performance. However, if you require higher storage in a RAID array or a single storage option, U.2 offers more scalability (assuming the motherboard is compatible). HHHL, on the other hand, are ideal for servers because they offer up to 30.72 TB storage capacity.

Factors to consider before purchasing the best internal NVME drives for building a Linux System

Before settling on a particular NVMe drive, it is important to take into account the following factors. This will ensure you purchase exactly what you need.

Size

Always make sure the size of the drive matches the available space on your computer’s motherboard. Size becomes all the more important when you are upgrading a laptop. Most drives come in 60mm and 80mm options. Also, ensure that the spreader on top of the drive and heat sink won’t interfere with the upgrade.

Bus Details

Bus details can sometimes be tricky. With laptops, for example, the choice is easy. Does it support PCI Express or SATA? Most slots don’t have spare NVMe slots, so you just have to swap one for a more capacious one. Some desktops, on the other hand, support both on a given slot. So know exactly what your motherboard is optimized for, before purchasing a drive.

Boot

Some older motherboards may require a BIOS upgrade to make the NVMe bootable. This happens when your desktop is getting the upgrade for the very first time. Therefore always verify with the manufacturer that it is bootable.

Price

Good NVMe drives are not economical.  That is why we recommend calculating the cost per GBs. For instance, a 500GB drive that costs $100 turns out to be approximately 20 cents per GB. This way, you can compare different capacities.

Reviews of the best Internal NVMe Drives For Building A Linux Desktop

If you are on the lookout to boost your system’s performance, below are the five internal NVMe’s that will never disappoint.

1. Sabrent 1TB Rocket NVMe 4.0 Gen4 PCIe M.2 Internal SSD

The first product on our list of the best internal NVMe drives for Linux is Sabrent’s Rocket NVMe 4.5. Offering exceptional endurance and speed for the money, it is a high-performance fourth-gen internal NVMe drive.

It is available in an M.2 2280 farm factor and comes in three different capacities to cater to a wide audience. The 1TB and 2TB capacity drives can hit sequential write speeds of up to 4.4/5 Gbps, along with 750,000 IOPS, while the smaller 500 GB model comes at 2.5 Gbps max and lower peak performance.

With world-leading endurance ratings, Sabrent’s NVMe drive will never disappoint as you constantly move large video files, toggle between multiple virtual machines, or even benchmarking your system to the death.

Our only complaint is that you have to manually register your hardware to access the 5 years warranty. If that’s not much of a hassle or you are content with an otherwise 1-year warranty, Sabrent’s Rocket NVMe 4.0 is a top of the line internal SSD drive ideal for a new build.

Buy Here: Amazon

2. Samsung 970 Evo Plus

The 970 Evo Plus is an upgrade on the popular Samsung’s 970 EVO as its premier NVMe for professionals. The V5 flash upgrade provides a nice bump in terms of performance, taking sequential read throughput up to 3.5Gbps with up to 620,000/560,000 random IOPS.

This throughput rivals Samsung’s wildly acclaimed workhorse 970 pro SSD. What’s more, it comes at a much lower price than Samsun 970 pro.

For this model, Samsung has coupled the latest 9x layer VNAND Flash with multiple firmware optimizations instead of going with the same controller as its predecessors. Hence further improving the overall random read performance. It also increases the sequential write speeds of the drive up 800Mbps to a staggering 3.3Gbps value. Therefore it can handle any tough workload easily.

To ensure you get the best out of the purchase, Samsung’s 970 EVO Plus comes with a 5 years warranty. That said, with better performance, lower MSRPs, excellent software suite, endurance, and efficiency, the Evo plus is a big plus in every way.

Buy Here: Amazon

3. Adata XPG SX8200 Pro

If there’s one model that can rival Samsung’s Evo Plus, it is Adata XPG SX8200 Pro. That is why it is number three on our list of the best internal NVME drives for building a Linux system. Boasting best-in-class power and efficiency with respectable endurance and a price that won’t empty your wallets.

The model comes in four different capacities: 256GB, 512GB, 1Tb, and 2Tb. Armed with an upgraded SMI SM2262EN controller, it improves efficiency and performance over the previous SM2262 incarnation. It boosts the performance up to 3.5/3 Gbps in sequential read/write load and up to 390K-380K in random read/write IOPS. However, the throughput varies on smaller models. For cooling, the drive comes armed with a DIY metal black heat spreader.

Additionally, it supports the NVMe 1.3 specs, has a RAID engine, LDPC ECC to preserve data integrity and comes with end to end data protection. Last but not least, the drive leverages SLC caching to improve further the native TLC write performance.

All in all, if you are searching for the latest high-performance Nvme on a modest budget, Adata XPG SX8200 Pro is an absolute steal.

Buy Here: Amazon

4. Silicon Power P34A80

NVMe drives can be quite expensive. Not everybody can afford to spend upwards of 200 bucks on storage capacity alone. And let’s get real. Not everyone needs it either. For such people, Corsair’s Force Series MP300 is a good option.

This model comes with reading speeds extending up to 1.58 Gbps, and a maximum writes speed of 920Mbps. It provides not the best but decent performance when it comes to running memory-intensive software, copying files, and installing programs.

Because of its standard M.2 2280 farm factor, mounting it on a new system is fairly straightforward. Moreover, the high-density 3D TLC NAND offers the right mix of endurance, efficiency, and value. And like other products on the list, it comes with a 5-year manufacturer warranty.

That said, Silicon Power P34A80 is cheap but good. Therefore, if your budget is under $70, we suggest you consider this little powerhouse.

Buy Here: Amazon

5. WD Blue SN550

Whether you are updating your over cramped SSD or just want a reliable NVMe for the latest gaming rig, WD’s Blue SN550 fits the bill. An up to 2.4 Gbps throughput performance and fairly low MSRPs are two main advantages this model has over the cost of the comparative competition.

The drive comes in three capacities: 250Gb, 500Gb, and 1Tb. Unfortunately, there’s no 2Tb model that may disappoint some high-performance users looking for maximum storage.

Fitted with a 96 layer Sandisk NAND and a SanDisk NVMe controller, it has 600 TBW endurance and IOPS numbers up to 400K for the 1 Tb model, which is quite a feat. Furthermore, a smaller 2280 farm factor means it is compatible with most ATX motherboards capable of M.2.

Lastly, the 5 years warranty is in line with what other top brands are offering. Therefore, WD Blue SN550 is an excellent purchase to upgrade your system.

Buy Here: Amazon

Final Words

NVMe SSDs are becoming increasingly popular because of falling prices. Many budget NVMe drives even match SATA, as you must have noticed with some of the products reviewed above. So these are the best NVMe drives for building a Linux desktop system to consider for a nice performance boost. We hope you learned a thing or two from this article. Let us know your thoughts in the comments below. Till next time!

]]>
NVMe SSD for Linux: Guide and Questions Answered https://linuxhint.com/nvme_ssd_linux_guide/ Sun, 29 Dec 2019 05:48:39 +0000 https://linuxhint.com/?p=52512 There’s a huge difference between booting up laptops from around 2010 and laptops from 2020. While older laptops can take over a minute to finish booting up, new laptops tend to be ready to go in a little over 10 seconds.

Yes, CPUs now have far more cores and threads than they used to, and the bandwidth of modern RAM has increased considerably as well, but the real reason why modern laptops boot up so much faster and feel considerably more responsive is that storage technology has advanced by leaps and bounds.

Regardless of whether you’re selecting a new PC or just want to upgrade your current one, you can’t afford to ignore the performance benefits of NVMe technology, which unleashes the full potential of solid-state drives (SSDs).

What Is NVMe?

NVMe stands for Non-Volatile Memory Express, and it’s an interface protocol created specifically for SSDs. Prior to the release of NVMe, SSDs communicated with operating systems using the AHCI protocol, whose specification was finalized and released by Intel in 2004.

Because Intel designed the AHCI protocol for spinning hard drives, it comes with serious limitations that make it less than suitable for modern NAND-based SSDs. For example, AHCI must communicate with the SATA controller (whose performance is limited to 600 MB/s per line), has only 1 command queue, and can send only 32 commands per queue.

NVMe, on the other hand, communicates directly with the system CPU over PCI Express, or just PCIe for short (which can achieve up to 2,000 MB/s per line), has 64,000 command queues, and can send up to 64,000 commands per queue. As such, NVMe SSDs can execute input/output operations up to 900% faster than their AHCI equivalents.

NVMe SSDs come in three major form factors:

  • M.2: Formerly known as the Next Generation Form Factor (NGFF), is by far the most popular form factor of NVMe SSDs, using the PCI Express Mini Card physical card layout and connectors.
  • U.2: Formerly known as SFF-8639, U.2 is mechanically identical to the SATA Express device plug, providing four PCI Express lanes through a different usage of available pins.
  • HHHL: Also known as Half Height, Half Length or Add-In Card (AIC), this NVMe SSD form factor takes advantage of full-sized PCIe slots, making it suitable for legacy applications.

NVMe SSD Linux Compatibility

The good news is that the Linux NVMe driver is present in the Linux kernel 3.3 and higher, so you should be good to go in this regard. You can see which version of the Linux kernel you’re using with the following command:

$ uname -r

In addition to the Linux kernel 3.3 or higher, you also need a motherboard with NVMe support. Sadly, most older motherboards don’t support booting from NVMe SSDs. Since the performance benefits of NVMe SSDs are most noticeable when used as system drives, it’s highly advisable to consider getting a newer motherboard instead of using an expensive NVMe SSD just for storing data.

On any Linux distribution, you can test the performance of your NVMe SSD with hdparm, a command-line utility used to set and view hardware parameters of hard disk drives:

# hdparm – tT --direct /dev/nvme0n1

If you have more than one NVMe SSD, you may need to replace “nvme0n1.” All NVMe SSDs should show up under /dev/nvme*.

The Best NVMe SSDs for Linux in 2020

NVMe SSDs are becoming more and more affordable each year, but it will still take some time before their prices match the prices of traditional SSDs. But if you’re willing to spend extra money to get a premium performance, the following five NVMe SSDs are guaranteed not to disappoint.

1. Samsung 970 EVO Plus

With sheer performance is what you’re after, the Samsung 970 EVO Plus is a fantastic choice, offering sequential read and write performance levels of up to 3,500 MB/s and 2,500 MB/s, respectively. Thanks to the latest V-NAND technology, Samsung has been able to achieve up to 1,200 TBW, which is why the company can afford to provide a 5-year limited warranty on this NVMe SSD. You can choose between four different storage capacities (250 GB, 500 GB, 1 TB, and 2 TB), with the 500 GB version offering the most value.

2. Crucial P1

The Crucial P1 may not look nearly as sleek as the Samsung 970 EVO Plus, but it’s considerably cheaper and performs similarly well in real-world applications. You can get it with a capacity of up to 1 TB, and all versions offer sequential read and write performance levels of up to 2,000 MB/s and 1,700 MB/s. Crucial designed the P1 to provide a balanced blend of performance, capacity, and reliability, making it a great choice for all Linux users who would like to reap the performance benefits of NVMe technology without breaking the bank.

3. WD Black SN750

The main objective of the Black line of storage devices from Western Digital has always been to offer exceptional performance to desktop PC users. The WD Black SN750 continues this tradition in the era of NVMe SSDs, promising read/writes up to 3400 MB/s sequentially thanks to its innovative 64-layer 3D NAND storage technology. You can get it in capacities ranging from 500 GB to 2 TB, all of which sport the same sleek and modern design.

4. CORSAIR FORCE Series MP510 

The CORSAIR FORCE Series MP510 is dominating the budget NVMe SSD market (if such a thing even exists) with its 3,480 MB/sec sequential read and up to 3,000 MB/sequential write provided by a brand-new controller. This NVMe SSD also carries a hefty 800 TBW endurance rating, which exceeds even the expensive Samsung 970 EVO Plus. Corsair clearly wants to establish itself as a dominant player on the NVMe SSD market, and the company is doing a great job so far.

5. Intel SSD 660P Series

The Intel SSD 660P Series is one of the most affordable NVMe SSDs on the market, but its low price comes with some limitations. For starters, its sequential read and write speeds are both limited to 1800 MB/s. What’s worse is that its endurance rating is only 100 TBW, so it’s not really suitable for many bandwidth-intensive applications, such as video editing, which would significantly reduce its lifespan. Last but not least, its design can seem a little bland and utilitarian. But if you can overlook these limitations and get the Intel SSD 660P Series when it’s on sale, you won’t regret your purchase.

]]>