Why does Erasure-pool not support omap?
Hi Xingguo,
Quoted 5 lines · On Wed, 25 Oct 2017, [email protected] wrote:
I wonder why erasure-pools can not support omap currently.
The simplest way for erasure-pools to support omap I can figure out would be duplicating omap on every shard.
It is because it consumes too much space when k + m gets bigger?
Right. There isn't a nontrivial way to actually erasure code it, and duplicating on every shard is inefficient.
One reasonableish approach would be to replicate the omap data on m+1 shards. But it's a bit of work to implement and nobody has done it.
I can't remember if there were concerns with this approach or it was just a matter of time/resources... Josh? Greg?
sage
Quoted 9 lines · Sage Weil
Hi Xingguo,
Quoted 5 lines · On Wed, 25 Oct 2017, [email protected] wrote:
I wonder why erasure-pools can not support omap currently.
The simplest way for erasure-pools to support omap I can figure out would be duplicating omap on every shard.
It is because it consumes too much space when k + m gets bigger?
Quoted 8 lines
Right. There isn't a nontrivial way to actually erasure code it, and duplicating on every shard is inefficient.
One reasonableish approach would be to replicate the omap data on m+1 shards. But it's a bit of work to implement and nobody has done it.
I can't remember if there were concerns with this approach or it was just a matter of time/resources... Josh? Greg?
It restricts us to erasure codes like reed-solomon where a subset of shards are always updated. I think this is a reasonable trade-off though, it's just a matter of implementing it. We haven't written up the required peering changes, but they did not seem too difficult to
implement.
Some notes on the approach are here - just think of 'replicating omap' as a partial write to m+1 shards:
Quoted 30 lines · Josh Durgin
Quoted 13 lines · Sage Weil
Hi Xingguo,
Quoted 7 lines · On Wed, 25 Oct 2017, [email protected] wrote:
I wonder why erasure-pools can not support omap currently.
The simplest way for erasure-pools to support omap I can figure
out would be duplicating omap on every shard.It is because it consumes too much space when k + m gets bigger?
Quoted 8 lines
Right. There isn't a nontrivial way to actually erasure code it, and duplicating on every shard is inefficient.
One reasonableish approach would be to replicate the omap data on m+1 shards. But it's a bit of work to implement and nobody has done it.
I can't remember if there were concerns with this approach or it was just a matter of time/resources... Josh? Greg?
It restricts us to erasure codes like reed-solomon where a subset of shards are always updated. I think this is a reasonable trade-off though, it's just a matter of implementing it. We haven't written
up the required peering changes, but they did not seem too difficult to implement.
Quoted 4 lines
Some notes on the approach are here - just think of 'replicating omap' as a partial write to m+1 shards:
Yeah. To expand a bit on why this only works for Reed-Solomon, consider the minimum and appropriate number of copies — and the actual shard placement — for local recovery codes. :/ We were unable to generalize for that (or indeed for SHEC, IIRC) when whiteboarding.
I'm also still nervous that this might do weird things to our recovery and availability patterns in more complex failure cases, but I don't have any concrete issues.
-Greg
Quoted 36 lines · Gregory Farnum
Quoted 30 lines · Josh Durgin
Quoted 13 lines · Sage Weil
Hi Xingguo,
Quoted 7 lines · On Wed, 25 Oct 2017, [email protected] wrote:
I wonder why erasure-pools can not support omap currently.
The simplest way for erasure-pools to support omap I can figure
out would be duplicating omap on every shard.It is because it consumes too much space when k + m gets bigger?
Quoted 8 lines
Right. There isn't a nontrivial way to actually erasure code it, and duplicating on every shard is inefficient.
One reasonableish approach would be to replicate the omap data on m+1 shards. But it's a bit of work to implement and nobody has done it.
I can't remember if there were concerns with this approach or it was just a matter of time/resources... Josh? Greg?
It restricts us to erasure codes like reed-solomon where a subset of shards are always updated. I think this is a reasonable trade-off though, it's just a matter of implementing it. We haven't written
up the required peering changes, but they did not seem too difficult to implement.Quoted 4 lines
Some notes on the approach are here - just think of 'replicating omap' as a partial write to m+1 shards:
Quoted 8 lines
Yeah. To expand a bit on why this only works for Reed-Solomon, consider the minimum and appropriate number of copies — and the actual shard placement — for local recovery codes. :/ We were unable to generalize for that (or indeed for SHEC, IIRC) when whiteboarding.
I'm also still nervous that this might do weird things to our recovery and availability patterns in more complex failure cases, but I don't have any concrete issues.
It seems like the minimum-viable variation of this is that we don't change any of the peering or logging behavior at all, but just send the omap writes to all shards (like any other write), but only the annointed shards persist.
That leaves lots of room for improvement, but it makes the feature work without many changes, and means we can drop the specialness around rbd images in EC pools.
Then we can make CephFS and RGW issue warnings (or even refuse) to use EC pools for their metadata or index pools since it's strictly less efficient than replicated to avoid user mistakes.
?
sage
That sounds like a promising way forward, to me.
Matt
Quoted 62 lines · Sage Weil
Quoted 36 lines · Gregory Farnum
Quoted 30 lines · Josh Durgin
Quoted 13 lines · Sage Weil
Hi Xingguo,
Quoted 7 lines · On Wed, 25 Oct 2017, [email protected] wrote:
I wonder why erasure-pools can not support omap currently.
The simplest way for erasure-pools to support omap I can figure
out would be duplicating omap on every shard.It is because it consumes too much space when k + m gets bigger?
Quoted 8 lines
Right. There isn't a nontrivial way to actually erasure code it, and duplicating on every shard is inefficient.
One reasonableish approach would be to replicate the omap data on m+1 shards. But it's a bit of work to implement and nobody has done it.
I can't remember if there were concerns with this approach or it was just a matter of time/resources... Josh? Greg?
It restricts us to erasure codes like reed-solomon where a subset of shards are always updated. I think this is a reasonable trade-off though, it's just a matter of implementing it. We haven't written
up the required peering changes, but they did not seem too difficult to implement.Quoted 4 lines
Some notes on the approach are here - just think of 'replicating omap' as a partial write to m+1 shards:
Quoted 8 lines
Yeah. To expand a bit on why this only works for Reed-Solomon, consider the minimum and appropriate number of copies — and the actual shard placement — for local recovery codes. :/ We were unable to generalize for that (or indeed for SHEC, IIRC) when whiteboarding.
I'm also still nervous that this might do weird things to our recovery and availability patterns in more complex failure cases, but I don't have any concrete issues.
It seems like the minimum-viable variation of this is that we don't change any of the peering or logging behavior at all, but just send the omap writes to all shards (like any other write), but only the annointed shards persist.
That leaves lots of room for improvement, but it makes the feature work without many changes, and means we can drop the specialness around rbd images in EC pools.
Then we can make CephFS and RGW issue warnings (or even refuse) to use EC pools for their metadata or index pools since it's strictly less efficient than replicated to avoid user mistakes.
?
sage
Signature · 10 lines
Matt Benjamin Red Hat, Inc. 315 West Huron Street, Suite 140A Ann Arbor, Michigan 48103 http://www.redhat.com/en/technologies/storage tel. 734-821-5101 fax. 734-769-8938 cel. 734-216-5309
Quoted 46 lines · Sage Weil
Quoted 36 lines · Gregory Farnum
Quoted 30 lines · Josh Durgin
Quoted 13 lines · Sage Weil
Hi Xingguo,
Quoted 7 lines · On Wed, 25 Oct 2017, [email protected] wrote:
I wonder why erasure-pools can not support omap currently.
The simplest way for erasure-pools to support omap I can figure
out would be duplicating omap on every shard.It is because it consumes too much space when k + m gets bigger?
Quoted 8 lines
Right. There isn't a nontrivial way to actually erasure code it, and duplicating on every shard is inefficient.
One reasonableish approach would be to replicate the omap data on m+1 shards. But it's a bit of work to implement and nobody has done it.
I can't remember if there were concerns with this approach or it was just a matter of time/resources... Josh? Greg?
It restricts us to erasure codes like reed-solomon where a subset of shards are always updated. I think this is a reasonable trade-off though, it's just a matter of implementing it. We haven't written
up the required peering changes, but they did not seem too difficult to implement.Quoted 4 lines
Some notes on the approach are here - just think of 'replicating omap' as a partial write to m+1 shards:
Quoted 8 lines
Yeah. To expand a bit on why this only works for Reed-Solomon, consider the minimum and appropriate number of copies — and the actual shard placement — for local recovery codes. :/ We were unable to generalize for that (or indeed for SHEC, IIRC) when whiteboarding.
I'm also still nervous that this might do weird things to our recovery and availability patterns in more complex failure cases, but I don't have any concrete issues.
Quoted 8 lines
It seems like the minimum-viable variation of this is that we don't change any of the peering or logging behavior at all, but just send the omap writes to all shards (like any other write), but only the annointed shards persist.
That leaves lots of room for improvement, but it makes the feature work without many changes, and means we can drop the specialness around rbd images in EC pools.
Potentially negative since RBD relies heavily on class methods. Assuming the cls_cxx_map_XYZ operations will never require async work, there is still the issue with methods that perform straight read/write calls.
Quoted 7 lines
Then we can make CephFS and RGW issue warnings (or even refuse) to use EC pools for their metadata or index pools since it's strictly less efficient than replicated to avoid user mistakes.
?
sage
Signature · 1 line
Jason
I had the understanding that RGW's use of class methods, which is also extensive, would be compatible with this approach. Is there reason to doubt that?
Matt
Quoted 77 lines · Jason Dillaman
Quoted 46 lines · Sage Weil
Quoted 36 lines · Gregory Farnum
Quoted 30 lines · Josh Durgin
Quoted 13 lines · Sage Weil
Hi Xingguo,
Quoted 7 lines · On Wed, 25 Oct 2017, [email protected] wrote:
I wonder why erasure-pools can not support omap currently.
The simplest way for erasure-pools to support omap I can figure
out would be duplicating omap on every shard.It is because it consumes too much space when k + m gets bigger?
Quoted 8 lines
Right. There isn't a nontrivial way to actually erasure code it, and duplicating on every shard is inefficient.
One reasonableish approach would be to replicate the omap data on m+1 shards. But it's a bit of work to implement and nobody has done it.
I can't remember if there were concerns with this approach or it was just a matter of time/resources... Josh? Greg?
It restricts us to erasure codes like reed-solomon where a subset of shards are always updated. I think this is a reasonable trade-off though, it's just a matter of implementing it. We haven't written
up the required peering changes, but they did not seem too difficult to implement.Quoted 4 lines
Some notes on the approach are here - just think of 'replicating omap' as a partial write to m+1 shards:
Quoted 8 lines
Yeah. To expand a bit on why this only works for Reed-Solomon, consider the minimum and appropriate number of copies — and the actual shard placement — for local recovery codes. :/ We were unable to generalize for that (or indeed for SHEC, IIRC) when whiteboarding.
I'm also still nervous that this might do weird things to our recovery and availability patterns in more complex failure cases, but I don't have any concrete issues.
Quoted 8 lines
It seems like the minimum-viable variation of this is that we don't change any of the peering or logging behavior at all, but just send the omap writes to all shards (like any other write), but only the annointed shards persist.
That leaves lots of room for improvement, but it makes the feature work without many changes, and means we can drop the specialness around rbd images in EC pools.
Potentially negative since RBD relies heavily on class methods. Assuming the
cls_cxx_map_XYZoperations will never require async work, there is still the issue with methods that perform straight read/write calls.Quoted 7 lines
Then we can make CephFS and RGW issue warnings (or even refuse) to use EC pools for their metadata or index pools since it's strictly less efficient than replicated to avoid user mistakes.
?
sage
--
Jason
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 10 lines
Matt Benjamin Red Hat, Inc. 315 West Huron Street, Suite 140A Ann Arbor, Michigan 48103 http://www.redhat.com/en/technologies/storage tel. 734-821-5101 fax. 734-769-8938 cel. 734-216-5309
Quoted 3 lines · Matt Benjamin
I had the understanding that RGW's use of class methods, which is also extensive, would be compatible with this approach. Is there reason to doubt that?
I don't see any "cls_cxx_read" calls in RGW's class methods. Like I said, assuming the omap class object calls remain synchronous on an EC-backed pool, omap won't be an issue for RBD but reads will be an issue (v1 directory, RBD image id objects, and the object map).
Quoted 95 lines
Matt
Quoted 71 lines · Jason Dillaman
Quoted 46 lines · Sage Weil
Quoted 36 lines · Gregory Farnum
Quoted 30 lines · Josh Durgin
Quoted 13 lines · Sage Weil
Hi Xingguo,
Quoted 7 lines · On Wed, 25 Oct 2017, [email protected] wrote:
I wonder why erasure-pools can not support omap currently.
The simplest way for erasure-pools to support omap I can figure
out would be duplicating omap on every shard.It is because it consumes too much space when k + m gets bigger?
Quoted 8 lines
Right. There isn't a nontrivial way to actually erasure code it, and duplicating on every shard is inefficient.
One reasonableish approach would be to replicate the omap data on m+1 shards. But it's a bit of work to implement and nobody has done it.
I can't remember if there were concerns with this approach or it was just a matter of time/resources... Josh? Greg?
It restricts us to erasure codes like reed-solomon where a subset of shards are always updated. I think this is a reasonable trade-off though, it's just a matter of implementing it. We haven't written
up the required peering changes, but they did not seem too difficult to implement.Quoted 4 lines
Some notes on the approach are here - just think of 'replicating omap' as a partial write to m+1 shards:
Quoted 8 lines
Yeah. To expand a bit on why this only works for Reed-Solomon, consider the minimum and appropriate number of copies — and the actual shard placement — for local recovery codes. :/ We were unable to generalize for that (or indeed for SHEC, IIRC) when whiteboarding.
I'm also still nervous that this might do weird things to our recovery and availability patterns in more complex failure cases, but I don't have any concrete issues.
Quoted 8 lines
It seems like the minimum-viable variation of this is that we don't change any of the peering or logging behavior at all, but just send the omap writes to all shards (like any other write), but only the annointed shards persist.
That leaves lots of room for improvement, but it makes the feature work without many changes, and means we can drop the specialness around rbd images in EC pools.
Potentially negative since RBD relies heavily on class methods. Assuming the
cls_cxx_map_XYZoperations will never require async work, there is still the issue with methods that perform straight read/write calls.Quoted 7 lines
Then we can make CephFS and RGW issue warnings (or even refuse) to use EC pools for their metadata or index pools since it's strictly less efficient than replicated to avoid user mistakes.
?
sage
Quoted 6 lines
--
Jason
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html--
Matt Benjamin
Red Hat, Inc.
315 West Huron Street, Suite 140A
Ann Arbor, Michigan 48103http://www.redhat.com/en/technologies/storage
tel. 734-821-5101 fax. 734-769-8938 cel. 734-216-5309
Signature · 1 line
Jason
thanks for the explanation, Jason
Matt
Quoted 110 lines · Jason Dillaman
Quoted 3 lines · Matt Benjamin
I had the understanding that RGW's use of class methods, which is also extensive, would be compatible with this approach. Is there reason to doubt that?
I don't see any "
cls_cxx_read" calls in RGW's class methods. Like I said, assuming the omap class object calls remain synchronous on an EC-backed pool, omap won't be an issue for RBD but reads will be an issue (v1 directory, RBD image id objects, and the object map).Quoted 90 lines
Matt
Quoted 71 lines · Jason Dillaman
Quoted 46 lines · Sage Weil
Quoted 36 lines · Gregory Farnum
Quoted 30 lines · Josh Durgin
Quoted 13 lines · Sage Weil
Hi Xingguo,
Quoted 7 lines · On Wed, 25 Oct 2017, [email protected] wrote:
I wonder why erasure-pools can not support omap currently.
The simplest way for erasure-pools to support omap I can figure
out would be duplicating omap on every shard.It is because it consumes too much space when k + m gets bigger?
Quoted 8 lines
Right. There isn't a nontrivial way to actually erasure code it, and duplicating on every shard is inefficient.
One reasonableish approach would be to replicate the omap data on m+1 shards. But it's a bit of work to implement and nobody has done it.
I can't remember if there were concerns with this approach or it was just a matter of time/resources... Josh? Greg?
It restricts us to erasure codes like reed-solomon where a subset of shards are always updated. I think this is a reasonable trade-off though, it's just a matter of implementing it. We haven't written
up the required peering changes, but they did not seem too difficult to implement.Quoted 4 lines
Some notes on the approach are here - just think of 'replicating omap' as a partial write to m+1 shards:
Quoted 8 lines
Yeah. To expand a bit on why this only works for Reed-Solomon, consider the minimum and appropriate number of copies — and the actual shard placement — for local recovery codes. :/ We were unable to generalize for that (or indeed for SHEC, IIRC) when whiteboarding.
I'm also still nervous that this might do weird things to our recovery and availability patterns in more complex failure cases, but I don't have any concrete issues.
Quoted 8 lines
It seems like the minimum-viable variation of this is that we don't change any of the peering or logging behavior at all, but just send the omap writes to all shards (like any other write), but only the annointed shards persist.
That leaves lots of room for improvement, but it makes the feature work without many changes, and means we can drop the specialness around rbd images in EC pools.
Potentially negative since RBD relies heavily on class methods. Assuming the
cls_cxx_map_XYZoperations will never require async work, there is still the issue with methods that perform straight read/write calls.Quoted 7 lines
Then we can make CephFS and RGW issue warnings (or even refuse) to use EC pools for their metadata or index pools since it's strictly less efficient than replicated to avoid user mistakes.
?
sage
Quoted 6 lines
--
Jason
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html--
Matt Benjamin
Red Hat, Inc.
315 West Huron Street, Suite 140A
Ann Arbor, Michigan 48103Quoted 5 lines
http://www.redhat.com/en/technologies/storage
tel. 734-821-5101 fax. 734-769-8938 cel. 734-216-5309--
Jason
Signature · 10 lines
Matt Benjamin Red Hat, Inc. 315 West Huron Street, Suite 140A Ann Arbor, Michigan 48103 http://www.redhat.com/en/technologies/storage tel. 734-821-5101 fax. 734-769-8938 cel. 734-216-5309
Quoted 52 lines · Jason Dillaman
Quoted 51 lines · Sage Weil
Quoted 36 lines · Gregory Farnum
Quoted 30 lines · Josh Durgin
Quoted 13 lines · Sage Weil
Hi Xingguo,
Quoted 7 lines · On Wed, 25 Oct 2017, [email protected] wrote:
I wonder why erasure-pools can not support omap currently.
The simplest way for erasure-pools to support omap I can figure
out would be duplicating omap on every shard.It is because it consumes too much space when k + m gets bigger?
Quoted 8 lines
Right. There isn't a nontrivial way to actually erasure code it, and duplicating on every shard is inefficient.
One reasonableish approach would be to replicate the omap data on m+1 shards. But it's a bit of work to implement and nobody has done it.
I can't remember if there were concerns with this approach or it was just a matter of time/resources... Josh? Greg?
It restricts us to erasure codes like reed-solomon where a subset of shards are always updated. I think this is a reasonable trade-off though, it's just a matter of implementing it. We haven't written
up the required peering changes, but they did not seem too difficult to implement.Quoted 4 lines
Some notes on the approach are here - just think of 'replicating omap' as a partial write to m+1 shards:
Quoted 8 lines
Yeah. To expand a bit on why this only works for Reed-Solomon, consider the minimum and appropriate number of copies — and the actual shard placement — for local recovery codes. :/ We were unable to generalize for that (or indeed for SHEC, IIRC) when whiteboarding.
I'm also still nervous that this might do weird things to our recovery and availability patterns in more complex failure cases, but I don't have any concrete issues.
It seems like the minimum-viable variation of this is that we don't change any of the peering or logging behavior at all, but just send the omap writes to all shards (like any other write), but only the annointed shards persist.
Quoted 8 lines
Quoted 3 lines
That leaves lots of room for improvement, but it makes the feature work without many changes, and means we can drop the specialness around rbd images in EC pools.
Potentially negative since RBD relies heavily on class methods. Assuming the
cls_cxx_map_XYZoperations will never require async work, there is still the issue with methods that perform straight read/write calls.
Ooooh right, I remember now. This can be avoided most of the time by making the +1 of k+1 be the (normal) primary, but in a degraded situation the primary might be a shard that doesn't have a copy of the omap at all, in which case a simple omap read would need to be async.
...and perhaps this too can be avoided by making the primary role always be one of the k+1 shards that has a copy of the omap data.
I think cls_rgw is in the same boat as cls_rbd, in that it is attr and omap only and doesn't use the object data payload of index objects?
sage
Quoted 46 lines · Sage Weil
Quoted 36 lines · Gregory Farnum
Quoted 30 lines · Josh Durgin
Quoted 13 lines · Sage Weil
Hi Xingguo,
Quoted 7 lines · On Wed, 25 Oct 2017, [email protected] wrote:
I wonder why erasure-pools can not support omap currently.
The simplest way for erasure-pools to support omap I can figure
out would be duplicating omap on every shard.It is because it consumes too much space when k + m gets bigger?
Quoted 8 lines
Right. There isn't a nontrivial way to actually erasure code it, and duplicating on every shard is inefficient.
One reasonableish approach would be to replicate the omap data on m+1 shards. But it's a bit of work to implement and nobody has done it.
I can't remember if there were concerns with this approach or it was just a matter of time/resources... Josh? Greg?
It restricts us to erasure codes like reed-solomon where a subset of shards are always updated. I think this is a reasonable trade-off though, it's just a matter of implementing it. We haven't written
up the required peering changes, but they did not seem too difficult to implement.Quoted 4 lines
Some notes on the approach are here - just think of 'replicating omap' as a partial write to m+1 shards:
Quoted 8 lines
Yeah. To expand a bit on why this only works for Reed-Solomon, consider the minimum and appropriate number of copies — and the actual shard placement — for local recovery codes. :/ We were unable to generalize for that (or indeed for SHEC, IIRC) when whiteboarding.
I'm also still nervous that this might do weird things to our recovery and availability patterns in more complex failure cases, but I don't have any concrete issues.
Quoted 8 lines
It seems like the minimum-viable variation of this is that we don't change any of the peering or logging behavior at all, but just send the omap writes to all shards (like any other write), but only the annointed shards persist.
That leaves lots of room for improvement, but it makes the feature work without many changes, and means we can drop the specialness around rbd images in EC pools.
Won't that still require recovery and read path changes?
Quoted 3 lines
Then we can make CephFS and RGW issue warnings (or even refuse) to use EC pools for their metadata or index pools since it's strictly less efficient than replicated to avoid user mistakes.
If this is only for rbd, we might as well store k+m copies since there's so little omap data.
I agree cephfs and rgw continue to refuse to use EC for metadata, since their omap use gets far to large and is in the data path.
Josh
Quoted 9 lines · Josh Durgin
Quoted 1 line · Sage Weil
If this is only for rbd, we might as well store k+m copies since there's so little omap data.
I agree cephfs and rgw continue to refuse to use EC for metadata, since their omap use gets far to large and is in the data path.
This highlights, but isn't an answer to the problem. What RGW actually has is a split data path, when data is on EC.
Matt
Signature · 10 lines
Matt Benjamin Red Hat, Inc. 315 West Huron Street, Suite 140A Ann Arbor, Michigan 48103 http://www.redhat.com/en/technologies/storage tel. 734-821-5101 fax. 734-769-8938 cel. 734-216-5309
Quoted 53 lines · Josh Durgin
Quoted 51 lines · Sage Weil
Quoted 36 lines · Gregory Farnum
Quoted 30 lines · Josh Durgin
Quoted 13 lines · Sage Weil
Hi Xingguo,
Quoted 7 lines · On Wed, 25 Oct 2017, [email protected] wrote:
I wonder why erasure-pools can not support omap currently.
The simplest way for erasure-pools to support omap I can figure
out would be duplicating omap on every shard.It is because it consumes too much space when k + m gets bigger?
Quoted 8 lines
Right. There isn't a nontrivial way to actually erasure code it, and duplicating on every shard is inefficient.
One reasonableish approach would be to replicate the omap data on m+1 shards. But it's a bit of work to implement and nobody has done it.
I can't remember if there were concerns with this approach or it was just a matter of time/resources... Josh? Greg?
It restricts us to erasure codes like reed-solomon where a subset of shards are always updated. I think this is a reasonable trade-off though, it's just a matter of implementing it. We haven't written
up the required peering changes, but they did not seem too difficult to implement.Quoted 4 lines
Some notes on the approach are here - just think of 'replicating omap' as a partial write to m+1 shards:
Quoted 8 lines
Yeah. To expand a bit on why this only works for Reed-Solomon, consider the minimum and appropriate number of copies — and the actual shard placement — for local recovery codes. :/ We were unable to generalize for that (or indeed for SHEC, IIRC) when whiteboarding.
I'm also still nervous that this might do weird things to our recovery and availability patterns in more complex failure cases, but I don't have any concrete issues.
It seems like the minimum-viable variation of this is that we don't change any of the peering or logging behavior at all, but just send the omap writes to all shards (like any other write), but only the annointed shards persist.
Quoted 5 lines
Quoted 3 lines
That leaves lots of room for improvement, but it makes the feature work without many changes, and means we can drop the specialness around rbd images in EC pools.
Won't that still require recovery and read path changes?
I also don't understand at all how this would work. Can you expand, Sage? -Greg
Quoted 54 lines · Gregory Farnum
Quoted 53 lines · Josh Durgin
Quoted 51 lines · Sage Weil
Quoted 36 lines · Gregory Farnum
Quoted 30 lines · Josh Durgin
Quoted 13 lines · Sage Weil
Hi Xingguo,
Quoted 7 lines · On Wed, 25 Oct 2017, [email protected] wrote:
I wonder why erasure-pools can not support omap currently.
The simplest way for erasure-pools to support omap I can figure
out would be duplicating omap on every shard.It is because it consumes too much space when k + m gets bigger?
Quoted 8 lines
Right. There isn't a nontrivial way to actually erasure code it, and duplicating on every shard is inefficient.
One reasonableish approach would be to replicate the omap data on m+1 shards. But it's a bit of work to implement and nobody has done it.
I can't remember if there were concerns with this approach or it was just a matter of time/resources... Josh? Greg?
It restricts us to erasure codes like reed-solomon where a subset of shards are always updated. I think this is a reasonable trade-off though, it's just a matter of implementing it. We haven't written
up the required peering changes, but they did not seem too difficult to implement.Quoted 4 lines
Some notes on the approach are here - just think of 'replicating omap' as a partial write to m+1 shards:
Quoted 8 lines
Yeah. To expand a bit on why this only works for Reed-Solomon, consider the minimum and appropriate number of copies — and the actual shard placement — for local recovery codes. :/ We were unable to generalize for that (or indeed for SHEC, IIRC) when whiteboarding.
I'm also still nervous that this might do weird things to our recovery and availability patterns in more complex failure cases, but I don't have any concrete issues.
It seems like the minimum-viable variation of this is that we don't change any of the peering or logging behavior at all, but just send the omap writes to all shards (like any other write), but only the annointed shards persist.
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
That leaves lots of room for improvement, but it makes the feature work without many changes, and means we can drop the specialness around rbd images in EC pools.
Won't that still require recovery and read path changes?
I also don't understand at all how this would work. Can you expand, Sage?
On write, the ECTransaction collects the omap operation. We either send it to all shards or slide just the omap key/value data for shard_id > k. For shard_id <= k, we write the omap data to the local object. We still send the write op to all shards with attrs and pg log entries.
We take care to always select the first acting shard as the primary, which will ensure a shard_id <= k if we go active, such that cls operations and omap reads can be handled locally.
Hmm, I think the problem is with rollback, though. IIRC the code is structured around rollback and not rollforward, and omap writes are blind.
So, not trivial, but it doesn't require any of the stuff we were talking about before where we'd only send writes to a subset of shards and have incomplete pg logs on each shard.
sage
Quoted 74 lines · Sage Weil
Quoted 54 lines · Gregory Farnum
Quoted 53 lines · Josh Durgin
Quoted 51 lines · Sage Weil
Quoted 36 lines · Gregory Farnum
Quoted 30 lines · Josh Durgin
Quoted 13 lines · Sage Weil
Hi Xingguo,
Quoted 7 lines · On Wed, 25 Oct 2017, [email protected] wrote:
I wonder why erasure-pools can not support omap currently.
The simplest way for erasure-pools to support omap I can figure
out would be duplicating omap on every shard.It is because it consumes too much space when k + m gets bigger?
Quoted 8 lines
Right. There isn't a nontrivial way to actually erasure code it, and duplicating on every shard is inefficient.
One reasonableish approach would be to replicate the omap data on m+1 shards. But it's a bit of work to implement and nobody has done it.
I can't remember if there were concerns with this approach or it was just a matter of time/resources... Josh? Greg?
It restricts us to erasure codes like reed-solomon where a subset of shards are always updated. I think this is a reasonable trade-off though, it's just a matter of implementing it. We haven't written
up the required peering changes, but they did not seem too difficult to implement.Quoted 4 lines
Some notes on the approach are here - just think of 'replicating omap' as a partial write to m+1 shards:
Quoted 8 lines
Yeah. To expand a bit on why this only works for Reed-Solomon, consider the minimum and appropriate number of copies — and the actual shard placement — for local recovery codes. :/ We were unable to generalize for that (or indeed for SHEC, IIRC) when whiteboarding.
I'm also still nervous that this might do weird things to our recovery and availability patterns in more complex failure cases, but I don't have any concrete issues.
It seems like the minimum-viable variation of this is that we don't change any of the peering or logging behavior at all, but just send the omap writes to all shards (like any other write), but only the annointed shards persist.
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
That leaves lots of room for improvement, but it makes the feature work without many changes, and means we can drop the specialness around rbd images in EC pools.
Won't that still require recovery and read path changes?
I also don't understand at all how this would work. Can you expand, Sage?
On write, the ECTransaction collects the omap operation. We either send it to all shards or slide just the omap key/value data for
shard_id> k. Forshard_id<= k, we write the omap data to the local object. We still send the write op to all shards with attrs and pg log entries.We take care to always select the first acting shard as the primary, which will ensure a
shard_id<= k if we go active, such that cls operations and omap reads can be handled locally.
Quoted 6 lines
Hmm, I think the problem is with rollback, though. IIRC the code is structured around rollback and not rollforward, and omap writes are blind.
So, not trivial, but it doesn't require any of the stuff we were talking about before where we'd only send writes to a subset of shards and have incomplete pg logs on each shard.
Okay, so by "don't change any of the peering or logging behavior at all", you meant we didn't have to do any of the stuff that starts accounting for differing pg versions on each shard's object. But of course we still need to make a number of changes to the peering and recovery code so we select the right shards.
We *could* do that, but it seems like another of the "sorta there" features we end up regretting. I guess the apparent hurry to get it in before other EC pool enhancements are ready is to avoid the rbd header pool? How much effort does that actually save? (Even the minimal peering+recovery changes here will take a fair bit of doing and a lot of QA qualification.)
-Greg