akiradeveloper / dm-writeboost

Log-structured Caching for Linux
GNU General Public License v2.0
120 stars 18 forks source link

How to handle resizing the dm-writeboost LV? #207

Closed joalmjoalm closed 4 years ago

joalmjoalm commented 4 years ago

2 questions,

1) Seeking som advice /clarification on how to resize a dm-writeboost lv. If I wbcreate a writeboost lv with 10GB backing lv and 1GB caching lv and later need a 20GB writeboosted lv. Do I just increase the underlying LVs and resize the filesys? Or do I have to unmap, recreate?

2) Can I stack two WB on each other? If so, what implication does that have on replaying logs? Ex. WB1 (cache nvme, backing WB2) , WB2 (cache ssd, backing hdd). Caching a hybrid-drive/Like a level1 and 2 chache. Any performance gain with that? or just complexity?

akiradeveloper commented 4 years ago

1.

If you are using raw HDD as the backing lv (it could be linear LV of course), you have to first write-back all the dirty blocks to the backing device, dissemble the WB device and move all the data to another backing storage. If you use other caching technologies, the operation should be the same.

The notable idea to address this problem is thin provisioning. dm-thin may help you.

2.

Replaying the logs are independent for each WB devices. They don't share the same logs.

I don't think stacking would be a great performance gain because WB and other caching softwares as well, should be optimized on the small caching device. It is needless to say that making the assumption on the large caching device is just a stupid idea as a caching software.

Especially if you are using WB in write-back mode, there is a great performance gain with even a small caching device because it buffers the dirty writes and sorts all the dirty blocks before submitting to the request queue.

joalmjoalm commented 4 years ago

ok, thanks for response