Not too shy to talk 
|
First public release of the NVMe driver has been uploaded to os4depot.
From the readme:
What is NVMe: NVMe is short for Non-Volatile Memory express. It's basically a transfer protocol for attachment of mass storage to a computer. Unlike SATA, NVMe is specifically designed for solid state flash memory. There is no separate storage controller. Instead the NVMe SSD is directly connected to the PCIe bus through an M.2 slot. The PCIe interface and NVMe protocol offer bandwidth and "IOs per seconds" which go way beyond anything that SATA can deliver. This high bandwidth is achieved because NVMe drives connect to a M.2 slots with 4 PCIe lanes. At the time of writing, the first PCIe 5.0 drives are emerging. These drives have a maximum interface speed of 16Gbyte/s while the actual peak performance is already approaching 10GByte/s. Eventually, NVMe SSDs will replace SATA SSDs as the new industry standard. But since modern notebooks and PCs are not shipped with CD/DVD players (modern PC cases don't even have an external 5.25" bay anymore). And NVMe SSDs are rapidly becoming larger and cheaper. This will happen sooner rather then later.
How to attach NVMe to a NG system: None of the current NG systems offer a M.2 slot directly on the mainboard. But since an NVMe M.2 slot is basically a PCIe x4 slot with a different form-factor, we can use a widely available passive PCIeM.2 adapter card. These adapter cards are available with a PCIe x1 or PCIe x4 connector. Don't use the adapter cards with multiple M.2 slots because they will not work.
The X5000 has both x1 slots and a x4 slot available but there are some drawbacks: - The x4 slot is blocked by a double slot GFX card. But with a PCIe extender cable for either the PCIe x4 slot or PCIe graphics cards, this slot becomes accessible. - All PCIe slots, except the x16 Graphics card slot, are connected behind a PCIe switch. Which means additional latency. - The PCIe slots are limited to version 2.0. This means an interface speed of "only" 500MB/s (x1) or 2000MB/s (x4). But either way this is still faster then the X5000 SATA2.0 ports. (300MB/s).
Which NVMe SSDs work with this driver: This driver should work with any NVMe drive. It was developed to be compliant with the latest NVMe specification (2.0c). A lot optional features are not implemented yet. Like the Host Memory Buffer for cacheless drives. But given the speed of our memory subsystem, I doubt that this will lead to any noticeable performance increase. For now, the driver has been tested on a X5000 and in the x4 slot with the following drives: - Samsung 970 EVO 1TB - WD Black SN770 1TB
----------------------------------------------------------------------- Installation:
Install the NVME hardware before adding the driver to the kicklayout
Copy "nvme.device" to sys:kickstart/ and add "MODULE Kickstart/nvme.device" to your sys:devs/kicklayout file.
Alternatively you can copy nvme.device" to DEVS: and mount your partitions manually with sys:system/Mounter. (Don't forget to set the tooltypes)
----------------------------------------------------------------------- FAQ: (Foreseeable asked questions; This is a first release afterall )
Q: Yessss!! I will get >Gigabyte/seconds transfer speeds, right? A: Erm, no. NVMe is designed for multithreaded and streaming access. Streaming as in: It takes some overhead to setup a transfer but then we get this train moving. You will most likely use NGFS. This filesystem is single threaded and limits the maximum transfer internally to 32kbyte-128kb. The overhead needed to start those small transfers will kill speed in a single threaded environment. The Amiga's slow message port system and the fact that it was decided that >AmigaOS3.9 drivers have to do gatekeeping for misaligned transfers is also not helping. (to say the least). In short: Speed will be higher then a SATA drive with the same filesystem. But no miracles.
Q: So how fast is it? A: With NGFS, barely faster than a SATA drive. SFS2 uses a maximum transfer size of 16MByte. I was able to measure speeds up to 384 MB/s while transfering a 1000MByte file between ram and a SFS2 partition. This beats SATA speeds but nowhere near its potential. There is room for improvement but don't expect miracles.
Q: I don't believe you, I will play in media toolbox with blocksize, buffers, Maxtransfer and the Mask. Or? A: Nope, these settings are completely ignored by PPC filesystems. So don't bother changing them. Apparently they are still there for legacy reasons only. Everything is decided by the filesystems for you.
Q: Wait a minute. Weren't modern SSD like NVMe SSDs supposed to drop 512 byte blocksizes and require 4096 instead? A: That's an urban myth. NVMe drives require at least 4k host memory pages. The drive itself can support up to 64 different block sizes. The drive will tell which blocksize will give the best speed result. But so far, my Samsung 970 EVO supports 512 bytes only. The more modern WD black SN770 support 512 and 4k as well but is formatted as 512 bytes as factory default. Anyways, my driver will report back the formatted LBA to the filesystem. In future updates I might provide a tool which allows you to change blocksize and reformat the drive accordingly. (Notice the "might")
Q: Ok, that is all disappointing. But I will be able to boot from this drive, right? A: Wrong again. Currently, none of the NG systems support booting from NVMe drives. U-boot itself supports NVMe since 2017 with three isolated source files but I was told that it will take a complete rewrite of the X5000 U-boot to add support. In other words. Never.
Q: Then what is the purpose of this driver? A: Next time, I will ask myself this question before I start the development.
Todo:
A lot. Like: - A monitoring and control tool - HMB for cacheless drives - Support for more than one drive. - .....
But I am not in a hurry.
Edited by geennaam on 2023/3/26 12:32:46 Edited by geennaam on 2023/3/26 13:53:46 Edited by geennaam on 2023/3/26 16:44:00 Edited by geennaam on 2023/3/26 17:18:22 Edited by geennaam on 2023/3/26 17:22:59 Edited by geennaam on 2023/3/27 13:10:45
|