Erasure coding library API
Hi,
Today Sam pointed out that the API for LRC ( Xorbas Hadoop Project Page, Locally Repairable Codes (LRC) http://smahesh.com/HadoopUSC/ for instance ) would need to be different from the one initialy proposed:
context(k, m, reed-solomon|...) => context* c
encode(context* c, void* data) => void* chunks[k+m]
decode(context* c, void* chunk[k+m], int* indices_of_erased_chunks) => void* data // erased chunks are
not used
repair(context* c, void* chunk[k+m], int* indices_of_erased_chunks) => void* chunks[k+m] // erased
chunks are rebuilt
The decode function must allow for partial read:
decode(context* c, int offset, int length, void* chunk[k+m], int* indices_of_erased_chunks, int* missing_chunks) => void* data
If there are not enough chunks to recover the desired data range [offset, offset+length) the function returns NULL and sets missing_chunks to the list of chunks that must be retrieved in order to be able to read the desired data.
If decode is called to read just 1 chunk and it is missing, reed-solomon would return on error and ask for all other chunks to repair. If the underlying library implements LRC, it would ask for a subset of the chunks.
An implementation allowing only full reads and using jerasure ( which does not do LRC ) requires that offset is always zero, length is the size of the object and returns a copy of indices_of_erased_chunks if there are not enough chunks to rebuild the missing ones.
Comments are welcome :-)
Signature · 2 lines
Loïc Dachary, Artisan Logiciel Libre All that is necessary for the triumph of evil is that good people do nothing.
Quoted 3 lines · Loic Dachary
Hi,
Today Sam pointed out that the API for LRC ( Xorbas Hadoop Project Page, Locally Repairable Codes (LRC) http://smahesh.com/HadoopUSC/ for instance ) would need to be different from the one initialy proposed:
An interesting video. Not as entertaining as Jim Plank's video. ;-)
While Plank's focused on the processor requirements for encoding/decoding, this video focuses on the network and disk I/O requirements.
Quoted 11 lines
context(k, m, reed-solomon|...)=> context* c
encode(context* c, void* data)=> void* chunks[k+m]
decode(context* c, void* chunk[k+m], int* indices_of_erased_chunks)=> void* data // erased chunks are
not used
repair(context* c, void* chunk[k+m], int* indices_of_erased_chunks)=> void* chunks[k+m] // erased
chunks are rebuiltThe decode function must allow for partial read:
decode(context* c, int offset, int length, void* chunk[k+m], int*
indices_of_erased_chunks, int*missing_chunks) => void* data
Quoted 7 lines
If there are not enough chunks to recover the desired data range [offset, offset+length) the function returns NULL and sets
missing_chunksto the list of chunks that must be retrieved in order to be able to read the desired data.If decode is called to read just 1 chunk and it is missing, reed-solomon would return on error and ask for all other chunks to repair. If the underlying library implements LRC, it would ask for a subset of the chunks.
An implementation allowing only full reads and using jerasure ( which does not do LRC ) requires that offset is always zero, length is the size of the object and returns a copy of
indices_of_erased_chunksif there are not enough chunks to rebuild the missing ones.Comments are welcome :-)
I have loosely followed this discussion and I have not looked closely at the proposed API nor at the jerasure interface. My apologies if this has already been addressed.
It is not clear to me from the above proposed API (ignoring the partial read) what it would do. Was the original intent to encode the entire file using k+m blocks irregardless of the file size and of the rados object size?
If so, how will you map rados objects to the logical k+m objects and vice versa?
If not, then the initial API needed an offset and length (either logical or rados object).
I would assume that you would want to operate on rados sized objects. Given a fixed k+m, then you may have more than one set of k+m objects per file. This is ignoring the LRC "local" parity blocks. For example, if the rados object size if 1 MB and k = 10 and m = 4 (as in the Xorbas video), then for a 20 MB file one would need two sets of encoding blocks. The first for objects 1-10 and the second for objects 11-20.
Perhaps, this is what the context is above. If so, it should have the logical offset and rados object size, no?
I see value in the Xorbas concept and I wonder if the jerasure library can be modified to generate the local parity blocks such that they can be used to generate the global parity blocks. That would be a question for Jim Plank.
Scott
Quoted 35 lines · Scott
Quoted 3 lines · Loic Dachary
Hi,
Today Sam pointed out that the API for LRC ( Xorbas Hadoop Project Page, Locally Repairable Codes (LRC) http://smahesh.com/HadoopUSC/ for instance ) would need to be different from the one initialy proposed:
An interesting video. Not as entertaining as Jim Plank's video. ;-)
While Plank's focused on the processor requirements for encoding/decoding, this video focuses on the network and disk I/O requirements.
Quoted 11 lines
context(k, m, reed-solomon|...)=> context* c
encode(context* c, void* data)=> void* chunks[k+m]
decode(context* c, void* chunk[k+m], int* indices_of_erased_chunks)=> void* data // erased chunks are
not used
repair(context* c, void* chunk[k+m], int* indices_of_erased_chunks)=> void* chunks[k+m] // erased
chunks are rebuiltThe decode function must allow for partial read:
decode(context* c, int offset, int length, void* chunk[k+m], int*
indices_of_erased_chunks, int*missing_chunks) => void* dataQuoted 7 lines
If there are not enough chunks to recover the desired data range [offset, offset+length) the function returns NULL and sets
missing_chunksto the list of chunks that must be retrieved in order to be able to read the desired data.If decode is called to read just 1 chunk and it is missing, reed-solomon would return on error and ask for all other chunks to repair. If the underlying library implements LRC, it would ask for a subset of the chunks.
An implementation allowing only full reads and using jerasure ( which does not do LRC ) requires that offset is always zero, length is the size of the object and returns a copy of
indices_of_erased_chunksif there are not enough chunks to rebuild the missing ones.Comments are welcome :-)
I have loosely followed this discussion and I have not looked closely at the proposed API nor at the jerasure interface. My apologies if this has already been addressed.
It is not clear to me from the above proposed API (ignoring the partial read) what it would do. Was the original intent to encode the entire file using k+m blocks irregardless of the file size and of the rados object size?
If so, how will you map rados objects to the logical k+m objects and vice versa?
Quoted 7 lines
If not, then the initial API needed an offset and length (either logical or rados object).
I would assume that you would want to operate on rados sized objects. Given a fixed k+m, then you may have more than one set of k+m objects per file. This is ignoring the LRC "local" parity blocks. For example, if the rados object size if 1 MB and k = 10 and m = 4 (as in the Xorbas video), then for a 20 MB file one would need two sets of encoding blocks. The first for objects 1-10 and the second for objects 11-20.
Perhaps, this is what the context is above. If so, it should have the logical offset and rados object size, no?
I see value in the Xorbas concept and I wonder if the jerasure library can be modified to generate the local parity blocks such that they can be used to generate the global parity blocks. That would be a question for Jim Plank.
The benefits of the Xorbas concept is reduced network and disk I/O for failures while maintaining traditional RS's higher fault-tolerance than 3x replication while using less space.
You can do almost the same thing with jerasure without modifying it at all. Using the values from the Xorbas video, they have k data blocks, m global parity blocks, and 2 local parity blocks (generated from k/2 data blocks) for a total of k+m+2 blocks on disk that can tolerate any m failures. In their example, k = 10 and m = 4. They store 16 blocks for each 10 data blocks.
If you use traditional RS encoding via jerasure and used the same amount of storage (16 blocks for each 10 data blocks), you could encode 3 parity blocks for each 5 data blocks. This would consume 16 data blocks for each 10 data blocks and the fault-tolerance would be variable from 3-6 failures depending on how the failures fell between the two groups of 5 blocks which is higher than the static 4 failures for the Xorbas code. The I/O to recover from a single failure for both schemes is 5 blocks so it is as efficient as Xorbas. On average, it provides more fault-tolerance, but it can be less (four failures from one group of 5 data + 3 parity blocks), but that worst case is the same as 3x replication.
Scott
I think we should be able to cover most cases by adding an interface like:
set<int> minimum_to_read(const set<int> &want_to_read, const set<int> &available_chunks);
which returns the smallest set required to read/rebuild the chunks in want_to_read given the chunks in available_chunks. Alternately, we might include a "cost" for reading each chunk like
set<int> minimum_to_read_with_cost(const set<int> &want_to_read, const map<int, int> &available)
which returns the minimum cost set required to read the specified chunks given a mapping of available chunks to costs. The costs might allow us to consider the difference between reading local chunks vs remote chunks. This should be sufficient to cover the read case (esp the degraded read case) and the repair case.
-Sam
Quoted 55 lines · Scott
Quoted 35 lines · Scott
Quoted 3 lines · Loic Dachary
Hi,
Today Sam pointed out that the API for LRC ( Xorbas Hadoop Project Page, Locally Repairable Codes (LRC) http://smahesh.com/HadoopUSC/ for instance ) would need to be different from the one initialy proposed:
An interesting video. Not as entertaining as Jim Plank's video. ;-)
While Plank's focused on the processor requirements for encoding/decoding, this video focuses on the network and disk I/O requirements.
Quoted 11 lines
context(k, m, reed-solomon|...)=> context* c
encode(context* c, void* data)=> void* chunks[k+m]
decode(context* c, void* chunk[k+m], int* indices_of_erased_chunks)=> void* data // erased chunks are
not used
repair(context* c, void* chunk[k+m], int* indices_of_erased_chunks)=> void* chunks[k+m] // erased
chunks are rebuiltThe decode function must allow for partial read:
decode(context* c, int offset, int length, void* chunk[k+m], int*
indices_of_erased_chunks, int*missing_chunks) => void* dataQuoted 7 lines
If there are not enough chunks to recover the desired data range [offset, offset+length) the function returns NULL and sets
missing_chunksto the list of chunks that must be retrieved in order to be able to read the desired data.If decode is called to read just 1 chunk and it is missing, reed-solomon would return on error and ask for all other chunks to repair. If the underlying library implements LRC, it would ask for a subset of the chunks.
An implementation allowing only full reads and using jerasure ( which does not do LRC ) requires that offset is always zero, length is the size of the object and returns a copy of
indices_of_erased_chunksif there are not enough chunks to rebuild the missing ones.Comments are welcome :-)
I have loosely followed this discussion and I have not looked closely at the proposed API nor at the jerasure interface. My apologies if this has already been addressed.
It is not clear to me from the above proposed API (ignoring the partial read) what it would do. Was the original intent to encode the entire file using k+m blocks irregardless of the file size and of the rados object size?
If so, how will you map rados objects to the logical k+m objects and vice versa?
Quoted 7 lines
If not, then the initial API needed an offset and length (either logical or rados object).
I would assume that you would want to operate on rados sized objects. Given a fixed k+m, then you may have more than one set of k+m objects per file. This is ignoring the LRC "local" parity blocks. For example, if the rados object size if 1 MB and k = 10 and m = 4 (as in the Xorbas video), then for a 20 MB file one would need two sets of encoding blocks. The first for objects 1-10 and the second for objects 11-20.
Perhaps, this is what the context is above. If so, it should have the logical offset and rados object size, no?
I see value in the Xorbas concept and I wonder if the jerasure library can be modified to generate the local parity blocks such that they can be used to generate the global parity blocks. That would be a question for Jim Plank.
The benefits of the Xorbas concept is reduced network and disk I/O for failures while maintaining traditional RS's higher fault-tolerance than 3x replication while using less space.
You can do almost the same thing with jerasure without modifying it at all. Using the values from the Xorbas video, they have k data blocks, m global parity blocks, and 2 local parity blocks (generated from k/2 data blocks) for a total of k+m+2 blocks on disk that can tolerate any m failures. In their example, k = 10 and m = 4. They store 16 blocks for each 10 data blocks.
If you use traditional RS encoding via jerasure and used the same amount of storage (16 blocks for each 10 data blocks), you could encode 3 parity blocks for each 5 data blocks. This would consume 16 data blocks for each 10 data blocks and the fault-tolerance would be variable from 3-6 failures depending on how the failures fell between the two groups of 5 blocks which is higher than the static 4 failures for the Xorbas code. The I/O to recover from a single failure for both schemes is 5 blocks so it is as efficient as Xorbas. On average, it provides more fault-tolerance, but it can be less (four failures from one group of 5 data + 3 parity blocks), but that worst case is the same as 3x replication.
Scott--
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
Scott,
You make a good point comparing (5/3) RS with Xorbas, but a small nit:
"The I/O to recover from a single failure for both schemes is 5 blocks so it is as efficient as Xorbas."
Maybe not. You would probably issue I/O to all the remaining 7 blocks to cover for the possibility of double errors. The time to reconstruct would be about the same, but there could be more disk and network I/O. (LRC will need to issue I/O to the rest of the global stripe if it detected multiple local errors.)
What I like about Xorbas is that it is an extension of a (x,y) RS. You can start with traditional RS. If degraded reads and repaired blocks are causing a problem, you can add the LRC. If capacity is an issue, you can take it out.
Best,
Paul
Quoted 128 lines · Samuel Just
I think we should be able to cover most cases by adding an interface like:
set<int>
minimum_to_read(const set<int> &want_to_read, const set<int> &available_chunks);which returns the smallest set required to read/rebuild the chunks in
want_to_readgiven the chunks inavailable_chunks. Alternately, we might include a "cost" for reading each chunk likeset<int>
minimum_to_read_with_cost(const set<int> &want_to_read, const map<int, int> &available)which returns the minimum cost set required to read the specified chunks given a mapping of available chunks to costs. The costs might allow us to consider the difference between reading local chunks vs remote chunks. This should be sufficient to cover the read case (esp the degraded read case) and the repair case.
-SamQuoted 1 line · Scott
On Jul 2, 2013, at 10:07 AM, "Atchley, Scott" <[email protected]>
Quoted 6 lines · wrote:
Quoted 6 lines · Loic Dachary
Quoted 4 lines
Hi,
Today Sam pointed out that the API for LRC ( Xorbas Hadoop Project
Page, Locally Repairable Codes (LRC) http://smahesh.com/HadoopUSC/ for instance ) would need to be different from the one initialy proposed:
Quoted 4 lines
Quoted 4 lines
An interesting video. Not as entertaining as Jim Plank's video. ;-)
While Plank's focused on the processor requirements for
encoding/decoding, this video focuses on the network and disk I/O requirements.
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
context(k, m, reed-solomon|...)=> context* cencode(context* c, void* data)=> void* chunks[k+m] decode(context* c, void* chunk[k+m], int*indices_of_erased_chunks) => void* data // erased chunks are not used
repair(context* c, void* chunk[k+m], int*indices_of_erased_chunks) => void* chunks[k+m] // erased chunks are rebuiltQuoted 6 lines
Quoted 6 lines
Quoted 6 lines
The decode function must allow for partial read:
decode(context* c, int offset, int length, void* chunk[k+m], int*
indices_of_erased_chunks, int*missing_chunks) => void* dataIf there are not enough chunks to recover the desired data range
[offset, offset+length) the function returns NULL and sets
missing_chunksto the list of chunks that must be retrieved in order to be able to read the desired data.Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
If decode is called to read just 1 chunk and it is missing, reed-
solomon would return on error and ask for all other chunks to repair. If the underlying library implements LRC, it would ask for a subset of the chunks.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
An implementation allowing only full reads and using jerasure ( which
does not do LRC ) requires that offset is always zero, length is the size of the object and returns a copy of
indices_of_erased_chunksif there are not enough chunks to rebuild the missing ones.Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
Comments are welcome :-)
I have loosely followed this discussion and I have not looked closely
at the proposed API nor at the jerasure interface. My apologies if this has already been addressed.
Quoted 2 lines
Quoted 2 lines
It is not clear to me from the above proposed API (ignoring the partial
read) what it would do. Was the original intent to encode the entire file using k+m blocks irregardless of the file size and of the rados object size?
Quoted 2 lines
Quoted 2 lines
If so, how will you map rados objects to the logical k+m objects and
vice versa?
Quoted 2 lines
Quoted 2 lines
If not, then the initial API needed an offset and length (either
logical or rados object).
Quoted 2 lines
Quoted 2 lines
I would assume that you would want to operate on rados sized objects.
Given a fixed k+m, then you may have more than one set of k+m objects per file. This is ignoring the LRC "local" parity blocks. For example, if the rados object size if 1 MB and k = 10 and m = 4 (as in the Xorbas video), then for a 20 MB file one would need two sets of encoding blocks. The first for objects 1-10 and the second for objects 11-20.
Quoted 2 lines
Quoted 2 lines
Perhaps, this is what the context is above. If so, it should have the
logical offset and rados object size, no?
Quoted 2 lines
Quoted 2 lines
I see value in the Xorbas concept and I wonder if the jerasure library
can be modified to generate the local parity blocks such that they can be used to generate the global parity blocks. That would be a question for Jim Plank.
Quoted 2 lines
The benefits of the Xorbas concept is reduced network and disk I/O for
failures while maintaining traditional RS's higher fault-tolerance than 3x replication while using less space.
Quoted 2 lines
You can do almost the same thing with jerasure without modifying it at
all. Using the values from the Xorbas video, they have k data blocks, m global parity blocks, and 2 local parity blocks (generated from k/2 data blocks) for a total of k+m+2 blocks on disk that can tolerate any m failures. In their example, k = 10 and m = 4. They store 16 blocks for each 10 data blocks.
Quoted 2 lines
If you use traditional RS encoding via jerasure and used the same amount
of storage (16 blocks for each 10 data blocks), you could encode 3 parity blocks for each 5 data blocks. This would consume 16 data blocks for each 10 data blocks and the fault-tolerance would be variable from 3-6 failures depending on how the failures fell between the two groups of 5 blocks which is higher than the static 4 failures for the Xorbas code. The I/O to recover from a single failure for both schemes is 5 blocks so it is as efficient as Xorbas. On average, it provides more fault-tolerance, but it can be less (four failures from one group of 5 data + 3 parity blocks), but that worst case is the same as 3x replication.
Quoted 5 lines
Scott--
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--
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
Quoted 7 lines · Paul Von-Stamwitz
Scott,
You make a good point comparing (5/3) RS with Xorbas, but a small nit:
"The I/O to recover from a single failure for both schemes is 5 blocks so it is as efficient as Xorbas."
Maybe not. You would probably issue I/O to all the remaining 7 blocks to cover for the possibility of double errors. The time to reconstruct would be about the same, but there could be more disk and network I/O. (LRC will need to issue I/O to the rest of the global stripe if it detected multiple local errors.)
Why would you request more than five? If one cannot be read, request another.
Also, I am not sure that you want to request five at once since it will lead to spikes in network traffic and require memory for all five blocks. You will need at least two buffers. Request the first two and start the decoding. You may want a third buffer to overlap the decoding of the current block with the communication for the next block. It may be that the decode time is less than the communication and, in that case, you will want to request all of the blocks at once.
Quoted 1 line
What I like about Xorbas is that it is an extension of a (x,y) RS. You can start with traditional RS. If degraded reads and repaired blocks are causing a problem, you can add the LRC. If capacity is an issue, you can take it out.
I like it too and Microsoft has something similar with Pyramid codes. That said, my example using traditional RS can provide more fault-tolerance on average given the same amount of storage overhead.
Quoted 133 lines
Best,
PaulQuoted 128 lines · Samuel Just
I think we should be able to cover most cases by adding an interface like:
set<int>
minimum_to_read(const set<int> &want_to_read, const set<int> &available_chunks);which returns the smallest set required to read/rebuild the chunks in
want_to_readgiven the chunks inavailable_chunks. Alternately, we might include a "cost" for reading each chunk likeset<int>
minimum_to_read_with_cost(const set<int> &want_to_read, const map<int, int> &available)which returns the minimum cost set required to read the specified chunks given a mapping of available chunks to costs. The costs might allow us to consider the difference between reading local chunks vs remote chunks. This should be sufficient to cover the read case (esp the degraded read case) and the repair case.
-SamQuoted 1 line · Scott
On Jul 2, 2013, at 10:07 AM, "Atchley, Scott" <[email protected]>
Quoted 6 lines · wrote:
Quoted 6 lines · Loic Dachary
Quoted 4 lines
Hi,
Today Sam pointed out that the API for LRC ( Xorbas Hadoop Project
Page, Locally Repairable Codes (LRC) http://smahesh.com/HadoopUSC/ for instance ) would need to be different from the one initialy proposed:
Quoted 4 lines
Quoted 4 lines
An interesting video. Not as entertaining as Jim Plank's video. ;-)
While Plank's focused on the processor requirements for
encoding/decoding, this video focuses on the network and disk I/O requirements.
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
context(k, m, reed-solomon|...)=> context* cencode(context* c, void* data)=> void* chunks[k+m] decode(context* c, void* chunk[k+m], int*indices_of_erased_chunks) => void* data // erased chunks are not used
repair(context* c, void* chunk[k+m], int*indices_of_erased_chunks) => void* chunks[k+m] // erased chunks are rebuiltQuoted 6 lines
Quoted 6 lines
Quoted 6 lines
The decode function must allow for partial read:
decode(context* c, int offset, int length, void* chunk[k+m], int*
indices_of_erased_chunks, int*missing_chunks) => void* dataIf there are not enough chunks to recover the desired data range
[offset, offset+length) the function returns NULL and sets
missing_chunksto the list of chunks that must be retrieved in order to be able to read the desired data.Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
If decode is called to read just 1 chunk and it is missing, reed-
solomon would return on error and ask for all other chunks to repair. If the underlying library implements LRC, it would ask for a subset of the chunks.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
An implementation allowing only full reads and using jerasure ( which
does not do LRC ) requires that offset is always zero, length is the size of the object and returns a copy of
indices_of_erased_chunksif there are not enough chunks to rebuild the missing ones.Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
Comments are welcome :-)
I have loosely followed this discussion and I have not looked closely
at the proposed API nor at the jerasure interface. My apologies if this has already been addressed.
Quoted 2 lines
Quoted 2 lines
It is not clear to me from the above proposed API (ignoring the partial
read) what it would do. Was the original intent to encode the entire file using k+m blocks irregardless of the file size and of the rados object size?
Quoted 2 lines
Quoted 2 lines
If so, how will you map rados objects to the logical k+m objects and
vice versa?
Quoted 2 lines
Quoted 2 lines
If not, then the initial API needed an offset and length (either
logical or rados object).
Quoted 2 lines
Quoted 2 lines
I would assume that you would want to operate on rados sized objects.
Given a fixed k+m, then you may have more than one set of k+m objects per file. This is ignoring the LRC "local" parity blocks. For example, if the rados object size if 1 MB and k = 10 and m = 4 (as in the Xorbas video), then for a 20 MB file one would need two sets of encoding blocks. The first for objects 1-10 and the second for objects 11-20.
Quoted 2 lines
Quoted 2 lines
Perhaps, this is what the context is above. If so, it should have the
logical offset and rados object size, no?
Quoted 2 lines
Quoted 2 lines
I see value in the Xorbas concept and I wonder if the jerasure library
can be modified to generate the local parity blocks such that they can be used to generate the global parity blocks. That would be a question for Jim Plank.
Quoted 2 lines
The benefits of the Xorbas concept is reduced network and disk I/O for
failures while maintaining traditional RS's higher fault-tolerance than 3x replication while using less space.
Quoted 2 lines
You can do almost the same thing with jerasure without modifying it at
all. Using the values from the Xorbas video, they have k data blocks, m global parity blocks, and 2 local parity blocks (generated from k/2 data blocks) for a total of k+m+2 blocks on disk that can tolerate any m failures. In their example, k = 10 and m = 4. They store 16 blocks for each 10 data blocks.
Quoted 2 lines
If you use traditional RS encoding via jerasure and used the same amount
of storage (16 blocks for each 10 data blocks), you could encode 3 parity blocks for each 5 data blocks. This would consume 16 data blocks for each 10 data blocks and the fault-tolerance would be variable from 3-6 failures depending on how the failures fell between the two groups of 5 blocks which is higher than the static 4 failures for the Xorbas code. The I/O to recover from a single failure for both schemes is 5 blocks so it is as efficient as Xorbas. On average, it provides more fault-tolerance, but it can be less (four failures from one group of 5 data + 3 parity blocks), but that worst case is the same as 3x replication.
Quoted 5 lines
Scott--
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--
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
Hi Scott,
Point taken.
I was thinking about Loic's decode description where k+m was requested and data was decoded when k blocks were received. But he was referring to full stripe reads where all the memory is allocated.
Degraded reads and block repair are a different matter.
pvs
Quoted 203 lines
-----Original Message-----
From: Atchley, Scott [mailto:[email protected]]
Sent: Wednesday, July 03, 2013 4:53 AM
To: Paul Von-Stamwitz
Cc: Samuel Just; Loic Dachary; Ceph Development
Subject: Re: Erasure coding library APIQuoted 5 lines · Paul Von-Stamwitz
Scott,
You make a good point comparing (5/3) RS with Xorbas, but a small nit:
"The I/O to recover from a single failure for both schemes is 5 blocks
so it is as efficient as Xorbas."
Quoted 2 lines
Maybe not. You would probably issue I/O to all the remaining 7 blocks to
cover for the possibility of double errors. The time to reconstruct would be about the same, but there could be more disk and network I/O. (LRC will need to issue I/O to the rest of the global stripe if it detected multiple local errors.)
Why would you request more than five? If one cannot be read, request another.
Also, I am not sure that you want to request five at once since it will lead to spikes in network traffic and require memory for all five blocks. You will need at least two buffers. Request the first two and start the decoding. You may want a third buffer to overlap the decoding of the current block with the communication for the next block. It may be that the decode time is less than the communication and, in that case, you will want to request all of the blocks at once.
Quoted 1 line
What I like about Xorbas is that it is an extension of a (x,y) RS. You
can start with traditional RS. If degraded reads and repaired blocks are causing a problem, you can add the LRC. If capacity is an issue, you can take it out.
I like it too and Microsoft has something similar with Pyramid codes. That said, my example using traditional RS can provide more fault-tolerance on average given the same amount of storage overhead.
Quoted 6 lines
Best,
PaulQuoted 1 line · Samuel Just
I think we should be able to cover most cases by adding an interface
like:
Quoted 6 lines
Quoted 6 lines
set<int>
minimum_to_read(const set<int> &want_to_read, const set<int> &available_chunks);which returns the smallest set required to read/rebuild the chunks in
want_to_readgiven the chunks inavailable_chunks. Alternately, wemight
Quoted 6 lines
Quoted 6 lines
include a "cost" for reading each chunk like
set<int>
minimum_to_read_with_cost(const set<int> &want_to_read, const map<int, int> &available)which returns the minimum cost set required to read the specified
chunks
Quoted 1 line
Quoted 1 line
given a mapping of available chunks to costs. The costs might allow us
to
Quoted 20 lines
Quoted 20 lines
consider the difference between reading local chunks vs remote chunks. This should be sufficient to cover the read case (esp the degraded read case) and the repair case.
-SamQuoted 1 line · Scott
On Jul 2, 2013, at 10:07 AM, "Atchley, Scott" <[email protected]>
Quoted 6 lines · wrote:
Quoted 6 lines · Loic Dachary
Quoted 4 lines
Hi,
Today Sam pointed out that the API for LRC ( Xorbas Hadoop Project
Page, Locally Repairable Codes (LRC) http://smahesh.com/HadoopUSC/ for instance ) would need to be different from the one initialy proposed:
Quoted 3 lines
Quoted 3 lines
An interesting video. Not as entertaining as Jim Plank's video. ;-)
Quoted 8 lines
Quoted 8 lines
Quoted 1 line
Quoted 1 line
While Plank's focused on the processor requirements for
encoding/decoding, this video focuses on the network and disk I/O requirements.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
context(k, m, reed-solomon|...)=> context* cencode(context* c, void* data)=> void* chunks[k+m] decode(context* c, void* chunk[k+m], int*indices_of_erased_chunks) => void* data // erased chunks are notused
Quoted 11 lines
Quoted 11 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
repair(context* c, void* chunk[k+m], int*
indices_of_erased_chunks) => void* chunks[k+m] // erased chunks are rebuiltThe decode function must allow for partial read:
decode(context* c, int offset, int length, void* chunk[k+m], int*
indices_of_erased_chunks, int*missing_chunks) => void* dataIf there are not enough chunks to recover the desired data range
[offset, offset+length) the function returns NULL and sets
missing_chunksQuoted 1 line
Quoted 1 line
to the list of chunks that must be retrieved in order to be able to
read
Quoted 4 lines
Quoted 4 lines
the desired data.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
If decode is called to read just 1 chunk and it is missing, reed-
solomon would return on error and ask for all other chunks to repair.
If
Quoted 4 lines
Quoted 4 lines
the underlying library implements LRC, it would ask for a subset of the chunks.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
An implementation allowing only full reads and using jerasure
( which
Quoted 1 line
Quoted 1 line
does not do LRC ) requires that offset is always zero, length is the
size
Quoted 1 line
Quoted 1 line
of the object and returns a copy of
indices_of_erased_chunksif thereare
Quoted 9 lines
Quoted 9 lines
not enough chunks to rebuild the missing ones.
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
Comments are welcome :-)
I have loosely followed this discussion and I have not looked closely
at the proposed API nor at the jerasure interface. My apologies if this has already been addressed.
Quoted 2 lines
Quoted 2 lines
It is not clear to me from the above proposed API (ignoring the
partial
Quoted 1 line
Quoted 1 line
read) what it would do. Was the original intent to encode the entire
file
Quoted 11 lines
Quoted 11 lines
using k+m blocks irregardless of the file size and of the rados object size?
Quoted 2 lines
Quoted 2 lines
If so, how will you map rados objects to the logical k+m objects and
vice versa?
Quoted 2 lines
Quoted 2 lines
If not, then the initial API needed an offset and length (either
logical or rados object).
Quoted 2 lines
Quoted 2 lines
I would assume that you would want to operate on rados sized objects.
Given a fixed k+m, then you may have more than one set of k+m objects
per
Quoted 1 line
Quoted 1 line
file. This is ignoring the LRC "local" parity blocks. For example, if
the
Quoted 8 lines
Quoted 8 lines
rados object size if 1 MB and k = 10 and m = 4 (as in the Xorbas video), then for a 20 MB file one would need two sets of encoding blocks. The first for objects 1-10 and the second for objects 11-20.
Quoted 2 lines
Quoted 2 lines
Perhaps, this is what the context is above. If so, it should have the
logical offset and rados object size, no?
Quoted 2 lines
Quoted 2 lines
I see value in the Xorbas concept and I wonder if the jerasure
library
Quoted 1 line
Quoted 1 line
can be modified to generate the local parity blocks such that they can
be
Quoted 5 lines
Quoted 5 lines
used to generate the global parity blocks. That would be a question for Jim Plank.
Quoted 2 lines
The benefits of the Xorbas concept is reduced network and disk I/O for
failures while maintaining traditional RS's higher fault-tolerance than
3x
Quoted 5 lines
Quoted 5 lines
replication while using less space.
Quoted 2 lines
You can do almost the same thing with jerasure without modifying it at
all. Using the values from the Xorbas video, they have k data blocks, m global parity blocks, and 2 local parity blocks (generated from k/2
data
Quoted 5 lines
Quoted 5 lines
blocks) for a total of k+m+2 blocks on disk that can tolerate any m failures. In their example, k = 10 and m = 4. They store 16 blocks for each 10 data blocks.
Quoted 2 lines
If you use traditional RS encoding via jerasure and used the same
amount
Quoted 1 line
Quoted 1 line
of storage (16 blocks for each 10 data blocks), you could encode 3
parity
Quoted 1 line
Quoted 1 line
blocks for each 5 data blocks. This would consume 16 data blocks for
each
Quoted 1 line
Quoted 1 line
10 data blocks and the fault-tolerance would be variable from 3-6
failures
Quoted 2 lines
Quoted 2 lines
depending on how the failures fell between the two groups of 5 blocks which is higher than the static 4 failures for the Xorbas code. The I/O
to
Quoted 2 lines
Quoted 2 lines
recover from a single failure for both schemes is 5 blocks so it is as efficient as Xorbas. On average, it provides more fault-tolerance, but
it
Quoted 9 lines
Quoted 9 lines
can be less (four failures from one group of 5 data + 3 parity blocks), but that worst case is the same as 3x replication.
Quoted 5 lines
Scott--
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--
To unsubscribe from this list: send the line "unsubscribe ceph-devel"in
Quoted 1 line
Quoted 1 line
the body of a message to [email protected] More majordomo info
at
Quoted 1 line
Quoted 1 line
Scott, et al.
Here is an interesting paper from Usenix HotStorage Conference which provides local codes without additional capacity overhead.
Check it out. (abstract with links to paper and slides)
https://www.usenix.org/conference/hotstorage13/solution-network-challenges-data-recovery-erasure-coded-distributed-storage
Cheers,
pvs
Quoted 245 lines · Paul Von-Stamwitz
Hi Scott,
Point taken.
I was thinking about Loic's decode description where k+m was requested and data was decoded when k blocks were received. But he was referring to full stripe reads where all the memory is allocated.
Degraded reads and block repair are a different matter.
pvs
Quoted 5 lines · Scott Atchley
On Jul 2, 2013, at 10:12 PM, Paul Von-Stamwitz
<[email protected]> wrote:Quoted 8 lines
Quoted 5 lines
Scott,
You make a good point comparing (5/3) RS with Xorbas, but a small nit:
"The I/O to recover from a single failure for both schemes is 5 blocks
so it is as efficient as Xorbas."
Quoted 2 lines
Maybe not. You would probably issue I/O to all the remaining 7 blocks
to
Quoted 1 line
cover for the possibility of double errors. The time to reconstruct
would
Quoted 1 line
be about the same, but there could be more disk and network I/O. (LRC
will
Quoted 1 line
need to issue I/O to the rest of the global stripe if it detected
multiple
Quoted 11 lines
local errors.)
Why would you request more than five? If one cannot be read, request another.
Also, I am not sure that you want to request five at once since it will lead to spikes in network traffic and require memory for all five blocks. You will need at least two buffers. Request the first two and start the decoding. You may want a third buffer to overlap the decoding of the current block with the communication for the next block. It may be that the decode time is less than the communication and, in that case, you
will
Quoted 8 lines
want to request all of the blocks at once.
Quoted 1 line
What I like about Xorbas is that it is an extension of a (x,y) RS. You
can start with traditional RS. If degraded reads and repaired blocks are causing a problem, you can add the LRC. If capacity is an issue, you can take it out.
I like it too and Microsoft has something similar with Pyramid codes.
That
Quoted 1 line
said, my example using traditional RS can provide more fault-tolerance
on
Quoted 8 lines
average given the same amount of storage overhead.
Quoted 6 lines
Best,
PaulQuoted 1 line · Samuel Just
I think we should be able to cover most cases by adding an interface
Quoted 11 lines
like:
Quoted 6 lines
Quoted 6 lines
set<int>
minimum_to_read(const set<int> &want_to_read, const set<int> &available_chunks);which returns the smallest set required to read/rebuild the chunks in
want_to_readgiven the chunks inavailable_chunks. Alternately, wemight
Quoted 3 lines
Quoted 3 lines
include a "cost" for reading each chunk like
set<int> minimum_to_read_with_cost(const set<int>
&want_to_read,const
Quoted 5 lines
Quoted 3 lines
Quoted 3 lines
map<int, int> &available)
which returns the minimum cost set required to read the specified
chunks
Quoted 1 line
Quoted 1 line
given a mapping of available chunks to costs. The costs might allow
us
Quoted 3 lines
to
Quoted 2 lines
Quoted 2 lines
consider the difference between reading local chunks vs remote chunks. This should be sufficient to cover the read case (esp the degraded
read
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
case) and the repair case.
-SamQuoted 1 line · Scott
On Jul 2, 2013, at 10:07 AM, "Atchley, Scott" <[email protected]>
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines · wrote:
Quoted 6 lines · Loic Dachary
Quoted 4 lines
Hi,
Today Sam pointed out that the API for LRC ( Xorbas Hadoop Project
Page, Locally Repairable Codes (LRC) http://smahesh.com/HadoopUSC/
for
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
instance ) would need to be different from the one initialy proposed:
Quoted 4 lines
Quoted 4 lines
An interesting video. Not as entertaining as Jim Plank's video. ;-)
While Plank's focused on the processor requirements for
Quoted 10 lines
Quoted 7 lines
Quoted 7 lines
encoding/decoding, this video focuses on the network and disk I/O requirements.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
context(k, m, reed-solomon|...)=> context* cencode(context* c, void* data)=> void* chunks[k+m] decode(context* c, void* chunk[k+m], int*indices_of_erased_chunks) => void* data // erased chunks are notused
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
repair(context* c, void* chunk[k+m], int*
indices_of_erased_chunks) => void* chunks[k+m] // erased chunksare
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
rebuilt
The decode function must allow for partial read:
decode(context* c, int offset, int length, void* chunk[k+m], int*
indices_of_erased_chunks, int*missing_chunks) => void* dataIf there are not enough chunks to recover the desired data range
[offset, offset+length) the function returns NULL and sets
Quoted 9 lines
missing_chunksQuoted 1 line
Quoted 1 line
to the list of chunks that must be retrieved in order to be able to
read
Quoted 4 lines
Quoted 4 lines
the desired data.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
If decode is called to read just 1 chunk and it is missing, reed-
solomon would return on error and ask for all other chunks to repair.
If
Quoted 1 line
Quoted 1 line
the underlying library implements LRC, it would ask for a subset of
the
Quoted 13 lines
Quoted 3 lines
Quoted 3 lines
chunks.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
An implementation allowing only full reads and using jerasure
( which
Quoted 1 line
Quoted 1 line
does not do LRC ) requires that offset is always zero, length is the
size
Quoted 1 line
Quoted 1 line
of the object and returns a copy of
indices_of_erased_chunksif thereare
Quoted 5 lines
Quoted 5 lines
not enough chunks to rebuild the missing ones.
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
Comments are welcome :-)
I have loosely followed this discussion and I have not looked
closely
Quoted 1 line
Quoted 1 line
Quoted 1 line
at the proposed API nor at the jerasure interface. My apologies if
this
Quoted 7 lines
Quoted 3 lines
Quoted 3 lines
has already been addressed.
Quoted 2 lines
Quoted 2 lines
It is not clear to me from the above proposed API (ignoring the
partial
Quoted 1 line
Quoted 1 line
read) what it would do. Was the original intent to encode the entire
file
Quoted 1 line
Quoted 1 line
using k+m blocks irregardless of the file size and of the rados
object
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
size?
Quoted 2 lines
Quoted 2 lines
If so, how will you map rados objects to the logical k+m objects
and
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
vice versa?
Quoted 2 lines
Quoted 2 lines
If not, then the initial API needed an offset and length (either
logical or rados object).
Quoted 2 lines
Quoted 2 lines
I would assume that you would want to operate on rados sized
objects.
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Given a fixed k+m, then you may have more than one set of k+m objects
per
Quoted 1 line
Quoted 1 line
file. This is ignoring the LRC "local" parity blocks. For example, if
the
Quoted 1 line
Quoted 1 line
rados object size if 1 MB and k = 10 and m = 4 (as in the Xorbas
video),
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
then for a 20 MB file one would need two sets of encoding blocks. The first for objects 1-10 and the second for objects 11-20.
Quoted 2 lines
Quoted 2 lines
Perhaps, this is what the context is above. If so, it should have
the
Quoted 5 lines
Quoted 3 lines
Quoted 3 lines
logical offset and rados object size, no?
Quoted 2 lines
Quoted 2 lines
I see value in the Xorbas concept and I wonder if the jerasure
library
Quoted 1 line
Quoted 1 line
can be modified to generate the local parity blocks such that they
can
Quoted 2 lines
be
Quoted 1 line
Quoted 1 line
used to generate the global parity blocks. That would be a question
for
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Jim Plank.
Quoted 2 lines
The benefits of the Xorbas concept is reduced network and disk I/O
for
Quoted 1 line
Quoted 1 line
Quoted 1 line
failures while maintaining traditional RS's higher fault-tolerance
than
Quoted 4 lines
3x
Quoted 3 lines
Quoted 3 lines
replication while using less space.
Quoted 2 lines
You can do almost the same thing with jerasure without modifying it
at
Quoted 1 line
Quoted 1 line
Quoted 1 line
all. Using the values from the Xorbas video, they have k data blocks,
m
Quoted 4 lines
Quoted 1 line
Quoted 1 line
global parity blocks, and 2 local parity blocks (generated from k/2
data
Quoted 2 lines
Quoted 2 lines
blocks) for a total of k+m+2 blocks on disk that can tolerate any m failures. In their example, k = 10 and m = 4. They store 16 blocks
for
Quoted 12 lines
Quoted 3 lines
Quoted 3 lines
each 10 data blocks.
Quoted 2 lines
If you use traditional RS encoding via jerasure and used the same
amount
Quoted 1 line
Quoted 1 line
of storage (16 blocks for each 10 data blocks), you could encode 3
parity
Quoted 1 line
Quoted 1 line
blocks for each 5 data blocks. This would consume 16 data blocks for
each
Quoted 1 line
Quoted 1 line
10 data blocks and the fault-tolerance would be variable from 3-6
failures
Quoted 2 lines
Quoted 2 lines
depending on how the failures fell between the two groups of 5 blocks which is higher than the static 4 failures for the Xorbas code. The
I/O
Quoted 2 lines
to
Quoted 1 line
Quoted 1 line
recover from a single failure for both schemes is 5 blocks so it is
as
Quoted 1 line
Quoted 1 line
Quoted 1 line
efficient as Xorbas. On average, it provides more fault-tolerance,
but
Quoted 2 lines
it
Quoted 1 line
Quoted 1 line
can be less (four failures from one group of 5 data + 3 parity
blocks),
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
but that worst case is the same as 3x replication.
Quoted 3 lines
Scott--
To unsubscribe from this list: send the line "unsubscribe ceph-devel"
Quoted 6 lines
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel"in
Quoted 1 line
Quoted 1 line
the body of a message to [email protected] More majordomo
info
Quoted 2 lines
at
Quoted 1 line
Quoted 1 line
Hi,
I was thinking about scrubbing of erasure coded chunks and realized I don't know the answer to this very simple question : what happens when a chunk is corrupted ? I.e. if AB is coded with 2+1 into A + B ( data ) + Z (parity ) and Z is replaced with Q. Would reed-solomon ignore/discard the corrupted chunk ? If that's the case I think it slightly changes what the API should be.
Cheers
Quoted 261 lines · Paul Von-Stamwitz
Scott, et al.
Here is an interesting paper from Usenix HotStorage Conference which provides local codes without additional capacity overhead.
Check it out. (abstract with links to paper and slides)
https://www.usenix.org/conference/hotstorage13/solution-network-challenges-data-recovery-erasure-coded-distributed-storageCheers,
pvsQuoted 235 lines · Paul Von-Stamwitz
Hi Scott,
Point taken.
I was thinking about Loic's decode description where k+m was requested and data was decoded when k blocks were received. But he was referring to full stripe reads where all the memory is allocated.
Degraded reads and block repair are a different matter.
pvs
Quoted 5 lines · Scott Atchley
On Jul 2, 2013, at 10:12 PM, Paul Von-Stamwitz
<[email protected]> wrote:Quoted 8 lines
Quoted 5 lines
Scott,
You make a good point comparing (5/3) RS with Xorbas, but a small nit:
"The I/O to recover from a single failure for both schemes is 5 blocks
so it is as efficient as Xorbas."
Quoted 2 lines
Maybe not. You would probably issue I/O to all the remaining 7 blocks
to
Quoted 1 line
cover for the possibility of double errors. The time to reconstruct
would
Quoted 1 line
be about the same, but there could be more disk and network I/O. (LRC
will
Quoted 1 line
need to issue I/O to the rest of the global stripe if it detected
multiple
Quoted 11 lines
local errors.)
Why would you request more than five? If one cannot be read, request another.
Also, I am not sure that you want to request five at once since it will lead to spikes in network traffic and require memory for all five blocks. You will need at least two buffers. Request the first two and start the decoding. You may want a third buffer to overlap the decoding of the current block with the communication for the next block. It may be that the decode time is less than the communication and, in that case, you
will
Quoted 8 lines
want to request all of the blocks at once.
Quoted 1 line
What I like about Xorbas is that it is an extension of a (x,y) RS. You
can start with traditional RS. If degraded reads and repaired blocks are causing a problem, you can add the LRC. If capacity is an issue, you can take it out.
I like it too and Microsoft has something similar with Pyramid codes.
That
Quoted 1 line
said, my example using traditional RS can provide more fault-tolerance
on
Quoted 8 lines
average given the same amount of storage overhead.
Quoted 6 lines
Best,
PaulQuoted 1 line · Samuel Just
I think we should be able to cover most cases by adding an interface
Quoted 11 lines
like:
Quoted 6 lines
Quoted 6 lines
set<int>
minimum_to_read(const set<int> &want_to_read, const set<int> &available_chunks);which returns the smallest set required to read/rebuild the chunks in
want_to_readgiven the chunks inavailable_chunks. Alternately, wemight
Quoted 3 lines
Quoted 3 lines
include a "cost" for reading each chunk like
set<int> minimum_to_read_with_cost(const set<int>
&want_to_read,const
Quoted 5 lines
Quoted 3 lines
Quoted 3 lines
map<int, int> &available)
which returns the minimum cost set required to read the specified
chunks
Quoted 1 line
Quoted 1 line
given a mapping of available chunks to costs. The costs might allow
us
Quoted 3 lines
to
Quoted 2 lines
Quoted 2 lines
consider the difference between reading local chunks vs remote chunks. This should be sufficient to cover the read case (esp the degraded
read
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
case) and the repair case.
-SamQuoted 1 line · Scott
On Jul 2, 2013, at 10:07 AM, "Atchley, Scott" <[email protected]>
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines · wrote:
Quoted 6 lines · Loic Dachary
Quoted 4 lines
Hi,
Today Sam pointed out that the API for LRC ( Xorbas Hadoop Project
Page, Locally Repairable Codes (LRC) http://smahesh.com/HadoopUSC/
for
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
instance ) would need to be different from the one initialy proposed:
Quoted 4 lines
Quoted 4 lines
An interesting video. Not as entertaining as Jim Plank's video. ;-)
While Plank's focused on the processor requirements for
Quoted 10 lines
Quoted 7 lines
Quoted 7 lines
encoding/decoding, this video focuses on the network and disk I/O requirements.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
context(k, m, reed-solomon|...)=> context* cencode(context* c, void* data)=> void* chunks[k+m] decode(context* c, void* chunk[k+m], int*indices_of_erased_chunks) => void* data // erased chunks are notused
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
repair(context* c, void* chunk[k+m], int*
indices_of_erased_chunks) => void* chunks[k+m] // erased chunksare
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
rebuilt
The decode function must allow for partial read:
decode(context* c, int offset, int length, void* chunk[k+m], int*
indices_of_erased_chunks, int*missing_chunks) => void* dataIf there are not enough chunks to recover the desired data range
[offset, offset+length) the function returns NULL and sets
Quoted 9 lines
missing_chunksQuoted 1 line
Quoted 1 line
to the list of chunks that must be retrieved in order to be able to
read
Quoted 4 lines
Quoted 4 lines
the desired data.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
If decode is called to read just 1 chunk and it is missing, reed-
solomon would return on error and ask for all other chunks to repair.
If
Quoted 1 line
Quoted 1 line
the underlying library implements LRC, it would ask for a subset of
the
Quoted 13 lines
Quoted 3 lines
Quoted 3 lines
chunks.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
An implementation allowing only full reads and using jerasure
( which
Quoted 1 line
Quoted 1 line
does not do LRC ) requires that offset is always zero, length is the
size
Quoted 1 line
Quoted 1 line
of the object and returns a copy of
indices_of_erased_chunksif thereare
Quoted 5 lines
Quoted 5 lines
not enough chunks to rebuild the missing ones.
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
Comments are welcome :-)
I have loosely followed this discussion and I have not looked
closely
Quoted 1 line
Quoted 1 line
Quoted 1 line
at the proposed API nor at the jerasure interface. My apologies if
this
Quoted 7 lines
Quoted 3 lines
Quoted 3 lines
has already been addressed.
Quoted 2 lines
Quoted 2 lines
It is not clear to me from the above proposed API (ignoring the
partial
Quoted 1 line
Quoted 1 line
read) what it would do. Was the original intent to encode the entire
file
Quoted 1 line
Quoted 1 line
using k+m blocks irregardless of the file size and of the rados
object
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
size?
Quoted 2 lines
Quoted 2 lines
If so, how will you map rados objects to the logical k+m objects
and
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
vice versa?
Quoted 2 lines
Quoted 2 lines
If not, then the initial API needed an offset and length (either
logical or rados object).
Quoted 2 lines
Quoted 2 lines
I would assume that you would want to operate on rados sized
objects.
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Given a fixed k+m, then you may have more than one set of k+m objects
per
Quoted 1 line
Quoted 1 line
file. This is ignoring the LRC "local" parity blocks. For example, if
the
Quoted 1 line
Quoted 1 line
rados object size if 1 MB and k = 10 and m = 4 (as in the Xorbas
video),
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
then for a 20 MB file one would need two sets of encoding blocks. The first for objects 1-10 and the second for objects 11-20.
Quoted 2 lines
Quoted 2 lines
Perhaps, this is what the context is above. If so, it should have
the
Quoted 5 lines
Quoted 3 lines
Quoted 3 lines
logical offset and rados object size, no?
Quoted 2 lines
Quoted 2 lines
I see value in the Xorbas concept and I wonder if the jerasure
library
Quoted 1 line
Quoted 1 line
can be modified to generate the local parity blocks such that they
can
Quoted 2 lines
be
Quoted 1 line
Quoted 1 line
used to generate the global parity blocks. That would be a question
for
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Jim Plank.
Quoted 2 lines
The benefits of the Xorbas concept is reduced network and disk I/O
for
Quoted 1 line
Quoted 1 line
Quoted 1 line
failures while maintaining traditional RS's higher fault-tolerance
than
Quoted 4 lines
3x
Quoted 3 lines
Quoted 3 lines
replication while using less space.
Quoted 2 lines
You can do almost the same thing with jerasure without modifying it
at
Quoted 1 line
Quoted 1 line
Quoted 1 line
all. Using the values from the Xorbas video, they have k data blocks,
m
Quoted 4 lines
Quoted 1 line
Quoted 1 line
global parity blocks, and 2 local parity blocks (generated from k/2
data
Quoted 2 lines
Quoted 2 lines
blocks) for a total of k+m+2 blocks on disk that can tolerate any m failures. In their example, k = 10 and m = 4. They store 16 blocks
for
Quoted 12 lines
Quoted 3 lines
Quoted 3 lines
each 10 data blocks.
Quoted 2 lines
If you use traditional RS encoding via jerasure and used the same
amount
Quoted 1 line
Quoted 1 line
of storage (16 blocks for each 10 data blocks), you could encode 3
parity
Quoted 1 line
Quoted 1 line
blocks for each 5 data blocks. This would consume 16 data blocks for
each
Quoted 1 line
Quoted 1 line
10 data blocks and the fault-tolerance would be variable from 3-6
failures
Quoted 2 lines
Quoted 2 lines
depending on how the failures fell between the two groups of 5 blocks which is higher than the static 4 failures for the Xorbas code. The
I/O
Quoted 2 lines
to
Quoted 1 line
Quoted 1 line
recover from a single failure for both schemes is 5 blocks so it is
as
Quoted 1 line
Quoted 1 line
Quoted 1 line
efficient as Xorbas. On average, it provides more fault-tolerance,
but
Quoted 2 lines
it
Quoted 1 line
Quoted 1 line
can be less (four failures from one group of 5 data + 3 parity
blocks),
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
but that worst case is the same as 3x replication.
Quoted 3 lines
Scott--
To unsubscribe from this list: send the line "unsubscribe ceph-Quoted 10 lines
devel"
Quoted 6 lines
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel"in
Quoted 1 line
Quoted 1 line
the body of a message to [email protected] More majordomo
info
Quoted 2 lines
at
Quoted 1 line
Quoted 1 line
--
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 · 2 lines
Loïc Dachary, Artisan Logiciel Libre All that is necessary for the triumph of evil is that good people do nothing.
Loic,
Erasure codes take what ever you give them. You need to verify the chunk before using it. Perhaps storing the checksum in the metadata/context that describes the parity object?
Scott
Quoted 260 lines · Loic Dachary
Hi,
I was thinking about scrubbing of erasure coded chunks and realized I don't know the answer to this very simple question : what happens when a chunk is corrupted ? I.e. if AB is coded with 2+1 into A + B ( data ) + Z (parity ) and Z is replaced with Q. Would reed-solomon ignore/discard the corrupted chunk ? If that's the case I think it slightly changes what the API should be.
Cheers
Quoted 253 lines · Paul Von-Stamwitz
Scott, et al.
Here is an interesting paper from Usenix HotStorage Conference which provides local codes without additional capacity overhead.
Check it out. (abstract with links to paper and slides)
https://www.usenix.org/conference/hotstorage13/solution-network-challenges-data-recovery-erasure-coded-distributed-storageCheers,
pvsQuoted 243 lines · Paul Von-Stamwitz
Hi Scott,
Point taken.
I was thinking about Loic's decode description where k+m was requested and data was decoded when k blocks were received. But he was referring to full stripe reads where all the memory is allocated.
Degraded reads and block repair are a different matter.
pvs
Quoted 5 lines · Scott Atchley
On Jul 2, 2013, at 10:12 PM, Paul Von-Stamwitz
<[email protected]> wrote:Quoted 8 lines
Quoted 5 lines
Scott,
You make a good point comparing (5/3) RS with Xorbas, but a small nit:
"The I/O to recover from a single failure for both schemes is 5 blocks
so it is as efficient as Xorbas."
Quoted 2 lines
Maybe not. You would probably issue I/O to all the remaining 7 blocks
to
Quoted 1 line
cover for the possibility of double errors. The time to reconstruct
would
Quoted 1 line
be about the same, but there could be more disk and network I/O. (LRC
will
Quoted 1 line
need to issue I/O to the rest of the global stripe if it detected
multiple
Quoted 11 lines
local errors.)
Why would you request more than five? If one cannot be read, request another.
Also, I am not sure that you want to request five at once since it will lead to spikes in network traffic and require memory for all five blocks. You will need at least two buffers. Request the first two and start the decoding. You may want a third buffer to overlap the decoding of the current block with the communication for the next block. It may be that the decode time is less than the communication and, in that case, you
will
Quoted 8 lines
want to request all of the blocks at once.
Quoted 1 line
What I like about Xorbas is that it is an extension of a (x,y) RS. You
can start with traditional RS. If degraded reads and repaired blocks are causing a problem, you can add the LRC. If capacity is an issue, you can take it out.
I like it too and Microsoft has something similar with Pyramid codes.
That
Quoted 1 line
said, my example using traditional RS can provide more fault-tolerance
on
Quoted 8 lines
average given the same amount of storage overhead.
Quoted 6 lines
Best,
PaulQuoted 1 line · Samuel Just
I think we should be able to cover most cases by adding an interface
Quoted 11 lines
like:
Quoted 6 lines
Quoted 6 lines
set<int>
minimum_to_read(const set<int> &want_to_read, const set<int> &available_chunks);which returns the smallest set required to read/rebuild the chunks in
want_to_readgiven the chunks inavailable_chunks. Alternately, wemight
Quoted 3 lines
Quoted 3 lines
include a "cost" for reading each chunk like
set<int> minimum_to_read_with_cost(const set<int>
&want_to_read,const
Quoted 5 lines
Quoted 3 lines
Quoted 3 lines
map<int, int> &available)
which returns the minimum cost set required to read the specified
chunks
Quoted 1 line
Quoted 1 line
given a mapping of available chunks to costs. The costs might allow
us
Quoted 3 lines
to
Quoted 2 lines
Quoted 2 lines
consider the difference between reading local chunks vs remote chunks. This should be sufficient to cover the read case (esp the degraded
read
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
case) and the repair case.
-SamQuoted 1 line · Scott
On Jul 2, 2013, at 10:07 AM, "Atchley, Scott" <[email protected]>
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines · wrote:
Quoted 6 lines · Loic Dachary
Quoted 4 lines
Hi,
Today Sam pointed out that the API for LRC ( Xorbas Hadoop Project
Page, Locally Repairable Codes (LRC) http://smahesh.com/HadoopUSC/
for
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
instance ) would need to be different from the one initialy proposed:
Quoted 4 lines
Quoted 4 lines
An interesting video. Not as entertaining as Jim Plank's video. ;-)
While Plank's focused on the processor requirements for
Quoted 10 lines
Quoted 7 lines
Quoted 7 lines
encoding/decoding, this video focuses on the network and disk I/O requirements.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
context(k, m, reed-solomon|...)=> context* cencode(context* c, void* data)=> void* chunks[k+m]decode(context* c, void* chunk[k+m], int* indices_of_erased_chunks)=> void* data // erased chunks are notused
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
repair(context* c, void* chunk[k+m], int* indices_of_erased_chunks)=> void* chunks[k+m] // erased chunksare
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
rebuilt
The decode function must allow for partial read:
decode(context* c, int offset, int length, void* chunk[k+m], int*
indices_of_erased_chunks, int*missing_chunks) => void* dataIf there are not enough chunks to recover the desired data range
[offset, offset+length) the function returns NULL and sets
Quoted 9 lines
missing_chunksQuoted 1 line
Quoted 1 line
to the list of chunks that must be retrieved in order to be able to
read
Quoted 4 lines
Quoted 4 lines
the desired data.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
If decode is called to read just 1 chunk and it is missing, reed-
solomon would return on error and ask for all other chunks to repair.
If
Quoted 1 line
Quoted 1 line
the underlying library implements LRC, it would ask for a subset of
the
Quoted 13 lines
Quoted 3 lines
Quoted 3 lines
chunks.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
An implementation allowing only full reads and using jerasure
( which
Quoted 1 line
Quoted 1 line
does not do LRC ) requires that offset is always zero, length is the
size
Quoted 1 line
Quoted 1 line
of the object and returns a copy of
indices_of_erased_chunksif thereare
Quoted 5 lines
Quoted 5 lines
not enough chunks to rebuild the missing ones.
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
Comments are welcome :-)
I have loosely followed this discussion and I have not looked
closely
Quoted 1 line
Quoted 1 line
Quoted 1 line
at the proposed API nor at the jerasure interface. My apologies if
this
Quoted 7 lines
Quoted 3 lines
Quoted 3 lines
has already been addressed.
Quoted 2 lines
Quoted 2 lines
It is not clear to me from the above proposed API (ignoring the
partial
Quoted 1 line
Quoted 1 line
read) what it would do. Was the original intent to encode the entire
file
Quoted 1 line
Quoted 1 line
using k+m blocks irregardless of the file size and of the rados
object
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
size?
Quoted 2 lines
Quoted 2 lines
If so, how will you map rados objects to the logical k+m objects
and
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
vice versa?
Quoted 2 lines
Quoted 2 lines
If not, then the initial API needed an offset and length (either
logical or rados object).
Quoted 2 lines
Quoted 2 lines
I would assume that you would want to operate on rados sized
objects.
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Given a fixed k+m, then you may have more than one set of k+m objects
per
Quoted 1 line
Quoted 1 line
file. This is ignoring the LRC "local" parity blocks. For example, if
the
Quoted 1 line
Quoted 1 line
rados object size if 1 MB and k = 10 and m = 4 (as in the Xorbas
video),
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
then for a 20 MB file one would need two sets of encoding blocks. The first for objects 1-10 and the second for objects 11-20.
Quoted 2 lines
Quoted 2 lines
Perhaps, this is what the context is above. If so, it should have
the
Quoted 5 lines
Quoted 3 lines
Quoted 3 lines
logical offset and rados object size, no?
Quoted 2 lines
Quoted 2 lines
I see value in the Xorbas concept and I wonder if the jerasure
library
Quoted 1 line
Quoted 1 line
can be modified to generate the local parity blocks such that they
can
Quoted 2 lines
be
Quoted 1 line
Quoted 1 line
used to generate the global parity blocks. That would be a question
for
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Jim Plank.
Quoted 2 lines
The benefits of the Xorbas concept is reduced network and disk I/O
for
Quoted 1 line
Quoted 1 line
Quoted 1 line
failures while maintaining traditional RS's higher fault-tolerance
than
Quoted 4 lines
3x
Quoted 3 lines
Quoted 3 lines
replication while using less space.
Quoted 2 lines
You can do almost the same thing with jerasure without modifying it
at
Quoted 1 line
Quoted 1 line
Quoted 1 line
all. Using the values from the Xorbas video, they have k data blocks,
m
Quoted 4 lines
Quoted 1 line
Quoted 1 line
global parity blocks, and 2 local parity blocks (generated from k/2
data
Quoted 2 lines
Quoted 2 lines
blocks) for a total of k+m+2 blocks on disk that can tolerate any m failures. In their example, k = 10 and m = 4. They store 16 blocks
for
Quoted 12 lines
Quoted 3 lines
Quoted 3 lines
each 10 data blocks.
Quoted 2 lines
If you use traditional RS encoding via jerasure and used the same
amount
Quoted 1 line
Quoted 1 line
of storage (16 blocks for each 10 data blocks), you could encode 3
parity
Quoted 1 line
Quoted 1 line
blocks for each 5 data blocks. This would consume 16 data blocks for
each
Quoted 1 line
Quoted 1 line
10 data blocks and the fault-tolerance would be variable from 3-6
failures
Quoted 2 lines
Quoted 2 lines
depending on how the failures fell between the two groups of 5 blocks which is higher than the static 4 failures for the Xorbas code. The
I/O
Quoted 2 lines
to
Quoted 1 line
Quoted 1 line
recover from a single failure for both schemes is 5 blocks so it is
as
Quoted 1 line
Quoted 1 line
Quoted 1 line
efficient as Xorbas. On average, it provides more fault-tolerance,
but
Quoted 2 lines
it
Quoted 1 line
Quoted 1 line
can be less (four failures from one group of 5 data + 3 parity
blocks),
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
but that worst case is the same as 3x replication.
Quoted 3 lines
Scott--
To unsubscribe from this list: send the line "unsubscribe ceph-devel"
Quoted 6 lines
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel"in
Quoted 1 line
Quoted 1 line
the body of a message to [email protected] More majordomo
info
Quoted 13 lines
Quoted 8 lines
Quoted 2 lines
Quoted 2 lines
at
Quoted 1 line
Quoted 1 line
--
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.htmlSignature · 2 lines
Loïc Dachary, Artisan Logiciel Libre All that is necessary for the triumph of evil is that good people do nothing.
--
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
Paul,
Very nice. No extra storage versus traditional RS with lower recover traffic, although not as low as, LRC. I imagine it complicates the logic to recover as well as the metadata required to track the dependencies.
Scott
Quoted 256 lines · Paul Von-Stamwitz
Scott, et al.
Here is an interesting paper from Usenix HotStorage Conference which provides local codes without additional capacity overhead.
Check it out. (abstract with links to paper and slides)
https://www.usenix.org/conference/hotstorage13/solution-network-challenges-data-recovery-erasure-coded-distributed-storageCheers,
pvsQuoted 245 lines · Paul Von-Stamwitz
Hi Scott,
Point taken.
I was thinking about Loic's decode description where k+m was requested and data was decoded when k blocks were received. But he was referring to full stripe reads where all the memory is allocated.
Degraded reads and block repair are a different matter.
pvs
Quoted 5 lines · Scott Atchley
On Jul 2, 2013, at 10:12 PM, Paul Von-Stamwitz
<[email protected]> wrote:Quoted 8 lines
Quoted 5 lines
Scott,
You make a good point comparing (5/3) RS with Xorbas, but a small nit:
"The I/O to recover from a single failure for both schemes is 5 blocks
so it is as efficient as Xorbas."
Quoted 2 lines
Maybe not. You would probably issue I/O to all the remaining 7 blocks
to
Quoted 1 line
cover for the possibility of double errors. The time to reconstruct
would
Quoted 1 line
be about the same, but there could be more disk and network I/O. (LRC
will
Quoted 1 line
need to issue I/O to the rest of the global stripe if it detected
multiple
Quoted 11 lines
local errors.)
Why would you request more than five? If one cannot be read, request another.
Also, I am not sure that you want to request five at once since it will lead to spikes in network traffic and require memory for all five blocks. You will need at least two buffers. Request the first two and start the decoding. You may want a third buffer to overlap the decoding of the current block with the communication for the next block. It may be that the decode time is less than the communication and, in that case, you
will
Quoted 8 lines
want to request all of the blocks at once.
Quoted 1 line
What I like about Xorbas is that it is an extension of a (x,y) RS. You
can start with traditional RS. If degraded reads and repaired blocks are causing a problem, you can add the LRC. If capacity is an issue, you can take it out.
I like it too and Microsoft has something similar with Pyramid codes.
That
Quoted 1 line
said, my example using traditional RS can provide more fault-tolerance
on
Quoted 8 lines
average given the same amount of storage overhead.
Quoted 6 lines
Best,
PaulQuoted 1 line · Samuel Just
I think we should be able to cover most cases by adding an interface
Quoted 11 lines
like:
Quoted 6 lines
Quoted 6 lines
set<int>
minimum_to_read(const set<int> &want_to_read, const set<int> &available_chunks);which returns the smallest set required to read/rebuild the chunks in
want_to_readgiven the chunks inavailable_chunks. Alternately, wemight
Quoted 3 lines
Quoted 3 lines
include a "cost" for reading each chunk like
set<int> minimum_to_read_with_cost(const set<int>
&want_to_read,const
Quoted 5 lines
Quoted 3 lines
Quoted 3 lines
map<int, int> &available)
which returns the minimum cost set required to read the specified
chunks
Quoted 1 line
Quoted 1 line
given a mapping of available chunks to costs. The costs might allow
us
Quoted 3 lines
to
Quoted 2 lines
Quoted 2 lines
consider the difference between reading local chunks vs remote chunks. This should be sufficient to cover the read case (esp the degraded
read
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
case) and the repair case.
-SamQuoted 1 line · Scott
On Jul 2, 2013, at 10:07 AM, "Atchley, Scott" <[email protected]>
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines · wrote:
Quoted 6 lines · Loic Dachary
Quoted 4 lines
Hi,
Today Sam pointed out that the API for LRC ( Xorbas Hadoop Project
Page, Locally Repairable Codes (LRC) http://smahesh.com/HadoopUSC/
for
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
instance ) would need to be different from the one initialy proposed:
Quoted 4 lines
Quoted 4 lines
An interesting video. Not as entertaining as Jim Plank's video. ;-)
While Plank's focused on the processor requirements for
Quoted 10 lines
Quoted 7 lines
Quoted 7 lines
encoding/decoding, this video focuses on the network and disk I/O requirements.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
context(k, m, reed-solomon|...)=> context* cencode(context* c, void* data)=> void* chunks[k+m]decode(context* c, void* chunk[k+m], int* indices_of_erased_chunks)=> void* data // erased chunks are notused
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
repair(context* c, void* chunk[k+m], int* indices_of_erased_chunks)=> void* chunks[k+m] // erased chunksare
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
rebuilt
The decode function must allow for partial read:
decode(context* c, int offset, int length, void* chunk[k+m], int*
indices_of_erased_chunks, int*missing_chunks) => void* dataIf there are not enough chunks to recover the desired data range
[offset, offset+length) the function returns NULL and sets
Quoted 9 lines
missing_chunksQuoted 1 line
Quoted 1 line
to the list of chunks that must be retrieved in order to be able to
read
Quoted 4 lines
Quoted 4 lines
the desired data.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
If decode is called to read just 1 chunk and it is missing, reed-
solomon would return on error and ask for all other chunks to repair.
If
Quoted 1 line
Quoted 1 line
the underlying library implements LRC, it would ask for a subset of
the
Quoted 13 lines
Quoted 3 lines
Quoted 3 lines
chunks.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
An implementation allowing only full reads and using jerasure
( which
Quoted 1 line
Quoted 1 line
does not do LRC ) requires that offset is always zero, length is the
size
Quoted 1 line
Quoted 1 line
of the object and returns a copy of
indices_of_erased_chunksif thereare
Quoted 5 lines
Quoted 5 lines
not enough chunks to rebuild the missing ones.
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
Comments are welcome :-)
I have loosely followed this discussion and I have not looked
closely
Quoted 1 line
Quoted 1 line
Quoted 1 line
at the proposed API nor at the jerasure interface. My apologies if
this
Quoted 7 lines
Quoted 3 lines
Quoted 3 lines
has already been addressed.
Quoted 2 lines
Quoted 2 lines
It is not clear to me from the above proposed API (ignoring the
partial
Quoted 1 line
Quoted 1 line
read) what it would do. Was the original intent to encode the entire
file
Quoted 1 line
Quoted 1 line
using k+m blocks irregardless of the file size and of the rados
object
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
size?
Quoted 2 lines
Quoted 2 lines
If so, how will you map rados objects to the logical k+m objects
and
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
vice versa?
Quoted 2 lines
Quoted 2 lines
If not, then the initial API needed an offset and length (either
logical or rados object).
Quoted 2 lines
Quoted 2 lines
I would assume that you would want to operate on rados sized
objects.
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Given a fixed k+m, then you may have more than one set of k+m objects
per
Quoted 1 line
Quoted 1 line
file. This is ignoring the LRC "local" parity blocks. For example, if
the
Quoted 1 line
Quoted 1 line
rados object size if 1 MB and k = 10 and m = 4 (as in the Xorbas
video),
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
then for a 20 MB file one would need two sets of encoding blocks. The first for objects 1-10 and the second for objects 11-20.
Quoted 2 lines
Quoted 2 lines
Perhaps, this is what the context is above. If so, it should have
the
Quoted 5 lines
Quoted 3 lines
Quoted 3 lines
logical offset and rados object size, no?
Quoted 2 lines
Quoted 2 lines
I see value in the Xorbas concept and I wonder if the jerasure
library
Quoted 1 line
Quoted 1 line
can be modified to generate the local parity blocks such that they
can
Quoted 2 lines
be
Quoted 1 line
Quoted 1 line
used to generate the global parity blocks. That would be a question
for
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Jim Plank.
Quoted 2 lines
The benefits of the Xorbas concept is reduced network and disk I/O
for
Quoted 1 line
Quoted 1 line
Quoted 1 line
failures while maintaining traditional RS's higher fault-tolerance
than
Quoted 4 lines
3x
Quoted 3 lines
Quoted 3 lines
replication while using less space.
Quoted 2 lines
You can do almost the same thing with jerasure without modifying it
at
Quoted 1 line
Quoted 1 line
Quoted 1 line
all. Using the values from the Xorbas video, they have k data blocks,
m
Quoted 4 lines
Quoted 1 line
Quoted 1 line
global parity blocks, and 2 local parity blocks (generated from k/2
data
Quoted 2 lines
Quoted 2 lines
blocks) for a total of k+m+2 blocks on disk that can tolerate any m failures. In their example, k = 10 and m = 4. They store 16 blocks
for
Quoted 12 lines
Quoted 3 lines
Quoted 3 lines
each 10 data blocks.
Quoted 2 lines
If you use traditional RS encoding via jerasure and used the same
amount
Quoted 1 line
Quoted 1 line
of storage (16 blocks for each 10 data blocks), you could encode 3
parity
Quoted 1 line
Quoted 1 line
blocks for each 5 data blocks. This would consume 16 data blocks for
each
Quoted 1 line
Quoted 1 line
10 data blocks and the fault-tolerance would be variable from 3-6
failures
Quoted 2 lines
Quoted 2 lines
depending on how the failures fell between the two groups of 5 blocks which is higher than the static 4 failures for the Xorbas code. The
I/O
Quoted 2 lines
to
Quoted 1 line
Quoted 1 line
recover from a single failure for both schemes is 5 blocks so it is
as
Quoted 1 line
Quoted 1 line
Quoted 1 line
efficient as Xorbas. On average, it provides more fault-tolerance,
but
Quoted 2 lines
it
Quoted 1 line
Quoted 1 line
can be less (four failures from one group of 5 data + 3 parity
blocks),
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
but that worst case is the same as 3x replication.
Quoted 3 lines
Scott--
To unsubscribe from this list: send the line "unsubscribe ceph-devel"
Quoted 6 lines
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel"in
Quoted 1 line
Quoted 1 line
the body of a message to [email protected] More majordomo
info
Quoted 2 lines
at
Quoted 1 line
Quoted 1 line
On 05/07/2013 14:13, Atchley, Scott wrote:> Loic,
Quoted 2 lines
Erasure codes take what ever you give them. You need to verify the chunk before using it. Perhaps storing the checksum in the metadata/context that describes the parity object?
Hi Scott,
Does that mean that if I give the chunks A + B + C to decode() and B is corrupted but A and C are ok it will return an incorrectly decoded content ? I'm curious to know the answer but I don't think it is an actual problem. A corrupted chunk would mean that the underlying file system corrupted the content of one of its file. I can't remember the last time I saw that happen ;-)
Cheers
Quoted 279 lines
Scott
Quoted 273 lines · Loic Dachary
Hi,
I was thinking about scrubbing of erasure coded chunks and realized I don't know the answer to this very simple question : what happens when a chunk is corrupted ? I.e. if AB is coded with 2+1 into A + B ( data ) + Z (parity ) and Z is replaced with Q. Would reed-solomon ignore/discard the corrupted chunk ? If that's the case I think it slightly changes what the API should be.
Cheers
Quoted 261 lines · Paul Von-Stamwitz
Scott, et al.
Here is an interesting paper from Usenix HotStorage Conference which provides local codes without additional capacity overhead.
Check it out. (abstract with links to paper and slides)
https://www.usenix.org/conference/hotstorage13/solution-network-challenges-data-recovery-erasure-coded-distributed-storageCheers,
pvsQuoted 235 lines · Paul Von-Stamwitz
Hi Scott,
Point taken.
I was thinking about Loic's decode description where k+m was requested and data was decoded when k blocks were received. But he was referring to full stripe reads where all the memory is allocated.
Degraded reads and block repair are a different matter.
pvs
Quoted 5 lines · Scott Atchley
On Jul 2, 2013, at 10:12 PM, Paul Von-Stamwitz
<[email protected]> wrote:Quoted 8 lines
Quoted 5 lines
Scott,
You make a good point comparing (5/3) RS with Xorbas, but a small nit:
"The I/O to recover from a single failure for both schemes is 5 blocks
so it is as efficient as Xorbas."
Quoted 2 lines
Maybe not. You would probably issue I/O to all the remaining 7 blocks
to
Quoted 1 line
cover for the possibility of double errors. The time to reconstruct
would
Quoted 1 line
be about the same, but there could be more disk and network I/O. (LRC
will
Quoted 1 line
need to issue I/O to the rest of the global stripe if it detected
multiple
Quoted 11 lines
local errors.)
Why would you request more than five? If one cannot be read, request another.
Also, I am not sure that you want to request five at once since it will lead to spikes in network traffic and require memory for all five blocks. You will need at least two buffers. Request the first two and start the decoding. You may want a third buffer to overlap the decoding of the current block with the communication for the next block. It may be that the decode time is less than the communication and, in that case, you
will
Quoted 8 lines
want to request all of the blocks at once.
Quoted 1 line
What I like about Xorbas is that it is an extension of a (x,y) RS. You
can start with traditional RS. If degraded reads and repaired blocks are causing a problem, you can add the LRC. If capacity is an issue, you can take it out.
I like it too and Microsoft has something similar with Pyramid codes.
That
Quoted 1 line
said, my example using traditional RS can provide more fault-tolerance
on
Quoted 8 lines
average given the same amount of storage overhead.
Quoted 6 lines
Best,
PaulQuoted 1 line · Samuel Just
I think we should be able to cover most cases by adding an interface
Quoted 11 lines
like:
Quoted 6 lines
Quoted 6 lines
set<int>
minimum_to_read(const set<int> &want_to_read, const set<int> &available_chunks);which returns the smallest set required to read/rebuild the chunks in
want_to_readgiven the chunks inavailable_chunks. Alternately, wemight
Quoted 3 lines
Quoted 3 lines
include a "cost" for reading each chunk like
set<int> minimum_to_read_with_cost(const set<int>
&want_to_read,const
Quoted 5 lines
Quoted 3 lines
Quoted 3 lines
map<int, int> &available)
which returns the minimum cost set required to read the specified
chunks
Quoted 1 line
Quoted 1 line
given a mapping of available chunks to costs. The costs might allow
us
Quoted 3 lines
to
Quoted 2 lines
Quoted 2 lines
consider the difference between reading local chunks vs remote chunks. This should be sufficient to cover the read case (esp the degraded
read
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
case) and the repair case.
-SamQuoted 1 line · Scott
On Jul 2, 2013, at 10:07 AM, "Atchley, Scott" <[email protected]>
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines · wrote:
Quoted 6 lines · Loic Dachary
Quoted 4 lines
Hi,
Today Sam pointed out that the API for LRC ( Xorbas Hadoop Project
Page, Locally Repairable Codes (LRC) http://smahesh.com/HadoopUSC/
for
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
instance ) would need to be different from the one initialy proposed:
Quoted 4 lines
Quoted 4 lines
An interesting video. Not as entertaining as Jim Plank's video. ;-)
While Plank's focused on the processor requirements for
Quoted 10 lines
Quoted 7 lines
Quoted 7 lines
encoding/decoding, this video focuses on the network and disk I/O requirements.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
context(k, m, reed-solomon|...)=> context* cencode(context* c, void* data)=> void* chunks[k+m]decode(context* c, void* chunk[k+m], int* indices_of_erased_chunks)=> void* data // erased chunks are notused
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
repair(context* c, void* chunk[k+m], int* indices_of_erased_chunks)=> void* chunks[k+m] // erased chunksare
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
rebuilt
The decode function must allow for partial read:
decode(context* c, int offset, int length, void* chunk[k+m], int*
indices_of_erased_chunks, int*missing_chunks) => void* dataIf there are not enough chunks to recover the desired data range
[offset, offset+length) the function returns NULL and sets
Quoted 9 lines
missing_chunksQuoted 1 line
Quoted 1 line
to the list of chunks that must be retrieved in order to be able to
read
Quoted 4 lines
Quoted 4 lines
the desired data.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
If decode is called to read just 1 chunk and it is missing, reed-
solomon would return on error and ask for all other chunks to repair.
If
Quoted 1 line
Quoted 1 line
the underlying library implements LRC, it would ask for a subset of
the
Quoted 13 lines
Quoted 3 lines
Quoted 3 lines
chunks.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
An implementation allowing only full reads and using jerasure
( which
Quoted 1 line
Quoted 1 line
does not do LRC ) requires that offset is always zero, length is the
size
Quoted 1 line
Quoted 1 line
of the object and returns a copy of
indices_of_erased_chunksif thereare
Quoted 5 lines
Quoted 5 lines
not enough chunks to rebuild the missing ones.
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
Comments are welcome :-)
I have loosely followed this discussion and I have not looked
closely
Quoted 1 line
Quoted 1 line
Quoted 1 line
at the proposed API nor at the jerasure interface. My apologies if
this
Quoted 7 lines
Quoted 3 lines
Quoted 3 lines
has already been addressed.
Quoted 2 lines
Quoted 2 lines
It is not clear to me from the above proposed API (ignoring the
partial
Quoted 1 line
Quoted 1 line
read) what it would do. Was the original intent to encode the entire
file
Quoted 1 line
Quoted 1 line
using k+m blocks irregardless of the file size and of the rados
object
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
size?
Quoted 2 lines
Quoted 2 lines
If so, how will you map rados objects to the logical k+m objects
and
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
vice versa?
Quoted 2 lines
Quoted 2 lines
If not, then the initial API needed an offset and length (either
logical or rados object).
Quoted 2 lines
Quoted 2 lines
I would assume that you would want to operate on rados sized
objects.
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Given a fixed k+m, then you may have more than one set of k+m objects
per
Quoted 1 line
Quoted 1 line
file. This is ignoring the LRC "local" parity blocks. For example, if
the
Quoted 1 line
Quoted 1 line
rados object size if 1 MB and k = 10 and m = 4 (as in the Xorbas
video),
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
then for a 20 MB file one would need two sets of encoding blocks. The first for objects 1-10 and the second for objects 11-20.
Quoted 2 lines
Quoted 2 lines
Perhaps, this is what the context is above. If so, it should have
the
Quoted 5 lines
Quoted 3 lines
Quoted 3 lines
logical offset and rados object size, no?
Quoted 2 lines
Quoted 2 lines
I see value in the Xorbas concept and I wonder if the jerasure
library
Quoted 1 line
Quoted 1 line
can be modified to generate the local parity blocks such that they
can
Quoted 2 lines
be
Quoted 1 line
Quoted 1 line
used to generate the global parity blocks. That would be a question
for
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Jim Plank.
Quoted 2 lines
The benefits of the Xorbas concept is reduced network and disk I/O
for
Quoted 1 line
Quoted 1 line
Quoted 1 line
failures while maintaining traditional RS's higher fault-tolerance
than
Quoted 4 lines
3x
Quoted 3 lines
Quoted 3 lines
replication while using less space.
Quoted 2 lines
You can do almost the same thing with jerasure without modifying it
at
Quoted 1 line
Quoted 1 line
Quoted 1 line
all. Using the values from the Xorbas video, they have k data blocks,
m
Quoted 4 lines
Quoted 1 line
Quoted 1 line
global parity blocks, and 2 local parity blocks (generated from k/2
data
Quoted 2 lines
Quoted 2 lines
blocks) for a total of k+m+2 blocks on disk that can tolerate any m failures. In their example, k = 10 and m = 4. They store 16 blocks
for
Quoted 12 lines
Quoted 3 lines
Quoted 3 lines
each 10 data blocks.
Quoted 2 lines
If you use traditional RS encoding via jerasure and used the same
amount
Quoted 1 line
Quoted 1 line
of storage (16 blocks for each 10 data blocks), you could encode 3
parity
Quoted 1 line
Quoted 1 line
blocks for each 5 data blocks. This would consume 16 data blocks for
each
Quoted 1 line
Quoted 1 line
10 data blocks and the fault-tolerance would be variable from 3-6
failures
Quoted 2 lines
Quoted 2 lines
depending on how the failures fell between the two groups of 5 blocks which is higher than the static 4 failures for the Xorbas code. The
I/O
Quoted 2 lines
to
Quoted 1 line
Quoted 1 line
recover from a single failure for both schemes is 5 blocks so it is
as
Quoted 1 line
Quoted 1 line
Quoted 1 line
efficient as Xorbas. On average, it provides more fault-tolerance,
but
Quoted 2 lines
it
Quoted 1 line
Quoted 1 line
can be less (four failures from one group of 5 data + 3 parity
blocks),
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
but that worst case is the same as 3x replication.
Quoted 3 lines
Scott--
To unsubscribe from this list: send the line "unsubscribe ceph-Quoted 10 lines
devel"
Quoted 6 lines
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel"in
Quoted 1 line
Quoted 1 line
the body of a message to [email protected] More majordomo
info
Quoted 2 lines
at
Quoted 1 line
Quoted 1 line
--
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.htmlSignature · 2 lines
Loïc Dachary, Artisan Logiciel Libre All that is necessary for the triumph of evil is that good people do nothing.
Signature · 2 lines
Loïc Dachary, Artisan Logiciel Libre All that is necessary for the triumph of evil is that good people do nothing.
Quoted 7 lines · Loic Dachary
On 05/07/2013 14:13, Atchley, Scott wrote:> Loic,
Quoted 2 lines
Erasure codes take what ever you give them. You need to verify the chunk before using it. Perhaps storing the checksum in the metadata/context that describes the parity object?
Hi Scott,
Does that mean that if I give the chunks A + B + C to
decode()and B is corrupted but A and C are ok it will return an incorrectly decoded content ?
Unfortunately, yes.
Quoted 1 line
I'm curious to know the answer but I don't think it is an actual problem. A corrupted chunk would mean that the underlying file system corrupted the content of one of its file. I can't remember the last time I saw that happen ;-)
Bit flips happen. Not often, but it is possible. Here is an article from 2011:
http://www.linux-mag.com/id/8794/
also search for "bit rot" and "bit error rate".
Scott
Quoted 277 lines
Cheers
Quoted 274 lines
Scott
Quoted 269 lines · Loic Dachary
Hi,
I was thinking about scrubbing of erasure coded chunks and realized I don't know the answer to this very simple question : what happens when a chunk is corrupted ? I.e. if AB is coded with 2+1 into A + B ( data ) + Z (parity ) and Z is replaced with Q. Would reed-solomon ignore/discard the corrupted chunk ? If that's the case I think it slightly changes what the API should be.
Cheers
Quoted 261 lines · Paul Von-Stamwitz
Scott, et al.
Here is an interesting paper from Usenix HotStorage Conference which provides local codes without additional capacity overhead.
Check it out. (abstract with links to paper and slides)
https://www.usenix.org/conference/hotstorage13/solution-network-challenges-data-recovery-erasure-coded-distributed-storageCheers,
pvsQuoted 235 lines · Paul Von-Stamwitz
Hi Scott,
Point taken.
I was thinking about Loic's decode description where k+m was requested and data was decoded when k blocks were received. But he was referring to full stripe reads where all the memory is allocated.
Degraded reads and block repair are a different matter.
pvs
Quoted 5 lines · Scott Atchley
On Jul 2, 2013, at 10:12 PM, Paul Von-Stamwitz
<[email protected]> wrote:Quoted 8 lines
Quoted 5 lines
Scott,
You make a good point comparing (5/3) RS with Xorbas, but a small nit:
"The I/O to recover from a single failure for both schemes is 5 blocks
so it is as efficient as Xorbas."
Quoted 2 lines
Maybe not. You would probably issue I/O to all the remaining 7 blocks
to
Quoted 1 line
cover for the possibility of double errors. The time to reconstruct
would
Quoted 1 line
be about the same, but there could be more disk and network I/O. (LRC
will
Quoted 1 line
need to issue I/O to the rest of the global stripe if it detected
multiple
Quoted 11 lines
local errors.)
Why would you request more than five? If one cannot be read, request another.
Also, I am not sure that you want to request five at once since it will lead to spikes in network traffic and require memory for all five blocks. You will need at least two buffers. Request the first two and start the decoding. You may want a third buffer to overlap the decoding of the current block with the communication for the next block. It may be that the decode time is less than the communication and, in that case, you
will
Quoted 8 lines
want to request all of the blocks at once.
Quoted 1 line
What I like about Xorbas is that it is an extension of a (x,y) RS. You
can start with traditional RS. If degraded reads and repaired blocks are causing a problem, you can add the LRC. If capacity is an issue, you can take it out.
I like it too and Microsoft has something similar with Pyramid codes.
That
Quoted 1 line
said, my example using traditional RS can provide more fault-tolerance
on
Quoted 8 lines
average given the same amount of storage overhead.
Quoted 6 lines
Best,
PaulQuoted 1 line · Samuel Just
I think we should be able to cover most cases by adding an interface
Quoted 11 lines
like:
Quoted 6 lines
Quoted 6 lines
set<int>
minimum_to_read(const set<int> &want_to_read, const set<int> &available_chunks);which returns the smallest set required to read/rebuild the chunks in
want_to_readgiven the chunks inavailable_chunks. Alternately, wemight
Quoted 3 lines
Quoted 3 lines
include a "cost" for reading each chunk like
set<int> minimum_to_read_with_cost(const set<int>
&want_to_read,const
Quoted 5 lines
Quoted 3 lines
Quoted 3 lines
map<int, int> &available)
which returns the minimum cost set required to read the specified
chunks
Quoted 1 line
Quoted 1 line
given a mapping of available chunks to costs. The costs might allow
us
Quoted 3 lines
to
Quoted 2 lines
Quoted 2 lines
consider the difference between reading local chunks vs remote chunks. This should be sufficient to cover the read case (esp the degraded
read
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
case) and the repair case.
-SamQuoted 1 line · Scott
On Jul 2, 2013, at 10:07 AM, "Atchley, Scott" <[email protected]>
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines · wrote:
Quoted 6 lines · Loic Dachary
Quoted 4 lines
Hi,
Today Sam pointed out that the API for LRC ( Xorbas Hadoop Project
Page, Locally Repairable Codes (LRC) http://smahesh.com/HadoopUSC/
for
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
instance ) would need to be different from the one initialy proposed:
Quoted 4 lines
Quoted 4 lines
An interesting video. Not as entertaining as Jim Plank's video. ;-)
While Plank's focused on the processor requirements for
Quoted 10 lines
Quoted 7 lines
Quoted 7 lines
encoding/decoding, this video focuses on the network and disk I/O requirements.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
context(k, m, reed-solomon|...)=> context* cencode(context* c, void* data)=> void* chunks[k+m]decode(context* c, void* chunk[k+m], int* indices_of_erased_chunks)=> void* data // erased chunks are notused
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
repair(context* c, void* chunk[k+m], int* indices_of_erased_chunks)=> void* chunks[k+m] // erased chunksare
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
rebuilt
The decode function must allow for partial read:
decode(context* c, int offset, int length, void* chunk[k+m], int*
indices_of_erased_chunks, int*missing_chunks) => void* dataIf there are not enough chunks to recover the desired data range
[offset, offset+length) the function returns NULL and sets
Quoted 9 lines
missing_chunksQuoted 1 line
Quoted 1 line
to the list of chunks that must be retrieved in order to be able to
read
Quoted 4 lines
Quoted 4 lines
the desired data.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
If decode is called to read just 1 chunk and it is missing, reed-
solomon would return on error and ask for all other chunks to repair.
If
Quoted 1 line
Quoted 1 line
the underlying library implements LRC, it would ask for a subset of
the
Quoted 13 lines
Quoted 3 lines
Quoted 3 lines
chunks.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
An implementation allowing only full reads and using jerasure
( which
Quoted 1 line
Quoted 1 line
does not do LRC ) requires that offset is always zero, length is the
size
Quoted 1 line
Quoted 1 line
of the object and returns a copy of
indices_of_erased_chunksif thereare
Quoted 5 lines
Quoted 5 lines
not enough chunks to rebuild the missing ones.
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
Comments are welcome :-)
I have loosely followed this discussion and I have not looked
closely
Quoted 1 line
Quoted 1 line
Quoted 1 line
at the proposed API nor at the jerasure interface. My apologies if
this
Quoted 7 lines
Quoted 3 lines
Quoted 3 lines
has already been addressed.
Quoted 2 lines
Quoted 2 lines
It is not clear to me from the above proposed API (ignoring the
partial
Quoted 1 line
Quoted 1 line
read) what it would do. Was the original intent to encode the entire
file
Quoted 1 line
Quoted 1 line
using k+m blocks irregardless of the file size and of the rados
object
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
size?
Quoted 2 lines
Quoted 2 lines
If so, how will you map rados objects to the logical k+m objects
and
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
vice versa?
Quoted 2 lines
Quoted 2 lines
If not, then the initial API needed an offset and length (either
logical or rados object).
Quoted 2 lines
Quoted 2 lines
I would assume that you would want to operate on rados sized
objects.
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Given a fixed k+m, then you may have more than one set of k+m objects
per
Quoted 1 line
Quoted 1 line
file. This is ignoring the LRC "local" parity blocks. For example, if
the
Quoted 1 line
Quoted 1 line
rados object size if 1 MB and k = 10 and m = 4 (as in the Xorbas
video),
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
then for a 20 MB file one would need two sets of encoding blocks. The first for objects 1-10 and the second for objects 11-20.
Quoted 2 lines
Quoted 2 lines
Perhaps, this is what the context is above. If so, it should have
the
Quoted 5 lines
Quoted 3 lines
Quoted 3 lines
logical offset and rados object size, no?
Quoted 2 lines
Quoted 2 lines
I see value in the Xorbas concept and I wonder if the jerasure
library
Quoted 1 line
Quoted 1 line
can be modified to generate the local parity blocks such that they
can
Quoted 2 lines
be
Quoted 1 line
Quoted 1 line
used to generate the global parity blocks. That would be a question
for
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Jim Plank.
Quoted 2 lines
The benefits of the Xorbas concept is reduced network and disk I/O
for
Quoted 1 line
Quoted 1 line
Quoted 1 line
failures while maintaining traditional RS's higher fault-tolerance
than
Quoted 4 lines
3x
Quoted 3 lines
Quoted 3 lines
replication while using less space.
Quoted 2 lines
You can do almost the same thing with jerasure without modifying it
at
Quoted 1 line
Quoted 1 line
Quoted 1 line
all. Using the values from the Xorbas video, they have k data blocks,
m
Quoted 4 lines
Quoted 1 line
Quoted 1 line
global parity blocks, and 2 local parity blocks (generated from k/2
data
Quoted 2 lines
Quoted 2 lines
blocks) for a total of k+m+2 blocks on disk that can tolerate any m failures. In their example, k = 10 and m = 4. They store 16 blocks
for
Quoted 12 lines
Quoted 3 lines
Quoted 3 lines
each 10 data blocks.
Quoted 2 lines
If you use traditional RS encoding via jerasure and used the same
amount
Quoted 1 line
Quoted 1 line
of storage (16 blocks for each 10 data blocks), you could encode 3
parity
Quoted 1 line
Quoted 1 line
blocks for each 5 data blocks. This would consume 16 data blocks for
each
Quoted 1 line
Quoted 1 line
10 data blocks and the fault-tolerance would be variable from 3-6
failures
Quoted 2 lines
Quoted 2 lines
depending on how the failures fell between the two groups of 5 blocks which is higher than the static 4 failures for the Xorbas code. The
I/O
Quoted 2 lines
to
Quoted 1 line
Quoted 1 line
recover from a single failure for both schemes is 5 blocks so it is
as
Quoted 1 line
Quoted 1 line
Quoted 1 line
efficient as Xorbas. On average, it provides more fault-tolerance,
but
Quoted 2 lines
it
Quoted 1 line
Quoted 1 line
can be less (four failures from one group of 5 data + 3 parity
blocks),
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
but that worst case is the same as 3x replication.
Quoted 3 lines
Scott--
To unsubscribe from this list: send the line "unsubscribe ceph-Quoted 10 lines
devel"
Quoted 6 lines
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel"in
Quoted 1 line
Quoted 1 line
the body of a message to [email protected] More majordomo
info
Quoted 2 lines
at
Quoted 1 line
Quoted 1 line
--
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
Quoted 10 lines
Quoted 5 lines
Quoted 4 lines
Signature · 2 lines
Loïc Dachary, Artisan Logiciel Libre All that is necessary for the triumph of evil is that good people do nothing.Signature · 2 lines
Loïc Dachary, Artisan Logiciel Libre All that is necessary for the triumph of evil is that good people do nothing.
--
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
Hi Scott,
That's unfortunate indeed and I now better understand why it is necessary to add a signature to the chunks. I added the following to:
https://github.com/dachary/ceph/blob/wip-4929/doc/dev/osd_internals/erasure-code.rst
Bit flips happen. Not often, but it is possible. Here is an article from 2011 also search for "bit rot" and "bit error rate". To detect corrupted chunks, a signature (SHA1 for instance) should be added as an attribute of the file containing the chunk so that deep scrubbing can check that the chunk is valid by rehashing the content of the chunk and compare it with the signature.
While writing a more detailed version of the API taking your comments and Sam's comment in account, I realized that I don't know if it is possible to recover a parity chunk. If a data chunk is missing, it is enough to recover with a decode operation and write it back ( assuming a systematic code is used ). Would it be possible to do something similar with parity chunks ? Or would we need to re-encode all the parity chunks to write just one of them ? I assume the later but ... I'm not sure ;-)
Cheers
Quoted 310 lines · Scott
Quoted 7 lines · Loic Dachary
On 05/07/2013 14:13, Atchley, Scott wrote:> Loic,
Quoted 2 lines
Erasure codes take what ever you give them. You need to verify the chunk before using it. Perhaps storing the checksum in the metadata/context that describes the parity object?
Hi Scott,
Does that mean that if I give the chunks A + B + C to
decode()and B is corrupted but A and C are ok it will return an incorrectly decoded content ?Unfortunately, yes.
Quoted 1 line
I'm curious to know the answer but I don't think it is an actual problem. A corrupted chunk would mean that the underlying file system corrupted the content of one of its file. I can't remember the last time I saw that happen ;-)
Bit flips happen. Not often, but it is possible. Here is an article from 2011:
http://www.linux-mag.com/id/8794/
also search for "bit rot" and "bit error rate".
Scott
Quoted 287 lines
Cheers
Quoted 279 lines
Scott
Quoted 273 lines · Loic Dachary
Hi,
I was thinking about scrubbing of erasure coded chunks and realized I don't know the answer to this very simple question : what happens when a chunk is corrupted ? I.e. if AB is coded with 2+1 into A + B ( data ) + Z (parity ) and Z is replaced with Q. Would reed-solomon ignore/discard the corrupted chunk ? If that's the case I think it slightly changes what the API should be.
Cheers
Quoted 261 lines · Paul Von-Stamwitz
Scott, et al.
Here is an interesting paper from Usenix HotStorage Conference which provides local codes without additional capacity overhead.
Check it out. (abstract with links to paper and slides)
https://www.usenix.org/conference/hotstorage13/solution-network-challenges-data-recovery-erasure-coded-distributed-storageCheers,
pvsQuoted 235 lines · Paul Von-Stamwitz
Hi Scott,
Point taken.
I was thinking about Loic's decode description where k+m was requested and data was decoded when k blocks were received. But he was referring to full stripe reads where all the memory is allocated.
Degraded reads and block repair are a different matter.
pvs
Quoted 5 lines · Scott Atchley
On Jul 2, 2013, at 10:12 PM, Paul Von-Stamwitz
<[email protected]> wrote:Quoted 8 lines
Quoted 5 lines
Scott,
You make a good point comparing (5/3) RS with Xorbas, but a small nit:
"The I/O to recover from a single failure for both schemes is 5 blocks
so it is as efficient as Xorbas."
Quoted 2 lines
Maybe not. You would probably issue I/O to all the remaining 7 blocks
to
Quoted 1 line
cover for the possibility of double errors. The time to reconstruct
would
Quoted 1 line
be about the same, but there could be more disk and network I/O. (LRC
will
Quoted 1 line
need to issue I/O to the rest of the global stripe if it detected
multiple
Quoted 11 lines
local errors.)
Why would you request more than five? If one cannot be read, request another.
Also, I am not sure that you want to request five at once since it will lead to spikes in network traffic and require memory for all five blocks. You will need at least two buffers. Request the first two and start the decoding. You may want a third buffer to overlap the decoding of the current block with the communication for the next block. It may be that the decode time is less than the communication and, in that case, you
will
Quoted 8 lines
want to request all of the blocks at once.
Quoted 1 line
What I like about Xorbas is that it is an extension of a (x,y) RS. You
can start with traditional RS. If degraded reads and repaired blocks are causing a problem, you can add the LRC. If capacity is an issue, you can take it out.
I like it too and Microsoft has something similar with Pyramid codes.
That
Quoted 1 line
said, my example using traditional RS can provide more fault-tolerance
on
Quoted 8 lines
average given the same amount of storage overhead.
Quoted 6 lines
Best,
PaulQuoted 1 line · Samuel Just
I think we should be able to cover most cases by adding an interface
Quoted 11 lines
like:
Quoted 6 lines
Quoted 6 lines
set<int>
minimum_to_read(const set<int> &want_to_read, const set<int> &available_chunks);which returns the smallest set required to read/rebuild the chunks in
want_to_readgiven the chunks inavailable_chunks. Alternately, wemight
Quoted 3 lines
Quoted 3 lines
include a "cost" for reading each chunk like
set<int> minimum_to_read_with_cost(const set<int>
&want_to_read,const
Quoted 5 lines
Quoted 3 lines
Quoted 3 lines
map<int, int> &available)
which returns the minimum cost set required to read the specified
chunks
Quoted 1 line
Quoted 1 line
given a mapping of available chunks to costs. The costs might allow
us
Quoted 3 lines
to
Quoted 2 lines
Quoted 2 lines
consider the difference between reading local chunks vs remote chunks. This should be sufficient to cover the read case (esp the degraded
read
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
case) and the repair case.
-SamQuoted 1 line · Scott
On Jul 2, 2013, at 10:07 AM, "Atchley, Scott" <[email protected]>
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines · wrote:
Quoted 6 lines · Loic Dachary
Quoted 4 lines
Hi,
Today Sam pointed out that the API for LRC ( Xorbas Hadoop Project
Page, Locally Repairable Codes (LRC) http://smahesh.com/HadoopUSC/
for
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
instance ) would need to be different from the one initialy proposed:
Quoted 4 lines
Quoted 4 lines
An interesting video. Not as entertaining as Jim Plank's video. ;-)
While Plank's focused on the processor requirements for
Quoted 10 lines
Quoted 7 lines
Quoted 7 lines
encoding/decoding, this video focuses on the network and disk I/O requirements.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
context(k, m, reed-solomon|...)=> context* cencode(context* c, void* data)=> void* chunks[k+m]decode(context* c, void* chunk[k+m], int* indices_of_erased_chunks)=> void* data // erased chunks are notused
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
repair(context* c, void* chunk[k+m], int* indices_of_erased_chunks)=> void* chunks[k+m] // erased chunksare
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
rebuilt
The decode function must allow for partial read:
decode(context* c, int offset, int length, void* chunk[k+m], int*
indices_of_erased_chunks, int*missing_chunks) => void* dataIf there are not enough chunks to recover the desired data range
[offset, offset+length) the function returns NULL and sets
Quoted 9 lines
missing_chunksQuoted 1 line
Quoted 1 line
to the list of chunks that must be retrieved in order to be able to
read
Quoted 4 lines
Quoted 4 lines
the desired data.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
If decode is called to read just 1 chunk and it is missing, reed-
solomon would return on error and ask for all other chunks to repair.
If
Quoted 1 line
Quoted 1 line
the underlying library implements LRC, it would ask for a subset of
the
Quoted 13 lines
Quoted 3 lines
Quoted 3 lines
chunks.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
An implementation allowing only full reads and using jerasure
( which
Quoted 1 line
Quoted 1 line
does not do LRC ) requires that offset is always zero, length is the
size
Quoted 1 line
Quoted 1 line
of the object and returns a copy of
indices_of_erased_chunksif thereare
Quoted 5 lines
Quoted 5 lines
not enough chunks to rebuild the missing ones.
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
Comments are welcome :-)
I have loosely followed this discussion and I have not looked
closely
Quoted 1 line
Quoted 1 line
Quoted 1 line
at the proposed API nor at the jerasure interface. My apologies if
this
Quoted 7 lines
Quoted 3 lines
Quoted 3 lines
has already been addressed.
Quoted 2 lines
Quoted 2 lines
It is not clear to me from the above proposed API (ignoring the
partial
Quoted 1 line
Quoted 1 line
read) what it would do. Was the original intent to encode the entire
file
Quoted 1 line
Quoted 1 line
using k+m blocks irregardless of the file size and of the rados
object
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
size?
Quoted 2 lines
Quoted 2 lines
If so, how will you map rados objects to the logical k+m objects
and
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
vice versa?
Quoted 2 lines
Quoted 2 lines
If not, then the initial API needed an offset and length (either
logical or rados object).
Quoted 2 lines
Quoted 2 lines
I would assume that you would want to operate on rados sized
objects.
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Given a fixed k+m, then you may have more than one set of k+m objects
per
Quoted 1 line
Quoted 1 line
file. This is ignoring the LRC "local" parity blocks. For example, if
the
Quoted 1 line
Quoted 1 line
rados object size if 1 MB and k = 10 and m = 4 (as in the Xorbas
video),
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
then for a 20 MB file one would need two sets of encoding blocks. The first for objects 1-10 and the second for objects 11-20.
Quoted 2 lines
Quoted 2 lines
Perhaps, this is what the context is above. If so, it should have
the
Quoted 5 lines
Quoted 3 lines
Quoted 3 lines
logical offset and rados object size, no?
Quoted 2 lines
Quoted 2 lines
I see value in the Xorbas concept and I wonder if the jerasure
library
Quoted 1 line
Quoted 1 line
can be modified to generate the local parity blocks such that they
can
Quoted 2 lines
be
Quoted 1 line
Quoted 1 line
used to generate the global parity blocks. That would be a question
for
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Jim Plank.
Quoted 2 lines
The benefits of the Xorbas concept is reduced network and disk I/O
for
Quoted 1 line
Quoted 1 line
Quoted 1 line
failures while maintaining traditional RS's higher fault-tolerance
than
Quoted 4 lines
3x
Quoted 3 lines
Quoted 3 lines
replication while using less space.
Quoted 2 lines
You can do almost the same thing with jerasure without modifying it
at
Quoted 1 line
Quoted 1 line
Quoted 1 line
all. Using the values from the Xorbas video, they have k data blocks,
m
Quoted 4 lines
Quoted 1 line
Quoted 1 line
global parity blocks, and 2 local parity blocks (generated from k/2
data
Quoted 2 lines
Quoted 2 lines
blocks) for a total of k+m+2 blocks on disk that can tolerate any m failures. In their example, k = 10 and m = 4. They store 16 blocks
for
Quoted 12 lines
Quoted 3 lines
Quoted 3 lines
each 10 data blocks.
Quoted 2 lines
If you use traditional RS encoding via jerasure and used the same
amount
Quoted 1 line
Quoted 1 line
of storage (16 blocks for each 10 data blocks), you could encode 3
parity
Quoted 1 line
Quoted 1 line
blocks for each 5 data blocks. This would consume 16 data blocks for
each
Quoted 1 line
Quoted 1 line
10 data blocks and the fault-tolerance would be variable from 3-6
failures
Quoted 2 lines
Quoted 2 lines
depending on how the failures fell between the two groups of 5 blocks which is higher than the static 4 failures for the Xorbas code. The
I/O
Quoted 2 lines
to
Quoted 1 line
Quoted 1 line
recover from a single failure for both schemes is 5 blocks so it is
as
Quoted 1 line
Quoted 1 line
Quoted 1 line
efficient as Xorbas. On average, it provides more fault-tolerance,
but
Quoted 2 lines
it
Quoted 1 line
Quoted 1 line
can be less (four failures from one group of 5 data + 3 parity
blocks),
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
but that worst case is the same as 3x replication.
Quoted 3 lines
Scott--
To unsubscribe from this list: send the line "unsubscribe ceph-Quoted 10 lines
devel"
Quoted 6 lines
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel"in
Quoted 1 line
Quoted 1 line
the body of a message to [email protected] More majordomo
info
Quoted 2 lines
at
Quoted 1 line
Quoted 1 line
--
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.htmlSignature · 2 lines
Loïc Dachary, Artisan Logiciel Libre All that is necessary for the triumph of evil is that good people do nothing.Signature · 2 lines
Loïc Dachary, Artisan Logiciel Libre All that is necessary for the triumph of evil is that good people do nothing.
Signature · 2 lines
Loïc Dachary, Artisan Logiciel Libre All that is necessary for the triumph of evil is that good people do nothing.
Hi Sam,
I updated the API description at
Please let me know if I missed something.
Cheers
Quoted 75 lines · Samuel Just
I think we should be able to cover most cases by adding an interface like:
set<int>
minimum_to_read(const set<int> &want_to_read, const set<int> &available_chunks);which returns the smallest set required to read/rebuild the chunks in
want_to_readgiven the chunks inavailable_chunks. Alternately, we might include a "cost" for reading each chunk likeset<int>
minimum_to_read_with_cost(const set<int> &want_to_read, const map<int, int> &available)which returns the minimum cost set required to read the specified chunks given a mapping of available chunks to costs. The costs might allow us to consider the difference between reading local chunks vs remote chunks. This should be sufficient to cover the read case (esp the degraded read case) and the repair case.
-SamQuoted 55 lines · Scott
Quoted 35 lines · Scott
Quoted 3 lines · Loic Dachary
Hi,
Today Sam pointed out that the API for LRC ( Xorbas Hadoop Project Page, Locally Repairable Codes (LRC) http://smahesh.com/HadoopUSC/ for instance ) would need to be different from the one initialy proposed:
An interesting video. Not as entertaining as Jim Plank's video. ;-)
While Plank's focused on the processor requirements for encoding/decoding, this video focuses on the network and disk I/O requirements.
Quoted 11 lines
context(k, m, reed-solomon|...)=> context* c
encode(context* c, void* data)=> void* chunks[k+m]
decode(context* c, void* chunk[k+m], int* indices_of_erased_chunks)=> void* data // erased chunks are
not used
repair(context* c, void* chunk[k+m], int* indices_of_erased_chunks)=> void* chunks[k+m] // erased
chunks are rebuiltThe decode function must allow for partial read:
decode(context* c, int offset, int length, void* chunk[k+m], int*
indices_of_erased_chunks, int*missing_chunks) => void* dataQuoted 7 lines
If there are not enough chunks to recover the desired data range [offset, offset+length) the function returns NULL and sets
missing_chunksto the list of chunks that must be retrieved in order to be able to read the desired data.If decode is called to read just 1 chunk and it is missing, reed-solomon would return on error and ask for all other chunks to repair. If the underlying library implements LRC, it would ask for a subset of the chunks.
An implementation allowing only full reads and using jerasure ( which does not do LRC ) requires that offset is always zero, length is the size of the object and returns a copy of
indices_of_erased_chunksif there are not enough chunks to rebuild the missing ones.Comments are welcome :-)
I have loosely followed this discussion and I have not looked closely at the proposed API nor at the jerasure interface. My apologies if this has already been addressed.
It is not clear to me from the above proposed API (ignoring the partial read) what it would do. Was the original intent to encode the entire file using k+m blocks irregardless of the file size and of the rados object size?
If so, how will you map rados objects to the logical k+m objects and vice versa?
Quoted 7 lines
If not, then the initial API needed an offset and length (either logical or rados object).
I would assume that you would want to operate on rados sized objects. Given a fixed k+m, then you may have more than one set of k+m objects per file. This is ignoring the LRC "local" parity blocks. For example, if the rados object size if 1 MB and k = 10 and m = 4 (as in the Xorbas video), then for a 20 MB file one would need two sets of encoding blocks. The first for objects 1-10 and the second for objects 11-20.
Perhaps, this is what the context is above. If so, it should have the logical offset and rados object size, no?
I see value in the Xorbas concept and I wonder if the jerasure library can be modified to generate the local parity blocks such that they can be used to generate the global parity blocks. That would be a question for Jim Plank.
The benefits of the Xorbas concept is reduced network and disk I/O for failures while maintaining traditional RS's higher fault-tolerance than 3x replication while using less space.
You can do almost the same thing with jerasure without modifying it at all. Using the values from the Xorbas video, they have k data blocks, m global parity blocks, and 2 local parity blocks (generated from k/2 data blocks) for a total of k+m+2 blocks on disk that can tolerate any m failures. In their example, k = 10 and m = 4. They store 16 blocks for each 10 data blocks.
If you use traditional RS encoding via jerasure and used the same amount of storage (16 blocks for each 10 data blocks), you could encode 3 parity blocks for each 5 data blocks. This would consume 16 data blocks for each 10 data blocks and the fault-tolerance would be variable from 3-6 failures depending on how the failures fell between the two groups of 5 blocks which is higher than the static 4 failures for the Xorbas code. The I/O to recover from a single failure for both schemes is 5 blocks so it is as efficient as Xorbas. On average, it provides more fault-tolerance, but it can be less (four failures from one group of 5 data + 3 parity blocks), but that worst case is the same as 3x replication.
Scott--
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 · 2 lines
Loïc Dachary, Artisan Logiciel Libre All that is necessary for the triumph of evil is that good people do nothing.
Quoted 7 lines · Loic Dachary
Hi Scott,
That's unfortunate indeed and I now better understand why it is necessary to add a signature to the chunks. I added the following to:
https://github.com/dachary/ceph/blob/wip-4929/doc/dev/osd_internals/erasure-code.rst
Bit flips happen. Not often, but it is possible. Here is an article from 2011 also search for "bit rot" and "bit error rate". To detect corrupted chunks, a signature (SHA1 for instance) should be added as an attribute of the file containing the chunk so that deep scrubbing can check that the chunk is valid by rehashing the content of the chunk and compare it with the signature.
Note, this can be local to the OSD to avoid sending an invalid chunk of the network.
Quoted 1 line
While writing a more detailed version of the API taking your comments and Sam's comment in account, I realized that I don't know if it is possible to recover a parity chunk. If a data chunk is missing, it is enough to recover with a decode operation and write it back ( assuming a systematic code is used ). Would it be possible to do something similar with parity chunks ? Or would we need to re-encode all the parity chunks to write just one of them ? I assume the later but ... I'm not sure ;-)
Yes, you can recover a parity chunk just as you would a data chunk. I have not used the jerasure library, so I do not know what it requires.
Quoted 315 lines
Cheers
Quoted 14 lines · Scott
Quoted 7 lines · Loic Dachary
On 05/07/2013 14:13, Atchley, Scott wrote:> Loic,
Quoted 2 lines
Erasure codes take what ever you give them. You need to verify the chunk before using it. Perhaps storing the checksum in the metadata/context that describes the parity object?
Hi Scott,
Does that mean that if I give the chunks A + B + C to
decode()and B is corrupted but A and C are ok it will return an incorrectly decoded content ?Unfortunately, yes.
Quoted 1 line
I'm curious to know the answer but I don't think it is an actual problem. A corrupted chunk would mean that the underlying file system corrupted the content of one of its file. I can't remember the last time I saw that happen ;-)
Quoted 296 lines
Bit flips happen. Not often, but it is possible. Here is an article from 2011:
http://www.linux-mag.com/id/8794/
also search for "bit rot" and "bit error rate".
Scott
Quoted 287 lines
Cheers
Quoted 279 lines
Scott
Quoted 273 lines · Loic Dachary
Hi,
I was thinking about scrubbing of erasure coded chunks and realized I don't know the answer to this very simple question : what happens when a chunk is corrupted ? I.e. if AB is coded with 2+1 into A + B ( data ) + Z (parity ) and Z is replaced with Q. Would reed-solomon ignore/discard the corrupted chunk ? If that's the case I think it slightly changes what the API should be.
Cheers
Quoted 252 lines · Paul Von-Stamwitz
Scott, et al.
Here is an interesting paper from Usenix HotStorage Conference which provides local codes without additional capacity overhead.
Check it out. (abstract with links to paper and slides)
https://www.usenix.org/conference/hotstorage13/solution-network-challenges-data-recovery-erasure-coded-distributed-storageCheers,
pvsQuoted 242 lines · Paul Von-Stamwitz
Hi Scott,
Point taken.
I was thinking about Loic's decode description where k+m was requested and data was decoded when k blocks were received. But he was referring to full stripe reads where all the memory is allocated.
Degraded reads and block repair are a different matter.
pvs
Quoted 5 lines · Scott Atchley
On Jul 2, 2013, at 10:12 PM, Paul Von-Stamwitz
<[email protected]> wrote:Quoted 8 lines
Quoted 5 lines
Scott,
You make a good point comparing (5/3) RS with Xorbas, but a small nit:
"The I/O to recover from a single failure for both schemes is 5 blocks
so it is as efficient as Xorbas."
Quoted 2 lines
Maybe not. You would probably issue I/O to all the remaining 7 blocks
to
Quoted 1 line
cover for the possibility of double errors. The time to reconstruct
would
Quoted 1 line
be about the same, but there could be more disk and network I/O. (LRC
will
Quoted 1 line
need to issue I/O to the rest of the global stripe if it detected
multiple
Quoted 11 lines
local errors.)
Why would you request more than five? If one cannot be read, request another.
Also, I am not sure that you want to request five at once since it will lead to spikes in network traffic and require memory for all five blocks. You will need at least two buffers. Request the first two and start the decoding. You may want a third buffer to overlap the decoding of the current block with the communication for the next block. It may be that the decode time is less than the communication and, in that case, you
will
Quoted 8 lines
want to request all of the blocks at once.
Quoted 1 line
What I like about Xorbas is that it is an extension of a (x,y) RS. You
can start with traditional RS. If degraded reads and repaired blocks are causing a problem, you can add the LRC. If capacity is an issue, you can take it out.
I like it too and Microsoft has something similar with Pyramid codes.
That
Quoted 1 line
said, my example using traditional RS can provide more fault-tolerance
on
Quoted 8 lines
average given the same amount of storage overhead.
Quoted 6 lines
Best,
PaulQuoted 1 line · Samuel Just
I think we should be able to cover most cases by adding an interface
Quoted 11 lines
like:
Quoted 6 lines
Quoted 6 lines
set<int>
minimum_to_read(const set<int> &want_to_read, const set<int> &available_chunks);which returns the smallest set required to read/rebuild the chunks in
want_to_readgiven the chunks inavailable_chunks. Alternately, wemight
Quoted 3 lines
Quoted 3 lines
include a "cost" for reading each chunk like
set<int> minimum_to_read_with_cost(const set<int>
&want_to_read,const
Quoted 5 lines
Quoted 3 lines
Quoted 3 lines
map<int, int> &available)
which returns the minimum cost set required to read the specified
chunks
Quoted 1 line
Quoted 1 line
given a mapping of available chunks to costs. The costs might allow
us
Quoted 3 lines
to
Quoted 2 lines
Quoted 2 lines
consider the difference between reading local chunks vs remote chunks. This should be sufficient to cover the read case (esp the degraded
read
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
case) and the repair case.
-SamQuoted 1 line · Scott
On Jul 2, 2013, at 10:07 AM, "Atchley, Scott" <[email protected]>
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines · wrote:
Quoted 6 lines · Loic Dachary
Quoted 4 lines
Hi,
Today Sam pointed out that the API for LRC ( Xorbas Hadoop Project
Page, Locally Repairable Codes (LRC) http://smahesh.com/HadoopUSC/
for
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
instance ) would need to be different from the one initialy proposed:
Quoted 4 lines
Quoted 4 lines
An interesting video. Not as entertaining as Jim Plank's video. ;-)
While Plank's focused on the processor requirements for
Quoted 10 lines
Quoted 7 lines
Quoted 7 lines
encoding/decoding, this video focuses on the network and disk I/O requirements.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
context(k, m, reed-solomon|...) => context* c
encode(context* c, void* data) => void* chunks[k+m]
decode(context* c, void* chunk[k+m], int*
indices_of_erased_chunks) => void* data // erased chunks are notused
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
repair(context* c, void* chunk[k+m], int*
indices_of_erased_chunks) => void* chunks[k+m] // erased chunksare
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
rebuilt
The decode function must allow for partial read:
decode(context* c, int offset, int length, void* chunk[k+m], int*
indices_of_erased_chunks, int* missing_chunks) => void* dataIf there are not enough chunks to recover the desired data range
[offset, offset+length) the function returns NULL and sets
Quoted 9 lines
missing_chunksQuoted 1 line
Quoted 1 line
to the list of chunks that must be retrieved in order to be able to
read
Quoted 4 lines
Quoted 4 lines
the desired data.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
If decode is called to read just 1 chunk and it is missing, reed-
solomon would return on error and ask for all other chunks to repair.
If
Quoted 1 line
Quoted 1 line
the underlying library implements LRC, it would ask for a subset of
the
Quoted 13 lines
Quoted 3 lines
Quoted 3 lines
chunks.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
An implementation allowing only full reads and using jerasure
( which
Quoted 1 line
Quoted 1 line
does not do LRC ) requires that offset is always zero, length is the
size
Quoted 1 line
Quoted 1 line
of the object and returns a copy of
indices_of_erased_chunksif thereare
Quoted 5 lines
Quoted 5 lines
not enough chunks to rebuild the missing ones.
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
Comments are welcome :-)
I have loosely followed this discussion and I have not looked
closely
Quoted 1 line
Quoted 1 line
Quoted 1 line
at the proposed API nor at the jerasure interface. My apologies if
this
Quoted 7 lines
Quoted 3 lines
Quoted 3 lines
has already been addressed.
Quoted 2 lines
Quoted 2 lines
It is not clear to me from the above proposed API (ignoring the
partial
Quoted 1 line
Quoted 1 line
read) what it would do. Was the original intent to encode the entire
file
Quoted 1 line
Quoted 1 line
using k+m blocks irregardless of the file size and of the rados
object
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
size?
Quoted 2 lines
Quoted 2 lines
If so, how will you map rados objects to the logical k+m objects
and
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
vice versa?
Quoted 2 lines
Quoted 2 lines
If not, then the initial API needed an offset and length (either
logical or rados object).
Quoted 2 lines
Quoted 2 lines
I would assume that you would want to operate on rados sized
objects.
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Given a fixed k+m, then you may have more than one set of k+m objects
per
Quoted 1 line
Quoted 1 line
file. This is ignoring the LRC "local" parity blocks. For example, if
the
Quoted 1 line
Quoted 1 line
rados object size if 1 MB and k = 10 and m = 4 (as in the Xorbas
video),
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
then for a 20 MB file one would need two sets of encoding blocks. The first for objects 1-10 and the second for objects 11-20.
Quoted 2 lines
Quoted 2 lines
Perhaps, this is what the context is above. If so, it should have
the
Quoted 5 lines
Quoted 3 lines
Quoted 3 lines
logical offset and rados object size, no?
Quoted 2 lines
Quoted 2 lines
I see value in the Xorbas concept and I wonder if the jerasure
library
Quoted 1 line
Quoted 1 line
can be modified to generate the local parity blocks such that they
can
Quoted 2 lines
be
Quoted 1 line
Quoted 1 line
used to generate the global parity blocks. That would be a question
for
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Jim Plank.
Quoted 2 lines
The benefits of the Xorbas concept is reduced network and disk I/O
for
Quoted 1 line
Quoted 1 line
Quoted 1 line
failures while maintaining traditional RS's higher fault-tolerance
than
Quoted 4 lines
3x
Quoted 3 lines
Quoted 3 lines
replication while using less space.
Quoted 2 lines
You can do almost the same thing with jerasure without modifying it
at
Quoted 1 line
Quoted 1 line
Quoted 1 line
all. Using the values from the Xorbas video, they have k data blocks,
m
Quoted 4 lines
Quoted 1 line
Quoted 1 line
global parity blocks, and 2 local parity blocks (generated from k/2
data
Quoted 2 lines
Quoted 2 lines
blocks) for a total of k+m+2 blocks on disk that can tolerate any m failures. In their example, k = 10 and m = 4. They store 16 blocks
for
Quoted 12 lines
Quoted 3 lines
Quoted 3 lines
each 10 data blocks.
Quoted 2 lines
If you use traditional RS encoding via jerasure and used the same
amount
Quoted 1 line
Quoted 1 line
of storage (16 blocks for each 10 data blocks), you could encode 3
parity
Quoted 1 line
Quoted 1 line
blocks for each 5 data blocks. This would consume 16 data blocks for
each
Quoted 1 line
Quoted 1 line
10 data blocks and the fault-tolerance would be variable from 3-6
failures
Quoted 2 lines
Quoted 2 lines
depending on how the failures fell between the two groups of 5 blocks which is higher than the static 4 failures for the Xorbas code. The
I/O
Quoted 2 lines
to
Quoted 1 line
Quoted 1 line
recover from a single failure for both schemes is 5 blocks so it is
as
Quoted 1 line
Quoted 1 line
Quoted 1 line
efficient as Xorbas. On average, it provides more fault-tolerance,
but
Quoted 2 lines
it
Quoted 1 line
Quoted 1 line
can be less (four failures from one group of 5 data + 3 parity
blocks),
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
but that worst case is the same as 3x replication.
Quoted 3 lines
Scott--
To unsubscribe from this list: send the line "unsubscribe ceph-devel"
Quoted 6 lines
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel"in
Quoted 1 line
Quoted 1 line
the body of a message to [email protected] More majordomo
Quoted 9 lines
Quoted 3 lines
info
Quoted 2 lines
at
Quoted 1 line
Quoted 1 line
--
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--
Loïc Dachary, Artisan Logiciel Libre
All that is necessary for the triumph of evil is that good people do nothing.--
Loïc Dachary, Artisan Logiciel Libre
All that is necessary for the triumph of evil is that good people do nothing.
Quoted 4 lines
--
Loïc Dachary, Artisan Logiciel Libre
All that is necessary for the triumph of evil is that good people do nothing.
--
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