Replies: 14 comments 14 replies
-
First of all, thank you very much for your interest. I hope to have something created/uploaded in the near future. I do not have a schedule ATM. Re: writeback... Re: write-through... Re: access times... All of this depends on your workload. Can you please share these details so we can figure things out and if RapidDisk is the best tool for your environment? Thank you. |
Beta Was this translation helpful? Give feedback.
-
Thanks for responding! I have done a bit more testing since yesterday, figure out the write improvements were due to a config issue with the raid array, it is solved now so no longer seeing the write improvements. Here are the test results with the write-through setup, first is the bare array: and here is with the rapiddisk WT attached, this is the 2nd time running the test: This gives basically the performance I would expect from write-through given what you said above except for that odd reduction in the 2nd write speed test. I ran the test a few times and the results were consistent. It is odd that the speed are still only about ~40-50% of the raw ramdisk though? My use case is basically disposable datasets used for deep learning and that type of thing, it is replaceable so write-back is the ideal solution I am looking for. Get ramdrive performance until the ramdrive is full, in my case ~80% of datasets should fit within the ramdrive but need the flexibility of it overflowing to the drives should the dataset grow beyond that. Although I ran into an issue when trying to run the tests on the WB rapiddisk setup, it refused to allow me to mount the device, I could use the raw block device but could not mount it. I ran out of time so I was not able to troubleshoot it further. Could just need a reboot after all the stuff I tried, plan to mess with it later today again. |
Beta Was this translation helpful? Give feedback.
-
OK. I understand now. A lot of the performance impact (for both reads and writes, using WT mode) when utilizing the RapidDisk-Cache module is table look ups and determining what is already in cache and what is not. This can come at a cost of multiple read requests (ironically, in memory). And let us not forget that the underlying I/O operation still needs to process through the device-mapper framework which consists of additional block I/O requests to the underlying devices (which in turn, process their own). The caching component will never give you native volume speed because of how the subsystems and modules work. Anyway, does that explain, 50%? I do not know without profiling the workload and the subsystems. As for the WB issue, I will need additional information but for now, I am sure that the reboot will address it. |
Beta Was this translation helpful? Give feedback.
-
Ok, that makes some sense then. I was trying the WB mode again after a reboot and was still not able to mount it, I then tried formatting the drive while the WB was enabled and then it allowed me to mount it after that. No idea what is going on there. I will mess around with it some more and see if it happens again. So the first test went basically as I hoped: I then tried testing the raw block device as I had been up until this point and that is when I got the strange results I had seen before, it seems to react differently to the block device vs the file system. Gonna run some FIO tests next to see how those pan out, although if these numbers translate into improves iops as well I think we have a winner! Is there anyway to adjust the writeback settings? How long does it hold data in the ram cache? |
Beta Was this translation helpful? Give feedback.
-
Hmmm. Not sure. Note that I am relying on dm_writecache from the Linux kernel for writeback support. Tuning this out-of-box would require some feature additions in the rapiddisk userspace code, which is planned but I do not have an immediate date or timeframe for it. The data should remain in memory unless the following conditions are met:
OH, dm-writecache ALSO does not cache data that it detects as sequential and possibly block transfer sizes larger than a certain size (I need to double check the latter). So, you will not notice a performance boost if you are not writing small random writes. And for setting adjustments, the LVM2 suite does support dm-writecache and the ability to tune it. Just be sure to not confuse it with dm-cache. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the information. Ok, so back messing with this again. I looked into LVM and actually ended up deciding that combining it with rapiddisk might be the best option. Using LVM to handle the tiered storage from the slower spinning drives and the faster SSD's but it does not appear to support ram caching. Tried stacking rapiddisk on top of the LVM and at first glance it seemed to work great! but then I noticed odd behavior. If I run kdiskmark on the mounted filesystem the results are as expected but if I run FIO on the mounted filesystem it seems to completely ignore the rapiddisk? Is there a way to force the FIO to use the rapiddisk? Same with dd, it seems to ignore the rapiddisk cache? Although before if I did either test directly to the rapiddisk block device they seem to work? |
Beta Was this translation helpful? Give feedback.
-
hmm, I think I might of found part of the issue, I had the LVM cache setup in writeback mode as well, and that was causing issues it seems, if I switched the LVM cache to writethrough and then rapiddisk to writeback it seems to be working with FIO. I need to do more testing but out of time for today. |
Beta Was this translation helpful? Give feedback.
-
Back playing with rapiddisk again lol. I am curious, why is the performance of rapiddisk so slow? Even on a high end 64 core epyc system with 8 channel memory the most I can seem to get is around 5-7GB/sec and half that with it actually caching another drive. Whereas with just NVME drives I can get upwards of 7-9GB/s speeds WITH a filesystem in place? The un-cached NVME drives are actually faster except for 4k random performance. Is this normal? |
Beta Was this translation helpful? Give feedback.
-
Are you using writeback, writethrough or writearound? And how is the whole thing configured and with which tools? |
Beta Was this translation helpful? Give feedback.
-
While yes, there is a bit of overhead because the RAM drive is allocating page memory on demand (as it is being requested), I am really curious about this comment:
Is this a standalone RAM drive or a mapped volume? Also, where did you read this?
|
Beta Was this translation helpful? Give feedback.
-
Thanks for that link, looks like my numbers are somewhat inline with others except that one guy getting 8gb/s+. Just find it interesting that even ramdrives can not match NVME drives in bandwidth, I expected it to put the NVME to shame. lol |
Beta Was this translation helpful? Give feedback.
-
@8465231 It just dawned on me that you should be seeing performance improvement if you modify variables from the default like below during module insertion:
|
Beta Was this translation helpful? Give feedback.
-
Another tunable to improve write performance:
I may end up making this default with the module because with my raw device testing using fio, it shows a significant improvement with random DIO writes. |
Beta Was this translation helpful? Give feedback.
-
@8465231 |
Beta Was this translation helpful? Give feedback.
-
So I got it all setup and working. I am curious about performance though, When do you plan to release the performance video on youtube? I would love to see the expected results.
I tried the writeback mode which would seem to give me ramdisk performance until I read/write more data then would fit on the ramdisk (at risk of data loss of course)? The ramdisk is 256gb in this test and I am using 10gb tests.
The first test gives only slightly improved write speeds and access times, and stock read speeds.
The 2nd test gives full ramdisk write speeds and ~50% ramdisk read speeds and access times are still only mildly improved?
I don't understand why the 2nd test would have faster write speeds? Also why are the read speeds and access times so slow in comparison?
Next I tied the write-through. The first test was stock read speeds with slightly improved write speeds, stock access times. 2nd test was marginally improved read speed, same write speed but massively improved access times. Not sure how the access times are so much better but the read speeds are only marginally improved?
Am I doing something wrong? Is there something I can tweak?
My goal is to get ramdisk performance that is automatically flushed to disk in the background, I am not worried about data loss in the amount of time that it would take to write to disk.
Beta Was this translation helpful? Give feedback.
All reactions