Hey!
just sharing my two cents here of what I have tried so far.
nvme-cli vs nvme-stas:
We recently had this conversation with a customer.
First we configured it with nvme-cli natively, but this turned out to be rather complex.
It works, but it needs a few tweaks to behave like one would expect.
- Sometimes the network connection is not available quick enough on boot, which leads to not connected controllers when the nvmf-autoconnect service tries to connect the portals. => Dirty solution: Added a delay to the service, Pretty solution: Modify the sytemd order for the nvmf-autoconnect service.
- Normally, if a controller gets unavailable for more than 10 minutes, the controller gets dropped and permanently disconnect / gets removed. Even if the controller comes back, it wont reconnect. This needs to be tuned during connection with --ctrl-loss-tmo=-1. This way the controller never gets removed and stays in state reconnecting.
- We also tuned the --keep-alive-tmo to 10 to detect silently failed paths quicker. => Not sure about the default value, maybe it is already 10.
- iopolicy needs to be tuned with udev rules for Round-Robin or queue-depth. =>
https://docs.redhat.com/en/document...pathing_enabling-multipathing-on-nvme-devices
Good thing about nvme, it implements multipathing natively. Which is an advantage compared to iSCSI.
No multipath-tools required.
With nvme-stas the daemon manages the connections.
You still need to define the portals in the /etc/stas/stacd.conf instead of /etc/nvme/discovery.conf:
1. Log into the Proxmox node via SSH and install the package from the Linux repositories:
apt update
apt install nvme-stas -y
2. Configure “stacd.conf”
nano /etc/stas/stacd.conf
# Specify all reachable portal IPs for redundancy
[Controllers]
controller=transport=tcp;traddr=192.168.150.50;trsvcid=4420
controller=transport=tcp;traddr=192.168.150.51;trsvcid=4420
controller=transport=tcp;traddr=192.168.151.50;trsvcid=4420
controller=transport=tcp;traddr=192.168.151.51;trsvcid=4420
3. Enable and Start the Services
# Disable the old static service if it was enabled
systemctl disable --now nvmf-autoconnect.service
# Enable and start the new resilient daemons
systemctl enable --now stafd
systemctl enable --now stacd
You still need to modify the ctrl-loss-tmo and keep-alive value (also in stacd.conf).
See:
https://nvme-stas.readthedocs.io/en/latest/stacd.conf.html
ctrl-loss-tmo -1, even tho nvme-stas would reconnect removed controllers on its own, is still needed!
Especially if you loose all paths. For example if the whole storage goes down for a while.
If the paths come back LVM could run into issues. Without the controllers being removed, everything should come back normally.
The VMs probably timed out by then, but the Storage is directly accessible again.
Also I have not found a way to easily change IO-Policy with nvme-stas, except with the udev rules used before.
In my opinion, the benefit of using nvme-stas is not big, if you do not use the auto-discovery features.
Benchmarking:
Normally we measure performance with fio and simulate some workloads.
Or for quick latency measurement with
ioping (basically ping, but for storage).
What latency to expect depends on the storage behind NVMe/TCP.
For NVMe storages I would suspect lower latencies like 1-3ms, sudden spikes are okay under load but not on average.
Tweaks:
The only tweak we really applied is MTU 9000 (Jumbo Frames) on storage and client side.
Not much more. But I think this depends on the workload, what needs to be tuned.
Maybe expand memory buffers and queues, but please take this with a grain of salt. Never tried it and my experience in this field is limitied.
Just found this:
https://www.lightbitslabs.com/blog/...-i-o-and-i-matter-more-than-you-think-part-1/
https://www.lightbitslabs.com/blog/...-storage-the-simple-guide-to-nvme-tcp-tuning/
NVMe-TCP / iSCSI / NFS:
We prefer using block storage (iSCSI, NVMe/TCP/RDMA) instead of file (NFS,SMB etc.).
The snapshot feature is still in technology preview with LVM, but if the customer does not necessarily need it, we stay with disk type RAW and LVM without the snapshot feature. Which I recommend everyone in a production environment. Blockbridge summarized the reasons pretty well:
=>
https://kb.blockbridge.com/technote/proxmox-qcow-snapshots-on-lvm/index.html
NFS and RAW is also fine (no snapshots), but I do not like using qcow2 (performance penalty, especially with snapshots and some other reasons).
As the NVMe/TCP is implemented natively without a separate translation layer like with iSCSI, it should give you lower latencies and less CPU-Overhead.
But depends on the workload.
No real tests behind it, but I would argue NVMe/TCP outperforms NFS.
Hope this helps and also very curious about other answers / experiences!
Best regards,
Kevin