-
Notifications
You must be signed in to change notification settings - Fork 418
Failure creating flashcache with 1 sector blocksize #198
Comments
This looks like a bug in the disk assoc parameter checking. Unfortunately I am without access to a computer until Dec 31 and can't look at it until then. You could try playing with the disk assoc arg to work around (try to disable disk assoc completely - does 0 do it - I don't recall and would have to look at the code). Sent from my iPhone
|
Thanks a lot Mohan, I had looked at the assoc parameter check but didn't fully understand what it's doing. It seems to also occur if I use -m (md block size); I had been trying to align on the 128KB-striped hw raid there. |
Tested these two, no luck so far.
setting to 1
|
Gonna find someone who safely reads C and then poke at it more. Your comment in the code clearly says that disk assoc "0" should work. |
I am still without Internet/computer access save for my phone. I will take a look next Wednesday - unless you fix it by then... Sent from my iPhone
|
@mohans enjoy your time offline. I'll post if i find relevant update. For now I did change to 2KB which should already improve hit rates by some margin. |
Poked around with it a little today, no luck yet. Lets chat next year, happy new year. |
Hi @FlorianHeigl @mohans , |
Hi Florian - Sorry for the late response. Are you running flashcache trunk ? I tried to repro your issue at my end with a blocksize of 1 sector, but have been unable to repro it (with trunk). The puzzling thing is that the default disk_assoc passed in by the flashcache_create wrapper into the module is 0, so the code in the kernel module that causes the create to fail should have never executed at all. Tracking this down, I found one issue in flashcache_create.c that could cause garbage values of disk_assoc being passed into the module. It is a sprintf formatting issue fixed by diff --git a/src/utils/flashcache_create.c b/src/utils/flashcache_create.c
This should cause a 0 value for disk_assoc passed into the module (disk assoc disabled), which should not trigger failure. Would you be able to quickly try this and tell me if that works for you ? cofol1986 - The check for disk_assoc is indeed broken. The intent there was to make sure that the disk_assoc configured was not larger than that the cache_set assoc. I am not sure that '(dmc->assoc * dmc->block_size) < dmc->disk_assoc)' fixes that though (we can compare dmc->assoc * dmc->block_size with dmc->disk_assoc * dmc->blocksize). I think we can also just check for '(dmc->assoc < dmc->disk_assoc)' - both of those quantities are in terms of flashcache blocks. There are a few other issues - with a blocksize < 1KB, a few items in dmsetup table will show up wrongly as 0 (because those are expressed in KB), those would need to be fixed as well. From: cofol1986 [email protected] Hi @FlorianHeigl @mohans , |
Hi, not, not running trunk, sorry... Besides, regarding the reduced performance: as is it cannot drop any lower, getting about 1/8th of the raw disk performance, fronted by a enterprise SLC SSD. |
Thank you for reporting this issue and appreciate your patience. We've notified the core team for an update on this issue. We're looking for a response within the next 30 days or the issue may be closed. |
Hi,
I want to optimize flashcache for use in a Xen host. The hit rates running mixed-size IO were, well, shitty.
dmsetup table with iosize stats from flashcache shows that the IO's i'm getting from vms are not 4KB aligned only. At least (phew) they are 512byte increments.
Because of that I tried the following:
This seems to correspond with the following message in dmesg:
I've raised the dom0 memory to >6GB and flashcache's calculation says it'll need about 1.4GB:
Flashcache metadata will use 1408MB of your 6852MB main memory
Is this a bug or do i need to adjust some other value to make it worth, formula-wise?
The text was updated successfully, but these errors were encountered: