Skip to contentSkip to conversation

CEPH Erasure Encoding + OSD Scalability

DISCUSSION Andreas Joachim Peters 4 participants 19 messages Sep 20, 2013 – Dec 13, 2013 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): -7369304096744919226@unknownmsgid

#1 lore raw

Hi Loic,

I have now some benchmarks on a Xeon 2.27 GHz 4-core with gcc 4.4 (-O2) for ENCODING based on the CEPH Jerasure port.
I measured for objects from 128k to 512 MB with random contents (if you encode 1 GB objects you see slow downs due to caching inefficiencies ...), otherwise results are stable for the given object sizes.

I quote only the benchmark for ErasureCodeJerasureReedSolomonRAID6 (3,2) , the other are significantly slower (2-3x slower) and my 3P(3,2,1) implementation providing the same redundancy level like RS-Raid6[3,2] (double disk failure) but using more space (66% vs 100% overhead).

The effect of out.c_str() is significant ( contributes with factor 2 slow-down for the best jerasure algorithm for [3,2] ).

Averaged results for Objects Size 4MB:

1) Erasure CRS [3,2] - 2.6 ms buffer preparation (out.c_str()) - 2.4 ms encoding => ~780 MB/s
2) 3P [3,2,1] - 0,005 ms buffer preparation (3P adjusts the padding in the algorithm) - 0.87ms encoding => ~4.4 GB/s

I think it pays off to avoid the copy in the encoding if it does not matter for the buffer handling upstream and pad only the last chunk.

Last thing I tested is how performances scales with number of cores running 4 tests in parallel:

Jerasure (3,2) limits at ~2,0 GB/s for a 4-core CPU (Xeon 2.27 GHz). 3P(3,2,1) limits ~8 GB/s for a 4-core CPU (Xeon 2.27 GHz).

I also implemented the decoding for 3P, but didn't test yet all reconstruction cases. There is probably room for improvements using AVX support for XOR operations in both implementations.

Before I invest more time, do think it is useful to have this fast 3P algorithm for double disk failures with 100% space overhead? Because I believe that people will always optimize for space and would rather use something like (10,2) even if the performance degrades and CPU consumption goes up?!? Let me know, no problem in any case!

Finally I tested some combinations for ErasureCodeJerasureReedSolomonRAID6:

(3,2) (4,2) (6,2) (8,2) (10,2) they all run around 780-800 MB/s

Cheers Andreas.

#2 lore raw

Hi Andreas,

Great work on these benchmarks ! It's definitely an incentive to improve as much as possible. Could you push / send the scripts and sequence of operations you've used ? I'll reproduce this locally while getting rid of the extra copy. It would be useful to capture that into a script that can be conveniently run from the teuthology integrations tests to check against performance regressions.

Regarding the 3P implementation, in my opinion it would be very valuable for some people who prefer low CPU consumption. And I'm eager to see more than one plugin in the erasure code plugin directory ;-)

Cheers

Quoted 35 lines · Andreas Joachim Peters

Hi Loic,

I have now some benchmarks on a Xeon 2.27 GHz 4-core with gcc 4.4 (-O2) for ENCODING based on the CEPH Jerasure port.
I measured for objects from 128k to 512 MB with random contents (if you encode 1 GB objects you see slow downs due to caching inefficiencies ...), otherwise results are stable for the given object sizes.

I quote only the benchmark for ErasureCodeJerasureReedSolomonRAID6 (3,2) , the other are significantly slower (2-3x slower) and my 3P(3,2,1) implementation providing the same redundancy level like RS-Raid6[3,2] (double disk failure) but using more space (66% vs 100% overhead).

The effect of out.c_str() is significant ( contributes with factor 2 slow-down for the best jerasure algorithm for [3,2] ).

Averaged results for Objects Size 4MB:

1) Erasure CRS [3,2] - 2.6 ms buffer preparation (out.c_str()) - 2.4 ms encoding => ~780 MB/s
2) 3P [3,2,1] - 0,005 ms buffer preparation (3P adjusts the padding in the algorithm) - 0.87ms encoding => ~4.4 GB/s

I think it pays off to avoid the copy in the encoding if it does not matter for the buffer handling upstream and pad only the last chunk.

Last thing I tested is how performances scales with number of cores running 4 tests in parallel:

Jerasure (3,2) limits at ~2,0 GB/s for a 4-core CPU (Xeon 2.27 GHz). 3P(3,2,1) limits ~8 GB/s for a 4-core CPU (Xeon 2.27 GHz).

I also implemented the decoding for 3P, but didn't test yet all reconstruction cases. There is probably room for improvements using AVX support for XOR operations in both implementations.

Before I invest more time, do think it is useful to have this fast 3P algorithm for double disk failures with 100% space overhead? Because I believe that people will always optimize for space and would rather use something like (10,2) even if the performance degrades and CPU consumption goes up?!? Let me know, no problem in any case!

Finally I tested some combinations for ErasureCodeJerasureReedSolomonRAID6:

(3,2) (4,2) (6,2) (8,2) (10,2) they all run around 780-800 MB/s

Cheers Andreas.

Signature · 2 lines
Loïc Dachary, Artisan Logiciel Libre
All that is necessary for the triumph of evil is that good people do nothing.
#3 lore raw

Very exciting work guys!

I suspect there will definitely be people who want lower CPU consumption, especially as ARM and Atom processors become more prolific. :)

Mark

Quoted 44 lines · Loic Dachary

Hi Andreas,

Great work on these benchmarks ! It's definitely an incentive to improve as much as possible. Could you push / send the scripts and sequence of operations you've used ? I'll reproduce this locally while getting rid of the extra copy. It would be useful to capture that into a script that can be conveniently run from the teuthology integrations tests to check against performance regressions.

Regarding the 3P implementation, in my opinion it would be very valuable for some people who prefer low CPU consumption. And I'm eager to see more than one plugin in the erasure code plugin directory ;-)

Cheers

Quoted 35 lines · Andreas Joachim Peters

Hi Loic,

I have now some benchmarks on a Xeon 2.27 GHz 4-core with gcc 4.4 (-O2) for ENCODING based on the CEPH Jerasure port.
I measured for objects from 128k to 512 MB with random contents (if you encode 1 GB objects you see slow downs due to caching inefficiencies ...), otherwise results are stable for the given object sizes.

I quote only the benchmark for ErasureCodeJerasureReedSolomonRAID6 (3,2) , the other are significantly slower (2-3x slower) and my 3P(3,2,1) implementation providing the same redundancy level like RS-Raid6[3,2] (double disk failure) but using more space (66% vs 100% overhead).

The effect of out.c_str() is significant ( contributes with factor 2 slow-down for the best jerasure algorithm for [3,2] ).

Averaged results for Objects Size 4MB:

1) Erasure CRS [3,2] - 2.6 ms buffer preparation (out.c_str()) - 2.4 ms encoding => ~780 MB/s
2) 3P [3,2,1] - 0,005 ms buffer preparation (3P adjusts the padding in the algorithm) - 0.87ms encoding => ~4.4 GB/s

I think it pays off to avoid the copy in the encoding if it does not matter for the buffer handling upstream and pad only the last chunk.

Last thing I tested is how performances scales with number of cores running 4 tests in parallel:

Jerasure (3,2) limits at ~2,0 GB/s for a 4-core CPU (Xeon 2.27 GHz). 3P(3,2,1) limits ~8 GB/s for a 4-core CPU (Xeon 2.27 GHz).

I also implemented the decoding for 3P, but didn't test yet all reconstruction cases. There is probably room for improvements using AVX support for XOR operations in both implementations.

Before I invest more time, do think it is useful to have this fast 3P algorithm for double disk failures with 100% space overhead? Because I believe that people will always optimize for space and would rather use something like (10,2) even if the performance degrades and CPU consumption goes up?!? Let me know, no problem in any case!

Finally I tested some combinations for ErasureCodeJerasureReedSolomonRAID6:

(3,2) (4,2) (6,2) (8,2) (10,2) they all run around 780-800 MB/s

Cheers Andreas.

#4 lore raw
In reply to Loic Dachary
Quoted 5 lines · Loic Dachary

Hi Andreas,

Great work on these benchmarks ! It's definitely an incentive to improve as much as possible. Could you push / send the scripts and sequence of operations you've used ? I'll reproduce this locally while getting rid of the extra copy. It would be useful to capture that into a script that can be conveniently run from the teuthology integrations tests to check against performance regressions.

Regarding the 3P implementation, in my opinion it would be very valuable for some people who prefer low CPU consumption. And I'm eager to see more than one plugin in the erasure code plugin directory ;-)

One way to approach this might be to make a bufferlist 'multi-iterator' that you give you bufferlist::iterator's and will give you back a pair of points and length for each contiguous segment. This would capture the annoying iterator details and let the user focus on processing chunks that are as large as possible.

sage

Quoted 45 lines

Cheers

Quoted 35 lines · Andreas Joachim Peters

Hi Loic,

I have now some benchmarks on a Xeon 2.27 GHz 4-core with gcc 4.4 (-O2) for ENCODING based on the CEPH Jerasure port.
I measured for objects from 128k to 512 MB with random contents (if you encode 1 GB objects you see slow downs due to caching inefficiencies ...), otherwise results are stable for the given object sizes.

I quote only the benchmark for ErasureCodeJerasureReedSolomonRAID6 (3,2) , the other are significantly slower (2-3x slower) and my 3P(3,2,1) implementation providing the same redundancy level like RS-Raid6[3,2] (double disk failure) but using more space (66% vs 100% overhead).

The effect of out.c_str() is significant ( contributes with factor 2 slow-down for the best jerasure algorithm for [3,2] ).

Averaged results for Objects Size 4MB:

1) Erasure CRS [3,2] - 2.6 ms buffer preparation (out.c_str()) - 2.4 ms encoding => ~780 MB/s
2) 3P [3,2,1] - 0,005 ms buffer preparation (3P adjusts the padding in the algorithm) - 0.87ms encoding => ~4.4 GB/s

I think it pays off to avoid the copy in the encoding if it does not matter for the buffer handling upstream and pad only the last chunk.

Last thing I tested is how performances scales with number of cores running 4 tests in parallel:

Jerasure (3,2) limits at ~2,0 GB/s for a 4-core CPU (Xeon 2.27 GHz). 3P(3,2,1) limits ~8 GB/s for a 4-core CPU (Xeon 2.27 GHz).

I also implemented the decoding for 3P, but didn't test yet all reconstruction cases. There is probably room for improvements using AVX support for XOR operations in both implementations.

Before I invest more time, do think it is useful to have this fast 3P algorithm for double disk failures with 100% space overhead? Because I believe that people will always optimize for space and would rather use something like (10,2) even if the performance degrades and CPU consumption goes up?!? Let me know, no problem in any case!

Finally I tested some combinations for ErasureCodeJerasureReedSolomonRAID6:

(3,2) (4,2) (6,2) (8,2) (10,2) they all run around 780-800 MB/s

Cheers Andreas.

Signature · 2 lines
Lo?c Dachary, Artisan Logiciel Libre
All that is necessary for the triumph of evil is that good people do nothing.
#5 lore raw

Hi,

This is a first attempt at avoiding unnecessary copy:

https://github.com/dachary/ceph/blob/03445a5926cd073c11cd8693fb110729e40f35fa/src/osd/ErasureCodePluginJerasure/ErasureCodeJerasure.cc#L66

I'm not sure how it could be made more readable / terse with bufferlist iterators. Any kind of hint would be welcome :-)

Cheers

Quoted 61 lines · Sage Weil
Quoted 5 lines · Loic Dachary

Hi Andreas,

Great work on these benchmarks ! It's definitely an incentive to improve as much as possible. Could you push / send the scripts and sequence of operations you've used ? I'll reproduce this locally while getting rid of the extra copy. It would be useful to capture that into a script that can be conveniently run from the teuthology integrations tests to check against performance regressions.

Regarding the 3P implementation, in my opinion it would be very valuable for some people who prefer low CPU consumption. And I'm eager to see more than one plugin in the erasure code plugin directory ;-)

One way to approach this might be to make a bufferlist 'multi-iterator' that you give you bufferlist::iterator's and will give you back a pair of points and length for each contiguous segment. This would capture the annoying iterator details and let the user focus on processing chunks that are as large as possible.

sage

Quoted 45 lines

Cheers

Quoted 35 lines · Andreas Joachim Peters

Hi Loic,

I have now some benchmarks on a Xeon 2.27 GHz 4-core with gcc 4.4 (-O2) for ENCODING based on the CEPH Jerasure port.
I measured for objects from 128k to 512 MB with random contents (if you encode 1 GB objects you see slow downs due to caching inefficiencies ...), otherwise results are stable for the given object sizes.

I quote only the benchmark for ErasureCodeJerasureReedSolomonRAID6 (3,2) , the other are significantly slower (2-3x slower) and my 3P(3,2,1) implementation providing the same redundancy level like RS-Raid6[3,2] (double disk failure) but using more space (66% vs 100% overhead).

The effect of out.c_str() is significant ( contributes with factor 2 slow-down for the best jerasure algorithm for [3,2] ).

Averaged results for Objects Size 4MB:

1) Erasure CRS [3,2] - 2.6 ms buffer preparation (out.c_str()) - 2.4 ms encoding => ~780 MB/s
2) 3P [3,2,1] - 0,005 ms buffer preparation (3P adjusts the padding in the algorithm) - 0.87ms encoding => ~4.4 GB/s

I think it pays off to avoid the copy in the encoding if it does not matter for the buffer handling upstream and pad only the last chunk.

Last thing I tested is how performances scales with number of cores running 4 tests in parallel:

Jerasure (3,2) limits at ~2,0 GB/s for a 4-core CPU (Xeon 2.27 GHz). 3P(3,2,1) limits ~8 GB/s for a 4-core CPU (Xeon 2.27 GHz).

I also implemented the decoding for 3P, but didn't test yet all reconstruction cases. There is probably room for improvements using AVX support for XOR operations in both implementations.

Before I invest more time, do think it is useful to have this fast 3P algorithm for double disk failures with 100% space overhead? Because I believe that people will always optimize for space and would rather use something like (10,2) even if the performance degrades and CPU consumption goes up?!? Let me know, no problem in any case!

Finally I tested some combinations for ErasureCodeJerasureReedSolomonRAID6:

(3,2) (4,2) (6,2) (8,2) (10,2) they all run around 780-800 MB/s

Cheers Andreas.

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.
#6 lore raw

Hi Andreas,

It's probably too soon to be smart about reducing the number of copies, but you're right : this copy is not necessary. The following pull request gets rid of it:

https://github.com/ceph/ceph/pull/615

Cheers

Quoted 73 lines · Loic Dachary

Hi,

This is a first attempt at avoiding unnecessary copy:

https://github.com/dachary/ceph/blob/03445a5926cd073c11cd8693fb110729e40f35fa/src/osd/ErasureCodePluginJerasure/ErasureCodeJerasure.cc#L66

I'm not sure how it could be made more readable / terse with bufferlist iterators. Any kind of hint would be welcome :-)

Cheers

Quoted 61 lines · Sage Weil
Quoted 5 lines · Loic Dachary

Hi Andreas,

Great work on these benchmarks ! It's definitely an incentive to improve as much as possible. Could you push / send the scripts and sequence of operations you've used ? I'll reproduce this locally while getting rid of the extra copy. It would be useful to capture that into a script that can be conveniently run from the teuthology integrations tests to check against performance regressions.

Regarding the 3P implementation, in my opinion it would be very valuable for some people who prefer low CPU consumption. And I'm eager to see more than one plugin in the erasure code plugin directory ;-)

One way to approach this might be to make a bufferlist 'multi-iterator' that you give you bufferlist::iterator's and will give you back a pair of points and length for each contiguous segment. This would capture the annoying iterator details and let the user focus on processing chunks that are as large as possible.

sage

Quoted 45 lines

Cheers

Quoted 35 lines · Andreas Joachim Peters

Hi Loic,

I have now some benchmarks on a Xeon 2.27 GHz 4-core with gcc 4.4 (-O2) for ENCODING based on the CEPH Jerasure port.
I measured for objects from 128k to 512 MB with random contents (if you encode 1 GB objects you see slow downs due to caching inefficiencies ...), otherwise results are stable for the given object sizes.

I quote only the benchmark for ErasureCodeJerasureReedSolomonRAID6 (3,2) , the other are significantly slower (2-3x slower) and my 3P(3,2,1) implementation providing the same redundancy level like RS-Raid6[3,2] (double disk failure) but using more space (66% vs 100% overhead).

The effect of out.c_str() is significant ( contributes with factor 2 slow-down for the best jerasure algorithm for [3,2] ).

Averaged results for Objects Size 4MB:

1) Erasure CRS [3,2] - 2.6 ms buffer preparation (out.c_str()) - 2.4 ms encoding => ~780 MB/s
2) 3P [3,2,1] - 0,005 ms buffer preparation (3P adjusts the padding in the algorithm) - 0.87ms encoding => ~4.4 GB/s

I think it pays off to avoid the copy in the encoding if it does not matter for the buffer handling upstream and pad only the last chunk.

Last thing I tested is how performances scales with number of cores running 4 tests in parallel:

Jerasure (3,2) limits at ~2,0 GB/s for a 4-core CPU (Xeon 2.27 GHz). 3P(3,2,1) limits ~8 GB/s for a 4-core CPU (Xeon 2.27 GHz).

I also implemented the decoding for 3P, but didn't test yet all reconstruction cases. There is probably room for improvements using AVX support for XOR operations in both implementations.

Before I invest more time, do think it is useful to have this fast 3P algorithm for double disk failures with 100% space overhead? Because I believe that people will always optimize for space and would rather use something like (10,2) even if the performance degrades and CPU consumption goes up?!? Let me know, no problem in any case!

Finally I tested some combinations for ErasureCodeJerasureReedSolomonRAID6:

(3,2) (4,2) (6,2) (8,2) (10,2) they all run around 780-800 MB/s

Cheers Andreas.

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.
#7 lore raw

Hi Loic,
I run a benchmark with the changed code tomorrow ... I actually had to insert some of my realtime benchmark macro's into your Jerasure code to see the different time fractions between buffer preparation & encoding step, but for you QA suite it is probably enough to get a total value after your fix. I will send you a program sampling the performance at different buffer sizes and encoding types.

I changed my code to use vector operations (128-bit XOR's) and it gives another 10% gain. I also want to try out if it makes sense to do the CRC32C computation in-line in the encoding step and compare it with the two step procedure first encoding all blocks, then CRC32C on all blocks.

Cheers Andreas.

________________________________________
From: Loic Dachary [[email protected]]
Sent: 21 September 2013 17:11
To: Andreas Joachim Peters
Cc: [email protected]
Subject: Re: CEPH Erasure Encoding + OSD Scalability

Hi Andreas,

It's probably too soon to be smart about reducing the number of copies, but you're right : this copy is not necessary. The following pull request gets rid of it:

https://github.com/ceph/ceph/pull/615

Cheers

Quoted 4 lines · Loic Dachary

Hi,

This is a first attempt at avoiding unnecessary copy:

Quoted 69 lines

https://github.com/dachary/ceph/blob/03445a5926cd073c11cd8693fb110729e40f35fa/src/osd/ErasureCodePluginJerasure/ErasureCodeJerasure.cc#L66

I'm not sure how it could be made more readable / terse with bufferlist iterators. Any kind of hint would be welcome :-)

Cheers

Quoted 61 lines · Sage Weil
Quoted 5 lines · Loic Dachary

Hi Andreas,

Great work on these benchmarks ! It's definitely an incentive to improve as much as possible. Could you push / send the scripts and sequence of operations you've used ? I'll reproduce this locally while getting rid of the extra copy. It would be useful to capture that into a script that can be conveniently run from the teuthology integrations tests to check against performance regressions.

Regarding the 3P implementation, in my opinion it would be very valuable for some people who prefer low CPU consumption. And I'm eager to see more than one plugin in the erasure code plugin directory ;-)

One way to approach this might be to make a bufferlist 'multi-iterator' that you give you bufferlist::iterator's and will give you back a pair of points and length for each contiguous segment. This would capture the annoying iterator details and let the user focus on processing chunks that are as large as possible.

sage

Quoted 45 lines

Cheers

Quoted 23 lines · Andreas Joachim Peters

Hi Loic,

I have now some benchmarks on a Xeon 2.27 GHz 4-core with gcc 4.4 (-O2) for ENCODING based on the CEPH Jerasure port.
I measured for objects from 128k to 512 MB with random contents (if you encode 1 GB objects you see slow downs due to caching inefficiencies ...), otherwise results are stable for the given object sizes.

I quote only the benchmark for ErasureCodeJerasureReedSolomonRAID6 (3,2) , the other are significantly slower (2-3x slower) and my 3P(3,2,1) implementation providing the same redundancy level like RS-Raid6[3,2] (double disk failure) but using more space (66% vs 100% overhead).

The effect of out.c_str() is significant ( contributes with factor 2 slow-down for the best jerasure algorithm for [3,2] ).

Averaged results for Objects Size 4MB:

1) Erasure CRS [3,2] - 2.6 ms buffer preparation (out.c_str()) - 2.4 ms encoding => ~780 MB/s
2) 3P [3,2,1] - 0,005 ms buffer preparation (3P adjusts the padding in the algorithm) - 0.87ms encoding => ~4.4 GB/s

I think it pays off to avoid the copy in the encoding if it does not matter for the buffer handling upstream and pad only the last chunk.

Last thing I tested is how performances scales with number of cores running 4 tests in parallel:

Jerasure (3,2) limits at ~2,0 GB/s for a 4-core CPU (Xeon 2.27 GHz). 3P(3,2,1) limits ~8 GB/s for a 4-core CPU (Xeon 2.27 GHz).

I also implemented the decoding for 3P, but didn't test yet all reconstruction cases. There is probably room for improvements using AVX support for XOR operations in both implementations.

Quoted 12 lines

Before I invest more time, do think it is useful to have this fast 3P algorithm for double disk failures with 100% space overhead? Because I believe that people will always optimize for space and would rather use something like (10,2) even if the performance degrades and CPU consumption goes up?!? Let me know, no problem in any case!

Finally I tested some combinations for ErasureCodeJerasureReedSolomonRAID6:

(3,2) (4,2) (6,2) (8,2) (10,2) they all run around 780-800 MB/s

Cheers Andreas.

--
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.

--
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

#8 lore raw

Hi Andreas,

That sounds reasonable. Would you be so kind as to send a patch with your changes ? I'll rework it into something that fits the test infrastructure of Ceph.

Cheers

Quoted 108 lines · Andreas Joachim Peters

Hi Loic,
I run a benchmark with the changed code tomorrow ... I actually had to insert some of my realtime benchmark macro's into your Jerasure code to see the different time fractions between buffer preparation & encoding step, but for you QA suite it is probably enough to get a total value after your fix. I will send you a program sampling the performance at different buffer sizes and encoding types.

I changed my code to use vector operations (128-bit XOR's) and it gives another 10% gain. I also want to try out if it makes sense to do the CRC32C computation in-line in the encoding step and compare it with the two step procedure first encoding all blocks, then CRC32C on all blocks.

Cheers Andreas.

________________________________________
From: Loic Dachary [[email protected]]
Sent: 21 September 2013 17:11
To: Andreas Joachim Peters
Cc: [email protected]
Subject: Re: CEPH Erasure Encoding + OSD Scalability

Hi Andreas,

It's probably too soon to be smart about reducing the number of copies, but you're right : this copy is not necessary. The following pull request gets rid of it:

https://github.com/ceph/ceph/pull/615

Cheers

Quoted 4 lines · Loic Dachary

Hi,

This is a first attempt at avoiding unnecessary copy:

Quoted 69 lines

https://github.com/dachary/ceph/blob/03445a5926cd073c11cd8693fb110729e40f35fa/src/osd/ErasureCodePluginJerasure/ErasureCodeJerasure.cc#L66

I'm not sure how it could be made more readable / terse with bufferlist iterators. Any kind of hint would be welcome :-)

Cheers

Quoted 61 lines · Sage Weil
Quoted 5 lines · Loic Dachary

Hi Andreas,

Great work on these benchmarks ! It's definitely an incentive to improve as much as possible. Could you push / send the scripts and sequence of operations you've used ? I'll reproduce this locally while getting rid of the extra copy. It would be useful to capture that into a script that can be conveniently run from the teuthology integrations tests to check against performance regressions.

Regarding the 3P implementation, in my opinion it would be very valuable for some people who prefer low CPU consumption. And I'm eager to see more than one plugin in the erasure code plugin directory ;-)

One way to approach this might be to make a bufferlist 'multi-iterator' that you give you bufferlist::iterator's and will give you back a pair of points and length for each contiguous segment. This would capture the annoying iterator details and let the user focus on processing chunks that are as large as possible.

sage

Quoted 45 lines

Cheers

Quoted 23 lines · Andreas Joachim Peters

Hi Loic,

I have now some benchmarks on a Xeon 2.27 GHz 4-core with gcc 4.4 (-O2) for ENCODING based on the CEPH Jerasure port.
I measured for objects from 128k to 512 MB with random contents (if you encode 1 GB objects you see slow downs due to caching inefficiencies ...), otherwise results are stable for the given object sizes.

I quote only the benchmark for ErasureCodeJerasureReedSolomonRAID6 (3,2) , the other are significantly slower (2-3x slower) and my 3P(3,2,1) implementation providing the same redundancy level like RS-Raid6[3,2] (double disk failure) but using more space (66% vs 100% overhead).

The effect of out.c_str() is significant ( contributes with factor 2 slow-down for the best jerasure algorithm for [3,2] ).

Averaged results for Objects Size 4MB:

1) Erasure CRS [3,2] - 2.6 ms buffer preparation (out.c_str()) - 2.4 ms encoding => ~780 MB/s
2) 3P [3,2,1] - 0,005 ms buffer preparation (3P adjusts the padding in the algorithm) - 0.87ms encoding => ~4.4 GB/s

I think it pays off to avoid the copy in the encoding if it does not matter for the buffer handling upstream and pad only the last chunk.

Last thing I tested is how performances scales with number of cores running 4 tests in parallel:

Jerasure (3,2) limits at ~2,0 GB/s for a 4-core CPU (Xeon 2.27 GHz). 3P(3,2,1) limits ~8 GB/s for a 4-core CPU (Xeon 2.27 GHz).

I also implemented the decoding for 3P, but didn't test yet all reconstruction cases. There is probably room for improvements using AVX support for XOR operations in both implementations.

Quoted 12 lines

Before I invest more time, do think it is useful to have this fast 3P algorithm for double disk failures with 100% space overhead? Because I believe that people will always optimize for space and would rather use something like (10,2) even if the performance degrades and CPU consumption goes up?!? Let me know, no problem in any case!

Finally I tested some combinations for ErasureCodeJerasureReedSolomonRAID6:

(3,2) (4,2) (6,2) (8,2) (10,2) they all run around 780-800 MB/s

Cheers Andreas.

--
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.

--
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.
#9 lore raw
In reply to Andreas Joachim Peters

Hi Loic,

I am finally doing the benchmark tool and I found a bunch of wrong parameter checks which can make the whole thing SEGV.

All the RAID-6 codes have restrictions on the parameters but they are not correctly enforced for Liberation & Blaum-Roth codes in the CEPH wrapper class ... see text from PDF

"Minimal Density RAID-6 codes are MDS codes based on binary matrices which satisfy a lower-bound on the number of non-zero entries. Unlike Cauchy coding, the bit-matrix elements do not correspond to elements in GF (2 w ). Instead, the bit-matrix itself has the proper MDS property. Minimal Density RAID-6 codes perform faster than Reed-Solomon and Cauchy Reed-Solomon codes for the same parameters. Liberation coding, Liber8tion coding, and Blaum-Roth coding are three examples of this kind of coding that are supported in jerasure.

With each of these codes, m must be equal to two and k must be less than or equal to w. The value of w has restrictions based on the code:

• With Liberation coding, w must be a prime number [Pla08b].
• With Blaum-Roth coding, w + 1 must be a prime number [BR99]. • With Liber8tion coding, w must equal 8 [Pla08a].

...

Do you add this fixes?

For the benchmark suite it runs currently 308 different configurations for the 2 algorithm which make sense from the performance point of view and provides this output:

# ----------------------------------------------------------------- # Erasure Coding Benchmark - (C) CERN 2013 - [email protected] # Ram-Size=12614856704 Allocation-Size=100000000
# -----------------------------------------------------------------

# [ -BENCH- ] [       ] technique=memcpy                                                            speed=5.408 [GB/s] latency=9.245 ms
# [ -BENCH- ] [       ] technique=d=a^b^c-xor                                                       speed=4.377 [GB/s] latency=17.136 ms
# [ -BENCH- ] [001/304] technique=cauchy_good:k=05:m=2:w=8:lp=0:packet=00064:size=50000000          speed=1.308 [GB/s] latency=038	[ms] size-overhead=40	[%]

..
..
# [ -BENCH- ] [304/304] technique=liberation:k=24:m=2:w=29:lp=2:packet=65536:size=50000000 speed=0.083 [GB/s] latency=604 [ms] size-overhead=16 [%]
# ----------------------------------------------------------------- # Erasure Code Performance Summary::
# -----------------------------------------------------------------
# RAM: 12.61 GB
# Allocation-Size 0.10 GB
# -----------------------------------------------------------------

# Byte Initialization:   29.35 MB/s
# Memcpy:                5.41 GB/s
# Triple-XOR:            4.38 GB/s

# -----------------------------------------------------------------
# Fastest RAID6 2.72 GB/s liber8tion:k=06:m=2:w=8:lp=0:packet=04096:size=50000000
# Fastest Triple Failure 0.96 GB/s cauchy_good:k=06:m=3:w=8:lp=0:packet=04096:size=50000000 # Fastest Quadr. Failure 0.66 GB/s cauchy_good:k=06:m=4:w=8:lp=0:packet=04096:size=50000000 # -----------------------------------------------------------------

# .................................................................
# Top 1  RAID6          2.72 GB/s liber8tion:k=06:m=2:w=8:lp=0:packet=04096:size=50000000
# Top 2  RAID6          2.72 GB/s liber8tion:k=06:m=2:w=8:lp=0:packet=16384:size=50000000
# Top 3  RAID6          2.64 GB/s liber8tion:k=06:m=2:w=8:lp=0:packet=65536:size=50000000
# Top 4  RAID6          2.60 GB/s liberation:k=07:m=2:w=7:lp=0:packet=16384:size=50000000
# Top 5  RAID6          2.59 GB/s liberation:k=05:m=2:w=7:lp=0:packet=04096:size=50000000
# .................................................................
# Top 1  Triple         0.96 GB/s cauchy_good:k=06:m=3:w=8:lp=0:packet=04096:size=50000000
# Top 2  Triple         0.94 GB/s cauchy_good:k=06:m=3:w=8:lp=0:packet=16384:size=50000000
# Top 3  Triple         0.93 GB/s cauchy_good:k=06:m=3:w=8:lp=0:packet=65536:size=50000000
# Top 4  Triple         0.89 GB/s cauchy_good:k=07:m=3:w=8:lp=0:packet=04096:size=50000000
# Top 5  Triple         0.87 GB/s cauchy_good:k=05:m=3:w=8:lp=0:packet=04096:size=50000000
# .................................................................
# Top 1  Quadr.         0.66 GB/s cauchy_good:k=06:m=4:w=8:lp=0:packet=04096:size=50000000
# Top 2  Quadr.         0.65 GB/s cauchy_good:k=07:m=4:w=8:lp=0:packet=04096:size=50000000
# Top 3  Quadr.         0.64 GB/s cauchy_good:k=06:m=4:w=8:lp=0:packet=16384:size=50000000
# Top 4  Quadr.         0.64 GB/s cauchy_good:k=05:m=4:w=8:lp=0:packet=04096:size=50000000
# Top 5  Quadr.         0.64 GB/s cauchy_good:k=06:m=4:w=8:lp=0:packet=65536:size=50000000
# .................................................................

It takes around 30 second on my box. I will add a measurement how the XOR and the 3 top algorithms scale with the number of cores and make the object-size configurable from the command line. Anything else ? Shall I add the possiblity to test a single user specified configuration via command line arguments?

Cheers Andreas.

--
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

#10 lore raw

Hi Andreas,

Quoted 8 lines · Andreas Joachim Peters

Hi Loic,

I am finally doing the benchmark tool and I found a bunch of wrong parameter checks which can make the whole thing SEGV.

All the RAID-6 codes have restrictions on the parameters but they are not correctly enforced for Liberation & Blaum-Roth codes in the CEPH wrapper class ... see text from PDF

"Minimal Density RAID-6 codes are MDS codes based on binary matrices which satisfy a lower-bound on the number of non-zero entries. Unlike Cauchy coding, the bit-matrix elements do not correspond to elements in GF (2 w ). Instead, the bit-matrix itself has the proper MDS property. Minimal Density RAID-6 codes perform faster than Reed-Solomon and Cauchy Reed-Solomon codes for the same parameters. Liberation coding, Liber8tion coding, and Blaum-Roth coding are three examples of this kind of coding that are supported in jerasure.

Quoted 8 lines

With each of these codes, m must be equal to two and k must be less than or equal to w. The value of w has restrictions based on the code:

• With Liberation coding, w must be a prime number [Pla08b].
• With Blaum-Roth coding, w + 1 must be a prime number [BR99]. • With Liber8tion coding, w must equal 8 [Pla08a].

...

Do you add this fixes?

Nice catch. I created and assigned to myself : http://tracker.ceph.com/issues/6754

Quoted 48 lines

For the benchmark suite it runs currently 308 different configurations for the 2 algorithm which make sense from the performance point of view and provides this output:

# ----------------------------------------------------------------- # Erasure Coding Benchmark - (C) CERN 2013 - [email protected] # Ram-Size=12614856704 Allocation-Size=100000000
# -----------------------------------------------------------------

# [ -BENCH- ] [       ] technique=memcpy                                                            speed=5.408 [GB/s] latency=9.245 ms
# [ -BENCH- ] [       ] technique=d=a^b^c-xor                                                       speed=4.377 [GB/s] latency=17.136 ms
# [ -BENCH- ] [001/304] technique=cauchy_good:k=05:m=2:w=8:lp=0:packet=00064:size=50000000          speed=1.308 [GB/s] latency=038	[ms] size-overhead=40	[%]

..
..
# [ -BENCH- ] [304/304] technique=liberation:k=24:m=2:w=29:lp=2:packet=65536:size=50000000 speed=0.083 [GB/s] latency=604 [ms] size-overhead=16 [%]
# ----------------------------------------------------------------- # Erasure Code Performance Summary::
# -----------------------------------------------------------------
# RAM: 12.61 GB
# Allocation-Size 0.10 GB
# -----------------------------------------------------------------

# Byte Initialization:   29.35 MB/s
# Memcpy:                5.41 GB/s
# Triple-XOR:            4.38 GB/s

# -----------------------------------------------------------------
# Fastest RAID6 2.72 GB/s liber8tion:k=06:m=2:w=8:lp=0:packet=04096:size=50000000
# Fastest Triple Failure 0.96 GB/s cauchy_good:k=06:m=3:w=8:lp=0:packet=04096:size=50000000 # Fastest Quadr. Failure 0.66 GB/s cauchy_good:k=06:m=4:w=8:lp=0:packet=04096:size=50000000 # -----------------------------------------------------------------

# .................................................................
# Top 1  RAID6          2.72 GB/s liber8tion:k=06:m=2:w=8:lp=0:packet=04096:size=50000000
# Top 2  RAID6          2.72 GB/s liber8tion:k=06:m=2:w=8:lp=0:packet=16384:size=50000000
# Top 3  RAID6          2.64 GB/s liber8tion:k=06:m=2:w=8:lp=0:packet=65536:size=50000000
# Top 4  RAID6          2.60 GB/s liberation:k=07:m=2:w=7:lp=0:packet=16384:size=50000000
# Top 5  RAID6          2.59 GB/s liberation:k=05:m=2:w=7:lp=0:packet=04096:size=50000000
# .................................................................
# Top 1  Triple         0.96 GB/s cauchy_good:k=06:m=3:w=8:lp=0:packet=04096:size=50000000
# Top 2  Triple         0.94 GB/s cauchy_good:k=06:m=3:w=8:lp=0:packet=16384:size=50000000
# Top 3  Triple         0.93 GB/s cauchy_good:k=06:m=3:w=8:lp=0:packet=65536:size=50000000
# Top 4  Triple         0.89 GB/s cauchy_good:k=07:m=3:w=8:lp=0:packet=04096:size=50000000
# Top 5  Triple         0.87 GB/s cauchy_good:k=05:m=3:w=8:lp=0:packet=04096:size=50000000
# .................................................................
# Top 1  Quadr.         0.66 GB/s cauchy_good:k=06:m=4:w=8:lp=0:packet=04096:size=50000000
# Top 2  Quadr.         0.65 GB/s cauchy_good:k=07:m=4:w=8:lp=0:packet=04096:size=50000000
# Top 3  Quadr.         0.64 GB/s cauchy_good:k=06:m=4:w=8:lp=0:packet=16384:size=50000000
# Top 4  Quadr.         0.64 GB/s cauchy_good:k=05:m=4:w=8:lp=0:packet=04096:size=50000000
# Top 5  Quadr.         0.64 GB/s cauchy_good:k=06:m=4:w=8:lp=0:packet=65536:size=50000000
# .................................................................
Quoted 1 line

It takes around 30 second on my box.

That looks great :-) If I understand correctly, it means https://github.com/ceph/ceph/pull/740 will no longer have benchmarks as they are moved to a separate program. Correct ?

Quoted 1 line

I will add a measurement how the XOR and the 3 top algorithms scale with the number of cores and make the object-size configurable from the command line. Anything else ?

It would be convenient to run this from a "workunit" ( i.e. a script in ceph/qa/workunits/ ) so that it can later be run by teuthology integration tests. That could be used to show regression.

Shall I add the possiblity to test a single user specified configuration via command line arguments?

Quoted 1 line

I would need to play with it to comment usefully.

Cheers

Signature · 5 lines
Loïc Dachary, Artisan Logiciel Libre
--
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
#11 lore raw

Hi Loic et al,
Dan pointed me to this:

http://sourceforge.net/p/snapraid/code/ci/master/tree/raid.c

It has a very straight forward API and GPL license ...

The implementation seems more performant than the current Jerasure library probably due to the use of ssse3 extensions and slightly less flexibility.... maybe it is worth a plugin or to become "the" plugin? It seems also worth to rewrite the xoring function I use with the sse2 assembler xor ...

It comes also with a nice benchmark tool, here are the results on my 'standard' Xeon for a 4MB block with 8 disks + parity disks ....:

./snapraid -T
snapraid v5.0 by Andrea Mazzoleni, http://snapraid.sourceforge.net
Compiler gcc 4.8.1
CPU GenuineIntel, family 6, model 26, flags mmx sse2 ssse3 sse42 Memory is little-endian 64-bit
Support nanosecond timestamps with futimens()

Speed test using 8 buffers of 524288 bytes, for a total of 4096 KiB.
The reported value is the sustainable aggregate bandwidth of all data disks in MiB/s (not counting parity disks).

Memory write speed using the C memset() function:
  memset   15873

CRC used to check the content file integrity:
   table     857
   intel    6689

Hash used to check the data blocks integrity:
            best murmur3 spooky2
    hash spooky2    2987    6998

RAID functions used for computing the parity with 'sync':
            best    int8   int32   int64    sse2   sse2e   ssse3  ssse3e par1    sse2            6201   11080   19404
    par2   sse2e            1851    3462    9949   10359 parz   sse2e            1134    2020    5157    5738 par3  ssse3e     421                                    4766    5225 par4  ssse3e     303                                    3449    3844 par5  ssse3e     241                                    2750    2830 par6  ssse3e     198                                    2189    2261

RAID functions used for recovering with 'fix':
            best    int8   ssse3
    rec1   ssse3     496    1029
    rec2   ssse3     208     477
    rec3   ssse3      51     261
    rec4   ssse3      33     170
    rec5   ssse3      22     112
    rec6   ssse3      16      86

________________________________________
From: Loic Dachary [[email protected]]
Sent: 12 November 2013 19:06
To: Andreas Joachim Peters
Cc: [email protected]
Subject: Re: CEPH Erasure Encoding + OSD Scalability

Hi Andreas,

Quoted 8 lines · Andreas Joachim Peters

Hi Loic,

I am finally doing the benchmark tool and I found a bunch of wrong parameter checks which can make the whole thing SEGV.

All the RAID-6 codes have restrictions on the parameters but they are not correctly enforced for Liberation & Blaum-Roth codes in the CEPH wrapper class ... see text from PDF

"Minimal Density RAID-6 codes are MDS codes based on binary matrices which satisfy a lower-bound on the number of non-zero entries. Unlike Cauchy coding, the bit-matrix elements do not correspond to elements in GF (2 w ). Instead, the bit-matrix itself has the proper MDS property. Minimal Density RAID-6 codes perform faster than Reed-Solomon and Cauchy Reed-Solomon codes for the same parameters. Liberation coding, Liber8tion coding, and Blaum-Roth coding are three examples of this kind of coding that are supported in jerasure.

Quoted 8 lines

With each of these codes, m must be equal to two and k must be less than or equal to w. The value of w has restrictions based on the code:

• With Liberation coding, w must be a prime number [Pla08b].
• With Blaum-Roth coding, w + 1 must be a prime number [BR99]. • With Liber8tion coding, w must equal 8 [Pla08a].

...

Do you add this fixes?

Nice catch. I created and assigned to myself : http://tracker.ceph.com/issues/6754

Quoted 48 lines

For the benchmark suite it runs currently 308 different configurations for the 2 algorithm which make sense from the performance point of view and provides this output:

# ----------------------------------------------------------------- # Erasure Coding Benchmark - (C) CERN 2013 - [email protected] # Ram-Size=12614856704 Allocation-Size=100000000
# -----------------------------------------------------------------

# [ -BENCH- ] [       ] technique=memcpy                                                            speed=5.408 [GB/s] latency=9.245 ms
# [ -BENCH- ] [       ] technique=d=a^b^c-xor                                                       speed=4.377 [GB/s] latency=17.136 ms
# [ -BENCH- ] [001/304] technique=cauchy_good:k=05:m=2:w=8:lp=0:packet=00064:size=50000000          speed=1.308 [GB/s] latency=038    [ms] size-overhead=40   [%]

..
..
# [ -BENCH- ] [304/304] technique=liberation:k=24:m=2:w=29:lp=2:packet=65536:size=50000000 speed=0.083 [GB/s] latency=604 [ms] size-overhead=16 [%]
# ----------------------------------------------------------------- # Erasure Code Performance Summary::
# -----------------------------------------------------------------
# RAM: 12.61 GB
# Allocation-Size 0.10 GB
# -----------------------------------------------------------------

# Byte Initialization:   29.35 MB/s
# Memcpy:                5.41 GB/s
# Triple-XOR:            4.38 GB/s

# -----------------------------------------------------------------
# Fastest RAID6 2.72 GB/s liber8tion:k=06:m=2:w=8:lp=0:packet=04096:size=50000000
# Fastest Triple Failure 0.96 GB/s cauchy_good:k=06:m=3:w=8:lp=0:packet=04096:size=50000000 # Fastest Quadr. Failure 0.66 GB/s cauchy_good:k=06:m=4:w=8:lp=0:packet=04096:size=50000000 # -----------------------------------------------------------------

# .................................................................
# Top 1  RAID6          2.72 GB/s liber8tion:k=06:m=2:w=8:lp=0:packet=04096:size=50000000
# Top 2  RAID6          2.72 GB/s liber8tion:k=06:m=2:w=8:lp=0:packet=16384:size=50000000
# Top 3  RAID6          2.64 GB/s liber8tion:k=06:m=2:w=8:lp=0:packet=65536:size=50000000
# Top 4  RAID6          2.60 GB/s liberation:k=07:m=2:w=7:lp=0:packet=16384:size=50000000
# Top 5  RAID6          2.59 GB/s liberation:k=05:m=2:w=7:lp=0:packet=04096:size=50000000
# .................................................................
# Top 1  Triple         0.96 GB/s cauchy_good:k=06:m=3:w=8:lp=0:packet=04096:size=50000000
# Top 2  Triple         0.94 GB/s cauchy_good:k=06:m=3:w=8:lp=0:packet=16384:size=50000000
# Top 3  Triple         0.93 GB/s cauchy_good:k=06:m=3:w=8:lp=0:packet=65536:size=50000000
# Top 4  Triple         0.89 GB/s cauchy_good:k=07:m=3:w=8:lp=0:packet=04096:size=50000000
# Top 5  Triple         0.87 GB/s cauchy_good:k=05:m=3:w=8:lp=0:packet=04096:size=50000000
# .................................................................
# Top 1  Quadr.         0.66 GB/s cauchy_good:k=06:m=4:w=8:lp=0:packet=04096:size=50000000
# Top 2  Quadr.         0.65 GB/s cauchy_good:k=07:m=4:w=8:lp=0:packet=04096:size=50000000
# Top 3  Quadr.         0.64 GB/s cauchy_good:k=06:m=4:w=8:lp=0:packet=16384:size=50000000
# Top 4  Quadr.         0.64 GB/s cauchy_good:k=05:m=4:w=8:lp=0:packet=04096:size=50000000
# Top 5  Quadr.         0.64 GB/s cauchy_good:k=06:m=4:w=8:lp=0:packet=65536:size=50000000
# .................................................................
Quoted 1 line

It takes around 30 second on my box.

That looks great :-) If I understand correctly, it means https://github.com/ceph/ceph/pull/740 will no longer have benchmarks as they are moved to a separate program. Correct ?

Quoted 1 line

I will add a measurement how the XOR and the 3 top algorithms scale with the number of cores and make the object-size configurable from the command line. Anything else ?

It would be convenient to run this from a "workunit" ( i.e. a script in ceph/qa/workunits/ ) so that it can later be run by teuthology integration tests. That could be used to show regression.

Shall I add the possiblity to test a single user specified configuration via command line arguments?

Quoted 1 line

I would need to play with it to comment usefully.

Cheers

--
Loïc Dachary, Artisan Logiciel Libre
--
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

#12 lore raw
In reply to Loic Dachary

Hi,

Mark Nelson suggested we use perf ( linux-tools ) for benchmarking. It looks like something that would help indeed : the benchmark program would only concern itself with doing some work according to the options and let performances be collected from the outside, using tools that are familiar to people doing benchmarking.

What do you think ?

Cheers

$ perf stat -e
  Error: switch `e' requires a value

usage: perf stat [<options>] [<command>]

-e, --event <event> event selector. use 'perf list' to list available events
--filter <filter>
event filter
-i, --no-inherit child tasks do not inherit counters
-p, --pid <pid> stat events on existing process id
-t, --tid <tid> stat events on existing thread id
-a, --all-cpus system-wide collection from all CPUs
-g, --group put the counters into a counter group
-c, --scale scale/normalize counters
-v, --verbose be more verbose (show counter open errors, etc)
-r, --repeat <n> repeat command and print average + stddev (max: 100, forever: 0)
-n, --null null run - dont start any counters
-d, --detailed detailed run - start a lot of events
-S, --sync call sync() before starting a run
-B, --big-num print large numbers with thousands' separators
-C, --cpu <cpu> list of cpus to monitor in system-wide
-A, --no-aggr disable CPU count aggregation
-x, --field-separator <separator>
print counts with custom separator
-G, --cgroup <name> monitor event in cgroup name only
-o, --output <file> output file name
--append append to the output file
--log-fd <n> log output to fd, instead of stderr
--pre <command> command to run prior to the measured command
--post <command> command to run after to the measured command
-I, --interval-print <n>
print counts at regular interval in ms (>= 100)
--per-socket aggregate counts per processor socket
--per-core aggregate counts per physical processor core

Quoted 84 lines · Loic Dachary

Hi Andreas,

Quoted 8 lines · Andreas Joachim Peters

Hi Loic,

I am finally doing the benchmark tool and I found a bunch of wrong parameter checks which can make the whole thing SEGV.

All the RAID-6 codes have restrictions on the parameters but they are not correctly enforced for Liberation & Blaum-Roth codes in the CEPH wrapper class ... see text from PDF

"Minimal Density RAID-6 codes are MDS codes based on binary matrices which satisfy a lower-bound on the number of non-zero entries. Unlike Cauchy coding, the bit-matrix elements do not correspond to elements in GF (2 w ). Instead, the bit-matrix itself has the proper MDS property. Minimal Density RAID-6 codes perform faster than Reed-Solomon and Cauchy Reed-Solomon codes for the same parameters. Liberation coding, Liber8tion coding, and Blaum-Roth coding are three examples of this kind of coding that are supported in jerasure.

Quoted 8 lines

With each of these codes, m must be equal to two and k must be less than or equal to w. The value of w has restrictions based on the code:

• With Liberation coding, w must be a prime number [Pla08b].
• With Blaum-Roth coding, w + 1 must be a prime number [BR99]. • With Liber8tion coding, w must equal 8 [Pla08a].

...

Do you add this fixes?

Nice catch. I created and assigned to myself : http://tracker.ceph.com/issues/6754

Quoted 48 lines

For the benchmark suite it runs currently 308 different configurations for the 2 algorithm which make sense from the performance point of view and provides this output:

# ----------------------------------------------------------------- # Erasure Coding Benchmark - (C) CERN 2013 - [email protected] # Ram-Size=12614856704 Allocation-Size=100000000
# -----------------------------------------------------------------

# [ -BENCH- ] [       ] technique=memcpy                                                            speed=5.408 [GB/s] latency=9.245 ms
# [ -BENCH- ] [       ] technique=d=a^b^c-xor                                                       speed=4.377 [GB/s] latency=17.136 ms
# [ -BENCH- ] [001/304] technique=cauchy_good:k=05:m=2:w=8:lp=0:packet=00064:size=50000000          speed=1.308 [GB/s] latency=038	[ms] size-overhead=40	[%]

..
..
# [ -BENCH- ] [304/304] technique=liberation:k=24:m=2:w=29:lp=2:packet=65536:size=50000000 speed=0.083 [GB/s] latency=604 [ms] size-overhead=16 [%]
# ----------------------------------------------------------------- # Erasure Code Performance Summary::
# -----------------------------------------------------------------
# RAM: 12.61 GB
# Allocation-Size 0.10 GB
# -----------------------------------------------------------------

# Byte Initialization:   29.35 MB/s
# Memcpy:                5.41 GB/s
# Triple-XOR:            4.38 GB/s

# -----------------------------------------------------------------
# Fastest RAID6 2.72 GB/s liber8tion:k=06:m=2:w=8:lp=0:packet=04096:size=50000000
# Fastest Triple Failure 0.96 GB/s cauchy_good:k=06:m=3:w=8:lp=0:packet=04096:size=50000000 # Fastest Quadr. Failure 0.66 GB/s cauchy_good:k=06:m=4:w=8:lp=0:packet=04096:size=50000000 # -----------------------------------------------------------------

# .................................................................
# Top 1  RAID6          2.72 GB/s liber8tion:k=06:m=2:w=8:lp=0:packet=04096:size=50000000
# Top 2  RAID6          2.72 GB/s liber8tion:k=06:m=2:w=8:lp=0:packet=16384:size=50000000
# Top 3  RAID6          2.64 GB/s liber8tion:k=06:m=2:w=8:lp=0:packet=65536:size=50000000
# Top 4  RAID6          2.60 GB/s liberation:k=07:m=2:w=7:lp=0:packet=16384:size=50000000
# Top 5  RAID6          2.59 GB/s liberation:k=05:m=2:w=7:lp=0:packet=04096:size=50000000
# .................................................................
# Top 1  Triple         0.96 GB/s cauchy_good:k=06:m=3:w=8:lp=0:packet=04096:size=50000000
# Top 2  Triple         0.94 GB/s cauchy_good:k=06:m=3:w=8:lp=0:packet=16384:size=50000000
# Top 3  Triple         0.93 GB/s cauchy_good:k=06:m=3:w=8:lp=0:packet=65536:size=50000000
# Top 4  Triple         0.89 GB/s cauchy_good:k=07:m=3:w=8:lp=0:packet=04096:size=50000000
# Top 5  Triple         0.87 GB/s cauchy_good:k=05:m=3:w=8:lp=0:packet=04096:size=50000000
# .................................................................
# Top 1  Quadr.         0.66 GB/s cauchy_good:k=06:m=4:w=8:lp=0:packet=04096:size=50000000
# Top 2  Quadr.         0.65 GB/s cauchy_good:k=07:m=4:w=8:lp=0:packet=04096:size=50000000
# Top 3  Quadr.         0.64 GB/s cauchy_good:k=06:m=4:w=8:lp=0:packet=16384:size=50000000
# Top 4  Quadr.         0.64 GB/s cauchy_good:k=05:m=4:w=8:lp=0:packet=04096:size=50000000
# Top 5  Quadr.         0.64 GB/s cauchy_good:k=06:m=4:w=8:lp=0:packet=65536:size=50000000
# .................................................................
Quoted 1 line

It takes around 30 second on my box.

That looks great :-) If I understand correctly, it means https://github.com/ceph/ceph/pull/740 will no longer have benchmarks as they are moved to a separate program. Correct ?

Quoted 1 line

I will add a measurement how the XOR and the 3 top algorithms scale with the number of cores and make the object-size configurable from the command line. Anything else ?

It would be convenient to run this from a "workunit" ( i.e. a script in ceph/qa/workunits/ ) so that it can later be run by teuthology integration tests. That could be used to show regression.

Shall I add the possiblity to test a single user specified configuration via command line arguments?

Quoted 1 line

I would need to play with it to comment usefully.

Cheers

Signature · 1 line
Loïc Dachary, Artisan Logiciel Libre
#13 lore raw

I will mention that this is a good tool if you want really detailed profiling or cpu counter data about what's going on. Other tools that are more generic (ie ones that just read data from proc, ie collectl, sar, etc) may also be options.

Mark

Quoted 44 lines · Loic Dachary

Hi,

Mark Nelson suggested we use perf ( linux-tools ) for benchmarking. It looks like something that would help indeed : the benchmark program would only concern itself with doing some work according to the options and let performances be collected from the outside, using tools that are familiar to people doing benchmarking.

What do you think ?

Cheers

$ perf stat -e
   Error: switch `e' requires a value

usage: perf stat [<options>] [<command>]

-e, --event <event> event selector. use 'perf list' to list available events
--filter <filter>
event filter
-i, --no-inherit child tasks do not inherit counters
-p, --pid <pid> stat events on existing process id
-t, --tid <tid> stat events on existing thread id
-a, --all-cpus system-wide collection from all CPUs
-g, --group put the counters into a counter group
-c, --scale scale/normalize counters
-v, --verbose be more verbose (show counter open errors, etc)
-r, --repeat <n> repeat command and print average + stddev (max: 100, forever: 0)
-n, --null null run - dont start any counters
-d, --detailed detailed run - start a lot of events
-S, --sync call sync() before starting a run
-B, --big-num print large numbers with thousands' separators
-C, --cpu <cpu> list of cpus to monitor in system-wide
-A, --no-aggr disable CPU count aggregation
-x, --field-separator <separator>
print counts with custom separator
-G, --cgroup <name> monitor event in cgroup name only
-o, --output <file> output file name
--append append to the output file
--log-fd <n> log output to fd, instead of stderr
--pre <command> command to run prior to the measured command
--post <command> command to run after to the measured command
-I, --interval-print <n>
print counts at regular interval in ms (>= 100)
--per-socket aggregate counts per processor socket
--per-core aggregate counts per physical processor core

Quoted 86 lines
Quoted 84 lines · Loic Dachary

Hi Andreas,

Quoted 8 lines · Andreas Joachim Peters

Hi Loic,

I am finally doing the benchmark tool and I found a bunch of wrong parameter checks which can make the whole thing SEGV.

All the RAID-6 codes have restrictions on the parameters but they are not correctly enforced for Liberation & Blaum-Roth codes in the CEPH wrapper class ... see text from PDF

"Minimal Density RAID-6 codes are MDS codes based on binary matrices which satisfy a lower-bound on the number of non-zero entries. Unlike Cauchy coding, the bit-matrix elements do not correspond to elements in GF (2 w ). Instead, the bit-matrix itself has the proper MDS property. Minimal Density RAID-6 codes perform faster than Reed-Solomon and Cauchy Reed-Solomon codes for the same parameters. Liberation coding, Liber8tion coding, and Blaum-Roth coding are three examples of this kind of coding that are supported in jerasure.

Quoted 8 lines

With each of these codes, m must be equal to two and k must be less than or equal to w. The value of w has restrictions based on the code:

• With Liberation coding, w must be a prime number [Pla08b].
• With Blaum-Roth coding, w + 1 must be a prime number [BR99]. • With Liber8tion coding, w must equal 8 [Pla08a].

...

Do you add this fixes?

Nice catch. I created and assigned to myself : http://tracker.ceph.com/issues/6754

Quoted 48 lines

For the benchmark suite it runs currently 308 different configurations for the 2 algorithm which make sense from the performance point of view and provides this output:

# ----------------------------------------------------------------- # Erasure Coding Benchmark - (C) CERN 2013 - [email protected] # Ram-Size=12614856704 Allocation-Size=100000000
# -----------------------------------------------------------------

# [ -BENCH- ] [       ] technique=memcpy                                                            speed=5.408 [GB/s] latency=9.245 ms
# [ -BENCH- ] [       ] technique=d=a^b^c-xor                                                       speed=4.377 [GB/s] latency=17.136 ms
# [ -BENCH- ] [001/304] technique=cauchy_good:k=05:m=2:w=8:lp=0:packet=00064:size=50000000          speed=1.308 [GB/s] latency=038	[ms] size-overhead=40	[%]

..
..
# [ -BENCH- ] [304/304] technique=liberation:k=24:m=2:w=29:lp=2:packet=65536:size=50000000 speed=0.083 [GB/s] latency=604 [ms] size-overhead=16 [%]
# ----------------------------------------------------------------- # Erasure Code Performance Summary::
# -----------------------------------------------------------------
# RAM: 12.61 GB
# Allocation-Size 0.10 GB
# -----------------------------------------------------------------

# Byte Initialization:   29.35 MB/s
# Memcpy:                5.41 GB/s
# Triple-XOR:            4.38 GB/s

# -----------------------------------------------------------------
# Fastest RAID6 2.72 GB/s liber8tion:k=06:m=2:w=8:lp=0:packet=04096:size=50000000
# Fastest Triple Failure 0.96 GB/s cauchy_good:k=06:m=3:w=8:lp=0:packet=04096:size=50000000 # Fastest Quadr. Failure 0.66 GB/s cauchy_good:k=06:m=4:w=8:lp=0:packet=04096:size=50000000 # -----------------------------------------------------------------

# .................................................................
# Top 1  RAID6          2.72 GB/s liber8tion:k=06:m=2:w=8:lp=0:packet=04096:size=50000000
# Top 2  RAID6          2.72 GB/s liber8tion:k=06:m=2:w=8:lp=0:packet=16384:size=50000000
# Top 3  RAID6          2.64 GB/s liber8tion:k=06:m=2:w=8:lp=0:packet=65536:size=50000000
# Top 4  RAID6          2.60 GB/s liberation:k=07:m=2:w=7:lp=0:packet=16384:size=50000000
# Top 5  RAID6          2.59 GB/s liberation:k=05:m=2:w=7:lp=0:packet=04096:size=50000000
# .................................................................
# Top 1  Triple         0.96 GB/s cauchy_good:k=06:m=3:w=8:lp=0:packet=04096:size=50000000
# Top 2  Triple         0.94 GB/s cauchy_good:k=06:m=3:w=8:lp=0:packet=16384:size=50000000
# Top 3  Triple         0.93 GB/s cauchy_good:k=06:m=3:w=8:lp=0:packet=65536:size=50000000
# Top 4  Triple         0.89 GB/s cauchy_good:k=07:m=3:w=8:lp=0:packet=04096:size=50000000
# Top 5  Triple         0.87 GB/s cauchy_good:k=05:m=3:w=8:lp=0:packet=04096:size=50000000
# .................................................................
# Top 1  Quadr.         0.66 GB/s cauchy_good:k=06:m=4:w=8:lp=0:packet=04096:size=50000000
# Top 2  Quadr.         0.65 GB/s cauchy_good:k=07:m=4:w=8:lp=0:packet=04096:size=50000000
# Top 3  Quadr.         0.64 GB/s cauchy_good:k=06:m=4:w=8:lp=0:packet=16384:size=50000000
# Top 4  Quadr.         0.64 GB/s cauchy_good:k=05:m=4:w=8:lp=0:packet=04096:size=50000000
# Top 5  Quadr.         0.64 GB/s cauchy_good:k=06:m=4:w=8:lp=0:packet=65536:size=50000000
# .................................................................
Quoted 1 line

It takes around 30 second on my box.

That looks great :-) If I understand correctly, it means https://github.com/ceph/ceph/pull/740 will no longer have benchmarks as they are moved to a separate program. Correct ?

Quoted 1 line

I will add a measurement how the XOR and the 3 top algorithms scale with the number of cores and make the object-size configurable from the command line. Anything else ?

It would be convenient to run this from a "workunit" ( i.e. a script in ceph/qa/workunits/ ) so that it can later be run by teuthology integration tests. That could be used to show regression.

Shall I add the possiblity to test a single user specified configuration via command line arguments?

Quoted 1 line

I would need to play with it to comment usefully.

Cheers

--
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

#14 lore raw
In reply to Loic Dachary

Maybe using

http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html

is enough. fsbench looks overkill indeed.

/me exploring options ;-)

Quoted 130 lines · Loic Dachary

Hi,

Mark Nelson suggested we use perf ( linux-tools ) for benchmarking. It looks like something that would help indeed : the benchmark program would only concern itself with doing some work according to the options and let performances be collected from the outside, using tools that are familiar to people doing benchmarking.

What do you think ?

Cheers

$ perf stat -e
  Error: switch `e' requires a value

usage: perf stat [<options>] [<command>]

-e, --event <event> event selector. use 'perf list' to list available events
--filter <filter>
event filter
-i, --no-inherit child tasks do not inherit counters
-p, --pid <pid> stat events on existing process id
-t, --tid <tid> stat events on existing thread id
-a, --all-cpus system-wide collection from all CPUs
-g, --group put the counters into a counter group
-c, --scale scale/normalize counters
-v, --verbose be more verbose (show counter open errors, etc)
-r, --repeat <n> repeat command and print average + stddev (max: 100, forever: 0)
-n, --null null run - dont start any counters
-d, --detailed detailed run - start a lot of events
-S, --sync call sync() before starting a run
-B, --big-num print large numbers with thousands' separators
-C, --cpu <cpu> list of cpus to monitor in system-wide
-A, --no-aggr disable CPU count aggregation
-x, --field-separator <separator>
print counts with custom separator
-G, --cgroup <name> monitor event in cgroup name only
-o, --output <file> output file name
--append append to the output file
--log-fd <n> log output to fd, instead of stderr
--pre <command> command to run prior to the measured command
--post <command> command to run after to the measured command
-I, --interval-print <n>
print counts at regular interval in ms (>= 100)
--per-socket aggregate counts per processor socket
--per-core aggregate counts per physical processor core

Quoted 84 lines · Loic Dachary

Hi Andreas,

Quoted 8 lines · Andreas Joachim Peters

Hi Loic,

I am finally doing the benchmark tool and I found a bunch of wrong parameter checks which can make the whole thing SEGV.

All the RAID-6 codes have restrictions on the parameters but they are not correctly enforced for Liberation & Blaum-Roth codes in the CEPH wrapper class ... see text from PDF

"Minimal Density RAID-6 codes are MDS codes based on binary matrices which satisfy a lower-bound on the number of non-zero entries. Unlike Cauchy coding, the bit-matrix elements do not correspond to elements in GF (2 w ). Instead, the bit-matrix itself has the proper MDS property. Minimal Density RAID-6 codes perform faster than Reed-Solomon and Cauchy Reed-Solomon codes for the same parameters. Liberation coding, Liber8tion coding, and Blaum-Roth coding are three examples of this kind of coding that are supported in jerasure.

Quoted 8 lines

With each of these codes, m must be equal to two and k must be less than or equal to w. The value of w has restrictions based on the code:

• With Liberation coding, w must be a prime number [Pla08b].
• With Blaum-Roth coding, w + 1 must be a prime number [BR99]. • With Liber8tion coding, w must equal 8 [Pla08a].

...

Do you add this fixes?

Nice catch. I created and assigned to myself : http://tracker.ceph.com/issues/6754

Quoted 48 lines

For the benchmark suite it runs currently 308 different configurations for the 2 algorithm which make sense from the performance point of view and provides this output:

# ----------------------------------------------------------------- # Erasure Coding Benchmark - (C) CERN 2013 - [email protected] # Ram-Size=12614856704 Allocation-Size=100000000
# -----------------------------------------------------------------

# [ -BENCH- ] [       ] technique=memcpy                                                            speed=5.408 [GB/s] latency=9.245 ms
# [ -BENCH- ] [       ] technique=d=a^b^c-xor                                                       speed=4.377 [GB/s] latency=17.136 ms
# [ -BENCH- ] [001/304] technique=cauchy_good:k=05:m=2:w=8:lp=0:packet=00064:size=50000000          speed=1.308 [GB/s] latency=038	[ms] size-overhead=40	[%]

..
..
# [ -BENCH- ] [304/304] technique=liberation:k=24:m=2:w=29:lp=2:packet=65536:size=50000000 speed=0.083 [GB/s] latency=604 [ms] size-overhead=16 [%]
# ----------------------------------------------------------------- # Erasure Code Performance Summary::
# -----------------------------------------------------------------
# RAM: 12.61 GB
# Allocation-Size 0.10 GB
# -----------------------------------------------------------------

# Byte Initialization:   29.35 MB/s
# Memcpy:                5.41 GB/s
# Triple-XOR:            4.38 GB/s

# -----------------------------------------------------------------
# Fastest RAID6 2.72 GB/s liber8tion:k=06:m=2:w=8:lp=0:packet=04096:size=50000000
# Fastest Triple Failure 0.96 GB/s cauchy_good:k=06:m=3:w=8:lp=0:packet=04096:size=50000000 # Fastest Quadr. Failure 0.66 GB/s cauchy_good:k=06:m=4:w=8:lp=0:packet=04096:size=50000000 # -----------------------------------------------------------------

# .................................................................
# Top 1  RAID6          2.72 GB/s liber8tion:k=06:m=2:w=8:lp=0:packet=04096:size=50000000
# Top 2  RAID6          2.72 GB/s liber8tion:k=06:m=2:w=8:lp=0:packet=16384:size=50000000
# Top 3  RAID6          2.64 GB/s liber8tion:k=06:m=2:w=8:lp=0:packet=65536:size=50000000
# Top 4  RAID6          2.60 GB/s liberation:k=07:m=2:w=7:lp=0:packet=16384:size=50000000
# Top 5  RAID6          2.59 GB/s liberation:k=05:m=2:w=7:lp=0:packet=04096:size=50000000
# .................................................................
# Top 1  Triple         0.96 GB/s cauchy_good:k=06:m=3:w=8:lp=0:packet=04096:size=50000000
# Top 2  Triple         0.94 GB/s cauchy_good:k=06:m=3:w=8:lp=0:packet=16384:size=50000000
# Top 3  Triple         0.93 GB/s cauchy_good:k=06:m=3:w=8:lp=0:packet=65536:size=50000000
# Top 4  Triple         0.89 GB/s cauchy_good:k=07:m=3:w=8:lp=0:packet=04096:size=50000000
# Top 5  Triple         0.87 GB/s cauchy_good:k=05:m=3:w=8:lp=0:packet=04096:size=50000000
# .................................................................
# Top 1  Quadr.         0.66 GB/s cauchy_good:k=06:m=4:w=8:lp=0:packet=04096:size=50000000
# Top 2  Quadr.         0.65 GB/s cauchy_good:k=07:m=4:w=8:lp=0:packet=04096:size=50000000
# Top 3  Quadr.         0.64 GB/s cauchy_good:k=06:m=4:w=8:lp=0:packet=16384:size=50000000
# Top 4  Quadr.         0.64 GB/s cauchy_good:k=05:m=4:w=8:lp=0:packet=04096:size=50000000
# Top 5  Quadr.         0.64 GB/s cauchy_good:k=06:m=4:w=8:lp=0:packet=65536:size=50000000
# .................................................................
Quoted 1 line

It takes around 30 second on my box.

That looks great :-) If I understand correctly, it means https://github.com/ceph/ceph/pull/740 will no longer have benchmarks as they are moved to a separate program. Correct ?

Quoted 1 line

I will add a measurement how the XOR and the 3 top algorithms scale with the number of cores and make the object-size configurable from the command line. Anything else ?

It would be convenient to run this from a "workunit" ( i.e. a script in ceph/qa/workunits/ ) so that it can later be run by teuthology integration tests. That could be used to show regression.

Shall I add the possiblity to test a single user specified configuration via command line arguments?

Quoted 1 line

I would need to play with it to comment usefully.

Cheers

Signature · 1 line
Loïc Dachary, Artisan Logiciel Libre
#15 lore raw

Hi Loic,
I am a little bit confused which kind of tool you actually want. You want a simple benchmark to check for degradation or you want a full profiler tool?

Most of the external tools have the problem that you measure the whole thing including buffer allocation and initialization. We probably don't want to measure how long it takes to allocate memory and write random numbers into it.

I would just do:

< prepare memory>
<take CPU/realtime>
< run algorithm >
<take CPU/realtime>
< print result>

Now one can also add to run the perf-stat tool after <prepare memory> and start it from within the test program pointing to the PID running <run alogorithm>, so the benchmark would be:

< prepare memory>
< take CPU/realtime>
< fork=>"perf stat -p <mypid>";
< run algorithm n times>
< take CPU/realtime>
< SIGINT to fork>
< print results>

As an extension one could also add to have <run algorithm> with <n> threads in a thread pool.

Cheers Andreas.

#16 lore raw

On 11/12/2013 10:49, Andreas Joachim Peters wrote:> Hi Loic,

Quoted 2 lines

I am a little bit confused which kind of tool you actually want. You want a simple benchmark to check for degradation or you want a full profiler tool?

I was not sure, hence the confusion.

Quoted 10 lines

Most of the external tools have the problem that you measure the whole thing including buffer allocation and initialization. We probably don't want to measure how long it takes to allocate memory and write random numbers into it.

I would just o:

< prepare memory>
<take CPU/realtime>
< run algorithm >
<take CPU/realtime>
< print result>

Ok, I'll do that.

I'm glad I learnt about the other tools in the process, even if only to conclude that they are not needed.

Cheers

Quoted 21 lines

Now one can also add to run the perf-stat tool after <prepare memory> and start it from within the test program pointing to the PID running <run alogorithm>, so the benchmark would be:

< prepare memory>
< take CPU/realtime>
< fork=>"perf stat -p <mypid>";
< run algorithm n times>
< take CPU/realtime>
< SIGINT to fork>
< print results>

As an extension one could also add to have <run algorithm> with <n> threads in a thread pool.

Cheers Andreas.

--
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 · 1 line
Loïc Dachary, Artisan Logiciel Libre
#17 lore raw
Quoted 19 lines · Loic Dachary

On 11/12/2013 10:49, Andreas Joachim Peters wrote:> Hi Loic,

Quoted 2 lines

I am a little bit confused which kind of tool you actually want. You want a simple benchmark to check for degradation or you want a full profiler tool?

I was not sure, hence the confusion.

Quoted 10 lines

Most of the external tools have the problem that you measure the whole thing including buffer allocation and initialization. We probably don't want to measure how long it takes to allocate memory and write random numbers into it.

I would just o:

< prepare memory>
<take CPU/realtime>
< run algorithm >
<take CPU/realtime>
< print result>

Quoted 3 lines

Ok, I'll do that.

I'm glad I learnt about the other tools in the process, even if only to conclude that they are not needed.

Certainly things like perf are useful for profiling but may be overkill in the general case depending on what you are trying to do. Collectl is pretty low overhead though if you are just looking for per-process CPU utilization stats.

Quoted 25 lines

Cheers

Quoted 21 lines

Now one can also add to run the perf-stat tool after <prepare memory> and start it from within the test program pointing to the PID running <run alogorithm>, so the benchmark would be:

< prepare memory>
< take CPU/realtime>
< fork=>"perf stat -p <mypid>";
< run algorithm n times>
< take CPU/realtime>
< SIGINT to fork>
< print results>

As an extension one could also add to have <run algorithm> with <n> threads in a thread pool.

Cheers Andreas.

--
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

#18 lore raw

Hi Loic,

I (re-)pushed/fixed wip-bpc-01 in my GIT repository.

There is one commit of general interest to 'galois.c' which gives me a factor 1.5 speed improvement (I exchanged the region XOR loop with vector operations if available) in the Jerasure code base.

I have also replaced the parity implementation to use SSE registers (via assembler) ... (seen in snapraid) which gives a factor 2.5 for the BPC part ...

I needed to add a test for this in arch/intel.c like it was for the crc32c register .

Cheers Andreas.

________________________________________
From: Mark Nelson [[email protected]]
Sent: 11 December 2013 14:00
To: Loic Dachary
Cc: Andreas Joachim Peters; [email protected]
Subject: Re: CEPH Erasure Encoding + OSD Scalability

Quoted 19 lines · Loic Dachary

On 11/12/2013 10:49, Andreas Joachim Peters wrote:> Hi Loic,

Quoted 2 lines

I am a little bit confused which kind of tool you actually want. You want a simple benchmark to check for degradation or you want a full profiler tool?

I was not sure, hence the confusion.

Quoted 10 lines

Most of the external tools have the problem that you measure the whole thing including buffer allocation and initialization. We probably don't want to measure how long it takes to allocate memory and write random numbers into it.

I would just o:

< prepare memory>
<take CPU/realtime>
< run algorithm >
<take CPU/realtime>
< print result>

Quoted 3 lines

Ok, I'll do that.

I'm glad I learnt about the other tools in the process, even if only to conclude that they are not needed.

Certainly things like perf are useful for profiling but may be overkill in the general case depending on what you are trying to do. Collectl is pretty low overhead though if you are just looking for per-process CPU utilization stats.

Quoted 25 lines

Cheers

Quoted 21 lines

Now one can also add to run the perf-stat tool after <prepare memory> and start it from within the test program pointing to the PID running <run alogorithm>, so the benchmark would be:

< prepare memory>
< take CPU/realtime>
< fork=>"perf stat -p <mypid>";
< run algorithm n times>
< take CPU/realtime>
< SIGINT to fork>
< print results>

As an extension one could also add to have <run algorithm> with <n> threads in a thread pool.

Cheers Andreas.

--
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

#19 lore raw

On 13/12/2013 16:47, Andreas Joachim Peters wrote:> Hi Loic,

Quoted 3 lines

I (re-)pushed/fixed wip-bpc-01 in my GIT repository.

There still seem to be an issue as https://github.com/ceph/ceph/pull/740 show to be unmergeable ( if such a word exists ;-).

Quoted 2 lines

There is one commit of general interest to 'galois.c' which gives me a factor 1.5 speed improvement (I exchanged the region XOR loop with vector operations if available) in the Jerasure code base.

Great.

Quoted 1 line

I have also replaced the parity implementation to use SSE registers (via assembler) ... (seen in snapraid) which gives a factor 2.5 for the BPC part ...

Great.

Quoted 1 line

I needed to add a test for this in arch/intel.c like it was for the crc32c register .

Ok.

It also occurs to me that the benchmark should show the erasure code overhead. I.e. 10 + 4 by default means + 40% and with BPC using 5 chunks at a time it would be + 60%.

Cheers

Quoted 69 lines

Cheers Andreas.

________________________________________
From: Mark Nelson [[email protected]]
Sent: 11 December 2013 14:00
To: Loic Dachary
Cc: Andreas Joachim Peters; [email protected]
Subject: Re: CEPH Erasure Encoding + OSD Scalability

Quoted 19 lines · Loic Dachary

On 11/12/2013 10:49, Andreas Joachim Peters wrote:> Hi Loic,

Quoted 2 lines

I am a little bit confused which kind of tool you actually want. You want a simple benchmark to check for degradation or you want a full profiler tool?

I was not sure, hence the confusion.

Quoted 10 lines

Most of the external tools have the problem that you measure the whole thing including buffer allocation and initialization. We probably don't want to measure how long it takes to allocate memory and write random numbers into it.

I would just o:

< prepare memory>
<take CPU/realtime>
< run algorithm >
<take CPU/realtime>
< print result>

Quoted 3 lines

Ok, I'll do that.

I'm glad I learnt about the other tools in the process, even if only to conclude that they are not needed.

Certainly things like perf are useful for profiling but may be overkill in the general case depending on what you are trying to do. Collectl is pretty low overhead though if you are just looking for per-process CPU utilization stats.

Quoted 25 lines

Cheers

Quoted 21 lines

Now one can also add to run the perf-stat tool after <prepare memory> and start it from within the test program pointing to the PID running <run alogorithm>, so the benchmark would be:

< prepare memory>
< take CPU/realtime>
< fork=>"perf stat -p <mypid>";
< run algorithm n times>
< take CPU/realtime>
< SIGINT to fork>
< print results>

As an extension one could also add to have <run algorithm> with <n> threads in a thread pool.

Cheers Andreas.

--
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

Signature · 1 line
Loïc Dachary, Artisan Logiciel Libre