M.2 is a standard for SSDs (Solid State Disks). As everyone knows, SSDs are starting to replace hard drives and have the advantage of much faster performance. They come in a number of different form factors and one of the first available was the same as the existing hard drives for laptops and using the same connectors. These devices, which are still widely available and will be for decades perhaps as long as normal hard drives continue to be produced, use the same connecting cables as a regular hard drive and so are a direct drop in replacement, but much faster, although more expensive as well. SSD lifetime is about the same as a regular hard drive as although they have no moving parts and are not susceptible to mechanical shock in the same way as a normal HDD, the storage cells inside can only handle a finite number of writing cycles.
The M.2 form factor works with a socket on a computer’s mainboard. A M.2 SSD looks like a bit like the old memory sticks that Sony cameras used to use, being a long rectangle, they are usually 22 mm wide and a variety of lengths – 80 mm is a common one. The socket is at right angles to the board itself so the SSD card sits parallel to the board and a little screw is provided to secure it in place. The interface with the computer can be the same as the SATA standard, or they can use something called NMVe which works with an interface to the computer’s existing PCI Express bus. Because PCIe can have multiple data lanes which add extra bandwidth (for example x4), it follows that the PCIe interface on a compatible M.2 SSD can be several times faster than the SATA interface on a regular SSD which only supports one data lane in effect. The only real limitation to date is that most earlier or cheaper boards will not have more than one M.2 slot in them, which is relevant to people who want to run a mirror disk or add more capacity than one SSD can provide.
In my case I have just added a M.2 SSD to a computer that I use to make webmaps, in order that these maps can be built a lot faster, as the tiles are very small files and there are millions of them. In fact all files relating to maps will be put on this SSD. Linux recognises the disk as a NVMe device and gives it a different name from /dev/sda or whatever, it is actually /dev/nvme0n1 and after I put a ext4 partition on it, this partition became /dev/nvme0n1p1. The partitioning was quite straightforward with GParted and I realised my questions were just that I don’t do new disk installations very often and not because Debian handles it any differently. There may be an issue if I tried to use it as the boot disk because there is going to be a question of how well the Debian installer would go with detecting it, especially as I typically use Bios rather than UEFI boot mode. The resulting 250 GB partition has been mounted to a specific path within /home/patrick and is looking really good.
So there is a lot of new learning with this M.2 thingy. It is definitely worth considering if your computer’s mainboard has M.2 support and it looks like anything from the last 7 years at least will support NVMe (I’m looking at specs for a board with an Intel H-97 chipset and that seems to support this interface) so that provides for significant performance improvements over existing SSDs although these do have some possible advantages in compatibility with some operating systems (to be further evaluated next time this system is reinstalled). As far as Webmaps goes, the task of building maps and creating mbtiles files for the webserver is a major speed issue so I am looking forward to seeing a major saving in time on these tasks and probably even more if I use mbtiles compression. So far testing of expanding mbtiles to directories shows this happens very quickly probably a lot more than on the HDD.