On Fri, Oct 5, 2018 at 7:00 PM Spencer Melnick <smelnick97@xxxxxxxxx> wrote: > > Hello everyone, > > I am currently working on implementing a custom caching algorithm in > Ceph's librbd using the ImageCache interface, but I have found that > not all of the requests we expect are being processed by the > ImageCache::aio_read() function. > > Specifically, when we create a rbd image, map it to an nbd device, and > mount this device on a Linux filesystem, we run a series of file read > requests to test the algorithm. However, we find that the number of > requests dispatched to ImageCache::aio_read() is not the same as the > number of requests made by our test program. > > Normally this would not be a problem; however, our algorithm relies on > having a complete data stream to perform some predictive caching. Is > there some kind of caching happening at a higher level of Ceph that > must be turned off first? If you are using rbd-nbd (via the nbd block device), then I suspect you are just seeing the Linux kernel IO scheduler and/or page cache altering your requests. From the point of view of rbd-nbd, any read request received from the kernel will be passed unmodified to "ImageCache::aio_read". > Thanks, > ----------- > Spencer Melnick -- Jason