* RFC Request: NVMe backend support in dm-pcache
@ 2025-08-20 19:15 Giovanni Francesco
2025-08-21 2:33 ` Dongsheng Yang
0 siblings, 1 reply; 2+ messages in thread
From: Giovanni Francesco @ 2025-08-20 19:15 UTC (permalink / raw)
To: dm-devel
Hello,
I would like to ask for consideration of adding NVMe disk support to the caching layer in `dm-pcache`. At present, `cache_dev` only supports `pmem`.
From my perspective, extending `pcache` to support NVMe devices (along with an LRU-based eviction policy) could make it a strong alternative to `bcache` in certain use cases. For example, `pcache` appears to work without requiring the backing storage devices to be reformatted, which I see as a practical advantage.
For my home server workloads, I experimented with `lvmcache`, but I found both writeback and read performance unsatisfactory compared to what I was hoping for. My test notes and benchmarks are available here for anyone interested:
https://github.com/TheLinuxGuy/ugreen-nas/tree/main/experiments-bench
Would adding NVMe support (and potentially configurable caching policies like LRU) be of interest to the project? I am happy to assist with testing or provide more detailed feedback from my benchmarks if that would be useful.
Thanks for your time and consideration.
Giovanni
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: RFC Request: NVMe backend support in dm-pcache
2025-08-20 19:15 RFC Request: NVMe backend support in dm-pcache Giovanni Francesco
@ 2025-08-21 2:33 ` Dongsheng Yang
0 siblings, 0 replies; 2+ messages in thread
From: Dongsheng Yang @ 2025-08-21 2:33 UTC (permalink / raw)
To: Giovanni Francesco, dm-devel
Hi,
Thanx for your information. Yes, pcache currently only allow pmem
to be cache_dev.
(1) I would suggest you to do some testing on pmem firstly.
You can use memmap kernel option to emulate pmem device:
https://docs.pmem.io/persistent-memory/getting-started-guide/creating-development-environments/linux-environments/linux-memmap
Then you can try dm-pcache, to see is that what you want.
Of course, if you want to do some performance compare, remember to use
pmem for bcache too, /dev/pmem0 is also working to be cache device for
bcache.
(2) I would suggest you add more io pattern in you testing script:
iodepth=1, numjobs=1 for latency when workload is not heavy but it want
ack from device ASAP. That's important in lots of latency sensitive
application.
iodepth=1, numjobs=32 or 16. multiple application are running on a large
disk.
(3) LRU is already on the TODO list
in Documentation/admin-guide/device-mapper/dm-pcache.rst
(4) NVME backend is not impossible, but my current high-priority task is
to stabilize dm-pcache and ensure it runs well in the pmem scenario.
Then, consideration may be given to the nvme backend.
Thanx
Dongsheng
在 8/21/2025 3:15 AM, Giovanni Francesco 写道:
> Hello,
>
> I would like to ask for consideration of adding NVMe disk support to the caching layer in `dm-pcache`. At present, `cache_dev` only supports `pmem`.
>
> From my perspective, extending `pcache` to support NVMe devices (along with an LRU-based eviction policy) could make it a strong alternative to `bcache` in certain use cases. For example, `pcache` appears to work without requiring the backing storage devices to be reformatted, which I see as a practical advantage.
>
> For my home server workloads, I experimented with `lvmcache`, but I found both writeback and read performance unsatisfactory compared to what I was hoping for. My test notes and benchmarks are available here for anyone interested:
> https://github.com/TheLinuxGuy/ugreen-nas/tree/main/experiments-bench
>
> Would adding NVMe support (and potentially configurable caching policies like LRU) be of interest to the project? I am happy to assist with testing or provide more detailed feedback from my benchmarks if that would be useful.
>
> Thanks for your time and consideration.
> Giovanni
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-08-21 2:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-20 19:15 RFC Request: NVMe backend support in dm-pcache Giovanni Francesco
2025-08-21 2:33 ` Dongsheng Yang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).