> -----Original Message----- > From: ceph-devel-owner@xxxxxxxxxxxxxxx [mailto:ceph-devel-owner@xxxxxxxxxxxxxxx] On Behalf Of Nick Fisk > Sent: 10 October 2018 21:17 > To: ceph-devel@xxxxxxxxxxxxxxx > Subject: Adding option to write new objects into cache tier > > Hi, > > I'm interesting in adding a new cache tier pool option which writes new objects directly into the cache tier, rather than the current > behaviour of writing them into the base tier. With Bluestore it appears new objects are not buffered into flash. Also writes larger than > 64KB are not buffered into flash, although this behaviour can be tuned to increase the threshold, I would like to test utilising the cache > tier to accelerate writes of new data to solve both these issues. > > From memory, before proxy writes became a thing, new objects ended up in the cache tier, so I don't believe this is a difficult task to > implement. From what I can see a simple IF statement around here to detect if the object currently exists or not: > > https://github.com/ceph/ceph/blob/master/src/osd/PrimaryLogPG.cc#L2852 > > then call promote_object() and then return something like "cache_result_t::BLOCKED_PROMOTE" would probably do what I'm asking. > > Ie, like in Hammer, pre proxy_write land: > https://github.com/ceph/ceph/blob/v0.94.10/src/osd/ReplicatedPG.cc#L1839 > > > Would somebody be able to assist: > > 1. Am I on the right track, skipping the proxy_write function call? > 2. If so, what condition should I be checking for, to detect a new object condition? > 3. Assuming I include all the relevant pool options in a PR, would this be something that would be welcome? > > Thanks, > Nick I believe I have worked out what needs to be done https://github.com/fiskn/ceph/commit/d292f1f364433f8aafe86173a7de8233ace7cdbb 2 Questions: 1. Should this behaviour be controlled via a pool option? It makes sense but I'm not 100% sure on the process of introducing a new pool option as it looks like versioning is required. 2. I'm unable to build packages for Ubuntu 16.04 due to a libstdc++6 dependency issue, I've seen references that this has been fixed in the build process. But I still seem to be hitting this. This is making proper testing difficult. Any ideas? Thanks Nick