Flexible placement
Quoted 13 lines · Adam C. Emerson
# Flexible Placement #
This is a large topic which should be discussed on its own, but it motivates the interface designs below, so we shall briefly mention why it's interesting.
CRUSH/PG is a fine placement system for several workloads, but it has two well-known limitations.
## Motivation ##
(quoted diff) +0
-1- Data distribution can be much less uniform than one might like, giving uneven use of disks. This has caused some Ceph developers
Review
Quoted 10 lines
(quoted diff) +0
-1to experiment with Monte Carlo based placement algorithms. - Data distribution can be much more uniform than one would like. This is the fundamental cause of Ceph's slow sequential read performance. More generally, unrelated workloads contend with each other due to a lack of affinity for related data. The effects are especially pronounced on spinning disk (due to seek times), but still exist on Flash (due to bus/network contention.) This is a tension between competing goods. CRUSH gains wide dispersion and uniformity to defend against correlated failures but this imposes a tradeoff.
If we're just talking about locality here, isn't this tradeoff already available to the user by controlling the object size? And/or setting the placement key so that two objects are always placed together in the cluster.
The non-uniformity is a real problem, but let's not assume it's the same problem as flexible placement. If you want linear striping, for exmaple, that gives you a perfect distribution but it falls apart as soon as there is any rebalancing.
Are there some concrete examples of what these flexible placements might be? I still don't see how they are different that PGs. I.e., you can split placement into two stages: mapping objects to PGs, and mapping PGs to devices. If both of those are pluggable, what does that not capture?
(You could map every object to a distinct set of devices, and this is frequently suggested, but I don't think it is practical. In a large system, you'll have all-to-all replication streams, and *every* possible coincident failure will lead to data loss.)
Quoted 19 lines
## Goal ##
Ceph should support placement methods other than CRUSH/PG. Currently, the OSD dispatches operations based on placement group ID, which will need to be varied,
We also need some way to get new types of functions into the cluster.
## Proposal ##
Our proposal is, in a way, CRUSH taken to its logical conclusion. Instead of distributing CRUSH rules, we propose to distribute general computable functions from (oid, volume/dataset) pairs to sequences of OSDs with their supporting data structures. One of our ongoing research projects has been an in-process executor for these functions based on Google's NaCl. The benefits are:
(quoted diff) +0
-2- Administrators can fine-tune placement functions to fit their workloads well. - They can also experiment easily without having to recompile all of
Review
Quoted 10 lines
(quoted diff) +0
-4Ceph and make heavy architectural changes. - Entirely new placement strategies can be deployed without having to upgrade every machine in the cluster. Or any machine in the cluster, once they've been upgraded to a Flexible Placement capable version. - Possibilities for annealing and machine learning to gradually adapt placement in response to load data become available - NaCl builds on LLVM which has a rich set of tools for optimizations like partial evaluation. - NaCl is fast.
NaCl sounds great. It sounds like this still fits right into the object -> PG -> device list mapping strategy, though.
Quoted 7 lines
# Flexible Semantics #
Another motivating example. Originally, Ceph did replication and only replication under a very specific consistency model. There has been desire for more flexibility.
(quoted diff) +0
-1- Erasure Coding. it still follows the Ceph consistency model (though leaves out many operations) but is very different in
Review
Quoted 10 lines
(quoted diff) +0
-3back-end dispatch, enough so that it inspired a major rewrite of the OSD's bottom half. - Append-only immutable objects have been discussed. - Many people have asked for relaxed consistency to improve performance. This is not be suitable for all workloads, but people have repeatedly asked for the ability to set up low-latency, relaxed-consistency volumes that still provide Ceph's ability to easily use new storage and scale well. - Transactional storage. As mentioned above, cross-object transactional semantics are a thing people may have desired.
This would just be a new pool type, right? We definitely need to clean up the OSD :: PG interface(s) to enable it.
Quoted 111 lines
# Interfaces #
Right now our class hierarchy is a bit of a mess. Eventually we'll do something about
PGandReplicatedPG, refactor, support asynchronous I/O, reduce lock contention, support in core affinity, and build Jerusalem here in England's green and pleasant land.While we're stringing up our bows of burning gold, we should support non-PG based placement and flexible semantics. Right now, parts of the PG and the OSD (since the OSD manages the collection of PGs, spins them up, and manages thread pools shared by sets of PGs) are intertwined. Thus, we need to abstract out both pieces.
As we also want to support having multiple "logical" OSDs running in a single
ceph-osdprocess, this would be a natural time to add that capability.Both these are sketches and should be considered a work in progress.
##
DataSetInterface##Here is a sketch of what a flexible abstraction based on PG could look like, at least parts of one. Not being informed about Scrub, Recovery, or Cache Tiering, having only focused on the object operation path, we won't include those details here.
We also leave out functions called from the PG itself or other objects invoked from ownstack.
```c++ class DataSetInterface { protected: LogicalOSD& losd; // LogicalOSD is a means to have different // stores/semantics run in the same process. MapPartRef curmap; // Subset of map relevant to this DSI public: // The OSD (things Up the Stack, generally) should not call 'lock' // on us. If we have locking of some sort things down the stack that // we have some relationship with (friend or whatever) could lock or // unlock us, but that should not be baked in as part of the interface. // Things like the info struct and details about loading the Place // wouldn't actually be here. As there is an intimate relation // between the LogicalOSD and an implementation of DataSetInterface (it // holds all those loaded in memory and controls dispatch), they // would not need to be part of the generic interface. const coll_t coll; // The subdivision of the Store we control // In the PG case we always know we're the primary or not for // anything within the same pgid. That is not expected to be the // case generally. bool is_primary(const OpRequest&) = 0; // No 'is_replica' since 'replica' may not be applicable // generally. It's a bit off even in the erasure coded case. bool is_acting(const OpRequest&) = 0; bool is_inactive() = 0; public: // No identifier. The descendent will take that. DataSetInterface(LogicalOSD& o, OSDMapRef curmap); virtual ~DataSetInterface(); DataSetInterface(const DataSetInterface&) = delete; DataSetInterface& operator =(const DataSetInterface&) = delete; DataSetInterface(DataSetInterface&&) = delete; DataSetInterface& operator =(DataSetInterface&&) = delete; virtual void on_removal(ObjectStore::Transaction *t) = 0; // Yes, there's no 'queue' and no 'do_op' or any of // that. This is intentional. There's no dequeue or do_op because // those functions are either called only by the PG currently OR // they're called in OSD functions called by the PG as part of the // thread switch. They should not be part of the public interface. // There's no queue because we can either put queue here or we can // put queue in LogicalOSD. (We could do both, but that seems bad to // me.) If there is some combination of locking and checking that // must be done before queueing an operation, it seems that it's // better to do it in LogicalOSD so that it doesn't leak out and // become part of the abstraction for other implementations. }; ```##
LogicalOSD##The OSD class itself (representing the single OSD process) should have a map (*perhaps* a Boost.Intrusive.Set?) mapping OSD IDs to to
LogicalOSDinstances.```c++ class LogicalOSD { OSD& osd; ObjectStore& store; // Look up the DataSetInterface instance appropriate to the given // OpRequest. virtual future<DataSetInterface,int> get_place_for(const OpRequest&) = 0; // Every logical OSD will have its own watchers as well as slot // cache. Someone familiar with flow control should check this // idea. Since LogicalOSDs will, ideally, share messengers we might // want them to share the same slot cache. In that case we should // just re-dimension watchers within Session SessionRef session_for(const entity_name_t& name); void queue(DataSetInterfaceRef&& pi, OpRequestRef&& to_queue); void queue_front(DataSetInterfaceRef&& pi, OpRequestRef&& to_queue);
Quoted 8 lines
// Dequeue and the like are currently called in the PG itself and so // have no place in the interface presented to the OSD. void pause(); void resume(); void drain(); }; ```
I was assuming that we'd just have multiple instances of the OSD class in the same process (as we used to back in the early days with fakesyn for testing). Is there any real difference here except naming? DataSetInterface still looks like PG (or whatever we name it), a minimal interface for passing data and control (peering) messages down.
This sounds like two basic points:
1) Let's clean up the PG interface already. Then we can add new pool types that aren't primary-driven and/or pglog-based. Class names will shift around as part of this.
2) Let's put many OSD's in the same process. There will be some similar naming changes.
What I don't see is where this means we should move away from PG, or an object -> PG -> device mapping strategy. Am I missing something key, or are we just using different words?
Thanks!
sage
Quoted 4 lines · Sage Weil
If we're just talking about locality here, isn't this tradeoff already available to the user by controlling the object size? And/or setting the placement key so that two objects are always placed together in the cluster.
Object locator is a way to get locality. One worry I have with object locator is that it's entirely client driven.
Quoted 10 lines
The non-uniformity is a real problem, but let's not assume it's the same problem as flexible placement. If you want linear striping, for exmaple, that gives you a perfect distribution but it falls apart as soon as there is any rebalancing.
Are there some concrete examples of what these flexible placements might be? I still don't see how they are different that PGs. I.e., you can split placement into two stages: mapping objects to PGs, and mapping PGs to devices. If both of those are pluggable, what does that not capture?
So, given that I think we seem to be using language slightly differently, I think you're asking if there are any concrete ideas I know of that don't fit well into the OID => Hash => Device List model, and depending on how you define 'concrete' I think there might be. Part of what we'd like to investigate as part of Blue Sky work is instrumenting a cluster to provide usage data and use that to feed into a machine learning or annealing system to try and gradually optimize placement for its workload. In that case you could have classifiers running over object names sortinf them into categories with different placement rules, each of which might use a different hashing strategy to sort objects into OSDs. Data movement could be required by change in classification as well as hash or rule set. There IS a hash in here, but trying to narrow it down to the single pipeline of HERE is the hash and HERE is the list of devices might be a bad fit.
Quoted 4 lines
(You could map every object to a distinct set of devices, and this is frequently suggested, but I don't think it is practical. In a large system, you'll have all-to-all replication streams, and *every* possible coincident failure will lead to data loss.)
So. In practice, many placements people will want to use will have the pattern Object => Hash => Set of devices. Even systems that do something weird like fiddle with the hash to make it periodic in some substring of the object name would fit that paradigm. I don't call the Hash a 'PG' because when I think 'PG' I think of the /very specific/ combination of hash and stablemod and whatnot that we happen to use in Ceph. Or, I also think of the specific class in the OSD that enforces an ordering o operations and a very specific sort of replication behaviors.
So, when I say 'other than CRUSH/PG' I mean 'other than the CRUSH algorithm couypled with the PG hash'.
That said, I don't want to rule out allowing direct Object->Device mapping. I would like an abstraction where, when we have a hash feeding into a device list generator, the details need not be something the client has to concern itself with. That seems to me like good abstraction.
That way when someone wants a specialized algorithm that goes from OIDs to names directly (even if it's only useful in very specific contexts with very specific use cases) we could still write it up, plug it into the system, and go to town.
Quoted 5 lines
Quoted 2 lines
- Transactional storage. As mentioned above, cross-object
transactional semantics are a thing people may have desired.This would just be a new pool type, right? We definitely need to clean up the OSD :: PG interface(s) to enable it.
I suspect for sanity you'd want to mark your entire pool as Transactional. We'd still need the actual backend implementation to support it.
Quoted 4 lines
I was assuming that we'd just have multiple instances of the OSD class in the same process (as we used to back in the early days with fakesyn for testing). Is there any real difference here except naming?
I imagined a single OSD object holding several LogicalOSD objects (mapped from OSD number). I'm not hell bent on this, but OSD and OSDService have an awful lot of stuff in them and if we could share most of it between the LogicalOSDs, it would be an efficiency win.
Quoted 3 lines
DataSetInterface still looks like PG (or whatever we name it), a minimal interface for passing data and control (peering) messages down.
That is correct. It's mostly PG's object operation executing functions. The main thing was that I was surprised how much stuff in PG looks to be used by operations downstack that could be hidden away from the OSD with advantages for allowing freedom in implementing faster, less lockful data pipelines.
Quoted 5 lines
This sounds like two basic points:
1) Let's clean up the PG interface already. Then we can add new pool types that aren't primary-driven and/or pglog-based. Class names will shift around as part of this.
That is most of what I was getting at.
Quoted 2 lines
2) Let's put many OSD's in the same process. There will be some similar naming changes.
That is also most of what I"m getting at. I'm not particularly picky about names.
Quoted 3 lines
What I don't see is where this means we should move away from PG, or an object -> PG -> device mapping strategy. Am I missing something key, or are we just using different words?
Partly, it's that we're using different names. I think when you use 'PG' you use it to mean any hash-like altorithm to cut down the space of objects to something that can be more tractably dealt with. I use it to mean a very specific algorithm we happen to use right now.
Partly, I don't want to make the use of a hash like that compulsary. I wouldn't mind placement functions being able to surface it when there are useful optimizations that can be made that way. However, part of the benefit of the NaCl-based Flexible Placement design is that administrators can put in all sorts of weird things we've never thought of. If we are to redesign some of our abstractions to support it and other goals we want (which I think we must), it seems a shame not to make them as flexible as we reasonably can. After all, we are building the future of storage, and the Future is full of a lot of things we haven't thought of.
Signature · 3 lines
Senior Software Engineer Red Hat Storage, Ann Arbor, MI, US
IRC: Aemerson@{RedHat, OFTC, Freenode}
0x80F7544B90EDBFB9 E707 86BA 0C1B 62CC 152C 7C12 80F7 544B 90ED BFB9Quoted 5 lines
However, part of the benefit of the NaCl-based Flexible Placement design is that administrators can put in all sorts of weird things we've never thought of. If we are to redesign some of our abstractions to support
it and other goals we want (which I think we must), it seems a shame not to make them as flexible as we reasonably can
You suggests awful things. People fears flexibility. Ceph policies are really already flexible.
Those couple of people that wish "super flexibility" are able to fork Ceph and implement their needs.
Until several people explicitly asked for "super-puper" flexibility, that cannot be described with Crush,
there is no need to do this "flexibility".
It is better focus effort on pushing down memory consumption, especially during recovery.
It is much more desired feature.
Quoted 8 lines · Adam C. Emerson
Quoted 4 lines · Sage Weil
If we're just talking about locality here, isn't this tradeoff already available to the user by controlling the object size? And/or setting the placement key so that two objects are always placed together in the cluster.
Object locator is a way to get locality. One worry I have with object locator is that it's entirely client driven.
How could it not be client-driven? If the client doesn't know the placement, it can't read or write the object. Unless you have proxy/redirect at the OSD level, but I think then you're talking about tiering v2.
Quoted 11 lines
Quoted 10 lines
The non-uniformity is a real problem, but let's not assume it's the same problem as flexible placement. If you want linear striping, for exmaple, that gives you a perfect distribution but it falls apart as soon as there is any rebalancing.
Are there some concrete examples of what these flexible placements might be? I still don't see how they are different that PGs. I.e., you can split placement into two stages: mapping objects to PGs, and mapping PGs to devices. If both of those are pluggable, what does that not capture?
Quoted 3 lines
So, given that I think we seem to be using language slightly differently, I think you're asking if there are any concrete ideas I know of that don't fit well into the OID => Hash => Device List model,
s/Hash/Hash Range/ (== placement group or pool shard)
Quoted 4 lines
and depending on how you define 'concrete' I think there might be. Part of what we'd like to investigate as part of Blue Sky work is instrumenting a cluster to provide usage data and use that to feed into a machine learning or annealing system to try and gradually
Quoted 8 lines
optimize placement for its workload. In that case you could have classifiers running over object names sortinf them into categories with different placement rules, each of which might use a different hashing strategy to sort objects into OSDs. Data movement could be required by change in classification as well as hash or rule set. There IS a hash in here, but trying to narrow it down to the single pipeline of HERE is the hash and HERE is the list of devices might be a bad fit.
I think I'm still confused. If we're not moving PG's or hash *ranges* in large chunks, that means we have to individually consider each object in the event of any topology change (a new osd came up, or the placement policy changed, please wait while I iterate over my 13 million object to see what has moved). One of the primary functions of PGs is the bound the amount of map change checking I have to do--recalculating a crush mapping 100x is cheap. Swapping out crush for a more gneeral NaCl thing would be the same. Moving away from placement *groups* makes it all fall apart.
In your example above, you're talking abuot using the placement policy to manage fine-grained changes.. do you mean using that to move individual objects around? This feels like entirely the wrong layer for that sort of thing--we lose the ability for the client to know where things.
If it's policy driven, the policy is published as a pool property and has to be compact and fast. If it's fine-grained, then we need something that is totally different (e.g., a metadata index).
Quoted 5 lines
Quoted 4 lines
(You could map every object to a distinct set of devices, and this is frequently suggested, but I don't think it is practical. In a large system, you'll have all-to-all replication streams, and *every* possible coincident failure will lead to data loss.)
Quoted 9 lines
So. In practice, many placements people will want to use will have the pattern Object => Hash => Set of devices. Even systems that do something weird like fiddle with the hash to make it periodic in some substring of the object name would fit that paradigm. I don't call the Hash a 'PG' because when I think 'PG' I think of the /very specific/ combination of hash and stablemod and whatnot that we happen to use in Ceph. Or, I also think of the specific class in the OSD that enforces an ordering o operations and a very specific sort of replication behaviors.
FWIW I'm thinking PG == hash range == shard of the pool. The ordering is a pool property; I think we can mostly ignore the current entangled interface and implementation.
Quoted 8 lines
So, when I say 'other than CRUSH/PG' I mean 'other than the CRUSH algorithm couypled with the PG hash'.
That said, I don't want to rule out allowing direct
Object->Devicemapping. I would like an abstraction where, when we have a hash feeding into a device list generator, the details need not be something the client has to concern itself with. That seems to me like good abstraction.
I guess my point is that a direct object -> device mapping is fundamentally flawed, because
1) a mapping or policy change means recalculationg O(num objects) mappings
2) all-to-all connectivity between OSDs
3) guaranteed data loss on any n- or (m+1)-failure.
and if we can't/won't actually go there, is there anything we should do beyond more generalized object -> pg and pg -> device list mappings.
Quoted 4 lines
That way when someone wants a specialized algorithm that goes from OIDs to names directly (even if it's only useful in very specific contexts with very specific use cases) we could still write it up, plug it into the system, and go to town.
I think that in those cases, we let them use a wacky object -> PG mapping, and then have a linear/flat PG -> device mapping so they can still get some uniformity.
This isn't completely general, but I'd want to see an example of something it can't express. Maybe those entanglement erasure codes that Veronica was talking about at FAST?
Or maybe the key step is to not assume the PG is a hash range, but instead consider it an arbitrary bucket in the pool.
Quoted 9 lines
Quoted 4 lines
I was assuming that we'd just have multiple instances of the OSD class in the same process (as we used to back in the early days with fakesyn for testing). Is there any real difference here except naming?
I imagined a single OSD object holding several LogicalOSD objects (mapped from OSD number). I'm not hell bent on this, but OSD and OSDService have an awful lot of stuff in them and if we could share most of it between the LogicalOSDs, it would be an efficiency win.
Yeah, whatever gets us the sharing we need, wehther it's OSDProcess + OSD or OSD + LogicalOSD.
Quoted 9 lines
Quoted 3 lines
DataSetInterface still looks like PG (or whatever we name it), a minimal interface for passing data and control (peering) messages down.
That is correct. It's mostly PG's object operation executing functions. The main thing was that I was surprised how much stuff in PG looks to be used by operations downstack that could be hidden away from the OSD with advantages for allowing freedom in implementing faster, less lockful data pipelines.
Okay, yeah. There's a lot fo cleanup to be done, but it's mostly mechanical.
Quoted 23 lines
Quoted 5 lines
This sounds like two basic points:
1) Let's clean up the PG interface already. Then we can add new pool types that aren't primary-driven and/or pglog-based. Class names will shift around as part of this.
That is most of what I was getting at.
Quoted 2 lines
2) Let's put many OSD's in the same process. There will be some similar naming changes.
That is also most of what I"m getting at. I'm not particularly picky about names.
Quoted 3 lines
What I don't see is where this means we should move away from PG, or an object -> PG -> device mapping strategy. Am I missing something key, or are we just using different words?
Partly, it's that we're using different names. I think when you use 'PG' you use it to mean any hash-like altorithm to cut down the space of objects to something that can be more tractably dealt with. I use it to mean a very specific algorithm we happen to use right now.
Quoted 10 lines
Partly, I don't want to make the use of a hash like that compulsary. I wouldn't mind placement functions being able to surface it when there are useful optimizations that can be made that way. However, part of the benefit of the NaCl-based Flexible Placement design is that administrators can put in all sorts of weird things we've never thought of. If we are to redesign some of our abstractions to support it and other goals we want (which I think we must), it seems a shame not to make them as flexible as we reasonably can. After all, we are building the future of storage, and the Future is full of a lot of things we haven't thought of.
Okay, I think this makes sense. It means that the pg split becomes somewhat specific to the current hash range approach.
Hmm, I think Veronica's helical entanglement codes might actually be a good example application to look at here to see if we're making something flexible enough.
http://dl.acm.org/citation.cfm?id=2718696
sage
Quoted 4 lines · Sage Weil
How could it not be client-driven? If the client doesn't know the placement, it can't read or write the object. Unless you have proxy/redirect at the OSD level, but I think then you're talking about tiering v2.
Let me rephrase that. The client has to explicitly set locality. I was imagining a case like CephFS that uses "INODE.BLOCK" as the object name getting a rule that might probabilistically stick blocks with a the same inode in the same place, say with a parameter that lets you trade off the hit to uniformity that would involve.
Quoted 16 lines
I think I'm still confused. If we're not moving PG's or hash *ranges* in large chunks, that means we have to individually consider each object in the event of any topology change (a new osd came up, or the placement policy changed, please wait while I iterate over my 13 million object to see what has moved). One of the primary functions of PGs is the bound the amount of map change checking I have to do--recalculating a crush mapping 100x is cheap. Swapping out crush for a more gneeral NaCl thing would be the same. Moving away from placement *groups* makes it all fall apart.
In your example above, you're talking abuot using the placement policy to manage fine-grained changes.. do you mean using that to move individual objects around? This feels like entirely the wrong layer for that sort of thing--we lose the ability for the client to know where things.
Quoted 3 lines
If it's policy driven, the policy is published as a pool property and has to be compact and fast. If it's fine-grained, then we need something that is totally different (e.g., a metadata index).
I wasn't thinking that fine grained, I was thinking of a classification function that would sort objects by name into groups each of which would then get their own movement. The hard part would be reclassifying objects when the function changes. I don't have an immediate solution right now, I have a few ideas for making it more tractable, I just don't want to build a system that would be unable to do some version where we have the kinks ironed out, if that makes sense.
Quoted 3 lines
FWIW I'm thinking PG == hash range == shard of the pool. The ordering is a pool property; I think we can mostly ignore the current entangled interface and implementation.
All right.
Quoted 7 lines
I guess my point is that a direct object -> device mapping is fundamentally flawed, because
1) a mapping or policy change means recalculationg O(num objects) mappings
2) all-to-all connectivity between OSDs
3) guaranteed data loss on any n- or (m+1)-failure.
There are certainly things that make it a bad idea in a lot of cases, I agree.
Quoted 4 lines
and if we can't/won't actually go there, is there anything we should do beyond more generalized object -> pg and pg -> device list mappings.
I'll take a look at her paper and see what all it requires.
Quoted 10 lines
I think that in those cases, we let them use a wacky object -> PG mapping, and then have a linear/flat PG -> device mapping so they can still get some uniformity.
This isn't completely general, but I'd want to see an example of something it can't express. Maybe those entanglement erasure codes that Veronica was talking about at FAST?
Or maybe the key step is to not assume the PG is a hash range, but instead consider it an arbitrary bucket in the pool.
Would the idea basically be in that case that we go from OID => WHATEVER => DEVICE LIST without putting too many constraints on what 'WHATEVER' is?
Quoted 2 lines
Okay, I think this makes sense. It means that the pg split becomes somewhat specific to the current hash range approach.
That would be a big part of it, I definitely wouldn't want to commit to everything using the same idea of 'split'.
Quoted 5 lines
Hmm, I think Veronica's helical entanglement codes might actually be a good example application to look at here to see if we're making something flexible enough.
http://dl.acm.org/citation.cfm?id=2718696
I shall take a look at her work, I've heard good things about it. I can certainly see opposing viewpoints, both from the side of not wanting to do extra work without use and not wanting to build foot-guns. I think my main point is that when we're implementing something, if we can make something more flexible without breaking our backs, it's probably better to err on the side of that than to err on the side of keeping users from doing something dangerous.
Signature · 3 lines
Senior Software Engineer Red Hat Storage, Ann Arbor, MI, US
IRC: Aemerson@{RedHat, OFTC, Freenode}
0x80F7544B90EDBFB9 E707 86BA 0C1B 62CC 152C 7C12 80F7 544B 90ED BFB9Quoted 8 lines · Adam C. Emerson
Quoted 8 lines
I think that in those cases, we let them use a wacky object -> PG mapping, and then have a linear/flat PG -> device mapping so they can still get some uniformity.
This isn't completely general, but I'd want to see an example of something it can't express. Maybe those entanglement erasure codes that Veronica was talking about at FAST?
Quoted 6 lines
Quoted 2 lines
Or maybe the key step is to not assume the PG is a hash range, but instead consider it an arbitrary bucket in the pool.
Would the idea basically be in that case that we go from OID => WHATEVER => DEVICE LIST without putting too many constraints on what 'WHATEVER' is?
Yeah, probably with the additional/implicit restriction that the OSD -> WHATEVER mapping is fixed. That way when a policy or topology change happens, we do O(num WHATEVERs) remapping work. It's the O(num objects) part that is really problematic.
(I would say fundamental, but you *could* imagine something where you know the old and new mapping, and try both, or incrementall walk through them.. but, man, it would be ugly. At that point you're probably better of just migrating objects from pool A to pool B.)
sage
Quoted 21 lines · Sage Weil
Quoted 8 lines · Adam C. Emerson
Quoted 8 lines
I think that in those cases, we let them use a wacky object -> PG mapping, and then have a linear/flat PG -> device mapping so they can still get some uniformity.
This isn't completely general, but I'd want to see an example of something it can't express. Maybe those entanglement erasure codes that Veronica was talking about at FAST?
Quoted 6 lines
Quoted 2 lines
Or maybe the key step is to not assume the PG is a hash range, but instead consider it an arbitrary bucket in the pool.
Would the idea basically be in that case that we go from OID => WHATEVER => DEVICE LIST without putting too many constraints on what 'WHATEVER' is?
Yeah, probably with the additional/implicit restriction that the OSD -> WHATEVER mapping is fixed. That way when a policy or topology change happens, we do O(num WHATEVERs) remapping work. It's the O(num objects) part that is really problematic.
Quoted 4 lines
(I would say fundamental, but you *could* imagine something where you know the old and new mapping, and try both, or incrementall walk through them.. but, man, it would be ugly. At that point you're probably better of just migrating objects from pool A to pool B.)
Actually, exactly that is a thing I've blue skied with...somebody...as a more graceful way of dealing with cluster expansions. You could have CRUSH forks/epochs/whatever, and when making drastic changes to your cluster, create a new fork. (eg, we just tripled our storage and want all new data to be on the new servers, but to keep it in the same pool, and not go through a data migration right now.) Then any object access addresses every fork (or maybe you have metadata which knows which fork it was written in) looking for it.
Then you could do things like incrementally merging forks (eg, fork 1 for all objects > hash x, otherwise it has moved to fork 2) to bring them into unison.
I'm not 100% certain this is better than just getting our pg replication easier to work well with, but it has some nice properties (it makes moving a single PG within the cluster easy and gives the admin a lot more control) and, unlike more manual movement (rbd snapshot+copyup) doesn't require intelligent clients, just an intelligent Objecter. On the downside, object fetches suddenly turn into 2 seek IOs instead of 1.
-Greg
Quoted 39 lines · Gregory Farnum
Quoted 21 lines · Sage Weil
Quoted 8 lines · Adam C. Emerson
Quoted 8 lines
I think that in those cases, we let them use a wacky object -> PG mapping, and then have a linear/flat PG -> device mapping so they can still get some uniformity.
This isn't completely general, but I'd want to see an example of something it can't express. Maybe those entanglement erasure codes that Veronica was talking about at FAST?
Quoted 6 lines
Quoted 2 lines
Or maybe the key step is to not assume the PG is a hash range, but instead consider it an arbitrary bucket in the pool.
Would the idea basically be in that case that we go from OID => WHATEVER => DEVICE LIST without putting too many constraints on what 'WHATEVER' is?
Yeah, probably with the additional/implicit restriction that the OSD -> WHATEVER mapping is fixed. That way when a policy or topology change happens, we do O(num WHATEVERs) remapping work. It's the O(num objects) part that is really problematic.
Quoted 4 lines
(I would say fundamental, but you *could* imagine something where you know the old and new mapping, and try both, or incrementall walk through them.. but, man, it would be ugly. At that point you're probably better of just migrating objects from pool A to pool B.)
Actually, exactly that is a thing I've blue skied with...somebody...as a more graceful way of dealing with cluster expansions. You could have CRUSH forks/epochs/whatever, and when making drastic changes to your cluster, create a new fork. (eg, we just tripled our storage and want all new data to be on the new servers, but to keep it in the same pool, and not go through a data migration right now.) Then any object access addresses every fork (or maybe you have metadata which knows which fork it was written in) looking for it.
Then you could do things like incrementally merging forks (eg, fork 1 for all objects > hash x, otherwise it has moved to fork 2) to bring them into unison.
Quoted 7 lines
I'm not 100% certain this is better than just getting our pg replication easier to work well with, but it has some nice properties (it makes moving a single PG within the cluster easy and gives the admin a lot more control) and, unlike more manual movement (rbd snapshot+copyup) doesn't require intelligent clients, just an intelligent Objecter. On the downside, object fetches suddenly turn into 2 seek IOs instead of 1.
Interesting thread. Just wanted to say, as an institution with a couple of fairly large clusters and a few years of operational experience under our belts now, this particular comment of Greg's resonates.
Crush is awesome and elegant, but one of our biggest operational pain-points is managing map changes and their impacts. Our reality is that we impose more map changes on the cluster through standard maintenance and expansion/refresh activity than do failures (even at the ~1000 drive scale), and we'd really like to have some more flexibility around managing those activities.
Signature · 2 lines
Cheers, ~Blairo