Commit Graph

30285 Commits

Author SHA1 Message Date
Loic Dachary
e04d7b8743 Merge pull request #933 from dachary/wip-erasure-code-benchmark
osd: erasure code benchmark tool

Reviewed-by: Andreas Peters <andreas.joachim.peters@cern.ch>
Reviewed-by: Christophe Courtaut <christophe.courtaut@gmail.com>
2013-12-20 03:24:10 -08:00
Loic Dachary
03693aceae osd: git ignore erasure code benchmark binary
Signed-off-by: Loic Dachary <loic@dachary.org>
2013-12-20 12:15:44 +01:00
Loic Dachary
42b4fe1496 osd: erasure code benchmark is installed is part of ceph-test
Add to the packaging for RPMs and DEBs

Signed-off-by: Loic Dachary <loic@dachary.org>
2013-12-20 12:15:44 +01:00
Loic Dachary
81dee1b67f osd: erasure code benchmark workunit
Display benchmark results for the default erasure code plugins, in a tab
separated CSV file. The first two column contain the amount of KB
that were coded or decoded, for a given combination of parameters
displayed in the following fields.

seconds	KB	plugin	k	m	work.	iter.	size	eras.
1.2	10	example	2	1	encode	10	1024	0
0.5	10	example	2	1	decode	10	1024	1

It can be used as input for a human readable report. It is also intented
to be used to show if a given version of an erasure code plugin performs
better than another.

The last column ( not shown above for brievety ) is the exact command
that was run to produce the result so it can be copy / pasted to
reproduce them or to profile.

Only the jerasure techniques mentionned in
https://www.usenix.org/legacy/events/fast09/tech/full_papers/plank/plank_html/
are benchmarked, the others are assumed to be less interesting.

Signed-off-by: Loic Dachary <loic@dachary.org>
2013-12-20 12:15:44 +01:00
Loic Dachary
a619fe9869 osd: erasure code benchmark tool
Implement the ceph_erasure_code_benchmark utility to:

* load an erasure code plugin

* loop over the encode/decode function using the parameters from the
  command line

* print the number of bytes encoded/decoded and the time to process

When decoding, random chunks ( as set with --erasures ) are lost on each
run.

For instance:

    $ ceph_erasure_code_benchmark \
       --plugin jerasure \
       --parameter erasure-code-directory=.libs \
       --parameter erasure-code-technique=reed_sol_van \
       --parameter erasure-code-k=2 \
       --parameter erasure-code-m=2 \
       --workload decode \
       --erasures 2 \
       --iterations 1000
    0.964759	1048576

shows 1GB is decoded in 1second.

It is intended to be used by other scripts to present a human readable
output or detect performance regressions.

Signed-off-by: Loic Dachary <loic@dachary.org>
2013-12-20 12:15:13 +01:00
Loic Dachary
a36bc5fabf osd: set erasure code packet size default to 2048
As shown in
https://www.usenix.org/legacy/events/fast09/tech/full_papers/plank/plank_html/
under "Impact of the Packet Size", the optimal for is in the order of 1k
rather than the current default of 8. Benchmarks are required to find
the actual optimum.

Signed-off-by: Loic Dachary <loic@dachary.org>
2013-12-20 11:28:47 +01:00
Loic Dachary
c7d8ba7b6d osd: better performances for the erasure code example
The XOR based example is ten times slower than it could because it uses
the buffer::ptr[] operator. Use a temporary char * instead. It performs
as well as jerasure Reed Solomon when decoding with a single erasure:

$ ceph_erasure_code_benchmark \
   --plugin example  --parameter erasure-code-directory=.libs \
   --parameter erasure-code-technique=example \
   --parameter erasure-code-k=2 --parameter erasure-code-m=1 \
   --erasure 1 --workload decode --iterations 5000
8.095007	5GB

$ ceph_erasure_code_benchmark \
   --plugin jerasure  --parameter erasure-code-directory=.libs \
   --parameter erasure-code-technique=reed_sol_van \
   --parameter erasure-code-k=10 --parameter erasure-code-m=6 \
   --erasure 1 --workload decode --iterations 5000
7.870990	5GB

Signed-off-by: Loic Dachary <loic@dachary.org>
2013-12-20 11:28:47 +01:00
Loic Dachary
ff9455baad osd: conditionally disable dlclose of erasure code plugins
When profiling, tools such as valgrind --tool=callgrind require that the
dynamically loaded libraries are not dlclosed so they can collect usage
information.

The public ErasureCodePluginRegistry::disable_dlclose boolean is introduced
for this purpose.

Signed-off-by: Loic Dachary <loic@dachary.org>
2013-12-20 11:28:47 +01:00
David Zafman
edaec9a836 osd: Fix assert which doesn't apply when compat_mode on
Signed-off-by: David Zafman <david.zafman@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
2013-12-19 14:37:28 -08:00
Sage Weil
30876e69f4 Merge pull request #941 from ceph/wip-6028
#6028 : ensure that erasure coded pools don't work until the osds can handle it

Reviewed-by: Sage Weil <sage@inktank.com>
2013-12-19 10:17:15 -08:00
Sage Weil
0d2d937e2d Merge pull request #973 from ceph/wip-mds-coverity2
mds: fixes for coverity scan

Reviewed-by: Sage Weil <sage@inktank.com>
2013-12-19 08:14:20 -08:00
Alexandre Oliva
40a48de697 mds: fix Resetter locking
ceph-mds --reset-journal didn't work; it would deadlock waiting for
the osdmap.  Comparing the init code in the Dumper (that worked) with
that in the Resetter (that didn't), I noticed the lock had to be
released before waiting for the osdmap.

Now the resetter works.  However, both the resetter and the dumper
fail an assertion after they've performed their task; I didn't look
into it:

../../src/msg/SimpleMessenger.cc: In function 'void SimpleMessenger::reaper()' t
hread 7fdc188d27c0 time 2013-12-19 04:48:16.930895
../../src/msg/SimpleMessenger.cc: 230: FAILED assert(!cleared)
 ceph version 0.72.1-6-g6bca44e (6bca44ec129d11f1c4f38357db8ae435616f2c7c)
 1: (SimpleMessenger::reaper()+0x706) [0x880da6]
 2: (SimpleMessenger::wait()+0x36f) [0x88180f]
 3: (Resetter::reset()+0x714) [0x56e664]
 4: (main()+0x1359) [0x562769]
 5: (__libc_start_main()+0xf5) [0x3632e21b45]
 6: /l/tmp/build/ceph/build/src/ceph-mds() [0x564e49]
 NOTE: a copy of the executable, or `objdump -rdS <executable>` is needed to int
erpret this.
2013-12-19 04:48:16.934093 7fdc188d27c0 -1 ../../src/msg/SimpleMessenger.cc: In
function 'void SimpleMessenger::reaper()' thread 7fdc188d27c0 time 2013-12-19 04
:48:16.930895
../../src/msg/SimpleMessenger.cc: 230: FAILED assert(!cleared)

Signed-off-by: Alexandre Oliva <oliva@gnu.org>
2013-12-19 08:09:46 -08:00
Sage Weil
2cf9fa94ca Merge pull request #969 from yuyuyu101/wip-7040
Fix segmentation fault when handler is NULL pointer

Reviewed-by: Sage Weil <sage@inktank.com>
2013-12-19 08:05:32 -08:00
Loic Dachary
eb12c81f4e Merge pull request #972 from dachary/wip-build-depends
packaging: revert adding argparse and uuidgen
2013-12-19 06:39:55 -08:00
Loic Dachary
087fe57f0e packaging: revert adding argparse and uuidgen
Because the gitbuilder build environment does not read the build depends
from the packages and needs to be updated independantly.

Signed-off-by: Loic Dachary <loic@dachary.org>
2013-12-19 15:33:07 +01:00
Loic Dachary
4f0918afa7 Merge pull request #971 from dachary/wip-build-depends
packaging: make check needs argparse and uuidgen

Reviewed-by: Christophe Courtaut <christophe.courtaut@gmail.com>
2013-12-19 06:27:09 -08:00
Loic Dachary
812e59b278 Merge pull request #970 from dachary/wip-autogen
autogen: test compare strings with != not -ne

Reviewed-by: Christophe Courtaut <christophe.courtaut@gmail.com>
2013-12-19 05:57:52 -08:00
Loic Dachary
827253851e packaging: make check needs argparse and uuidgen
make check runs vstart.sh to setup a cluster from source and it misses
the python-argparse library as well as uuidgen otherwise it will fail
with:

    ./vstart.sh: 460: uuidgen: not found
    ...
    Error: Import No module named argparse

Signed-off-by: Loic Dachary <loic@dachary.org>
2013-12-19 13:57:04 +01:00
Loic Dachary
f193925aa5 autogen: test compare strings with != not -ne
Signed-off-by: Loic Dachary <loic@dachary.org>
2013-12-19 13:40:06 +01:00
Haomai Wang
98af37d091 Fix segmentation fault when handler is NULL pointer
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
2013-12-19 18:54:04 +08:00
Loic Dachary
b2a80004e6 Merge pull request #966 from dachary/ceph-master
crush: silence error messages in unit tests

Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-12-19 02:31:41 -08:00
Loic Dachary
27f4d1f6bc Merge pull request #968 from ceph/wip-crush
make check is happy and the change is non controversial

Reviewed-by: Loic Dachary <loic@dachary.org>
2013-12-19 02:28:30 -08:00
Yan, Zheng
44aacaed51 mds: fixes for coverity scan
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2013-12-19 14:27:21 +08:00
Sage Weil
8b38f10bc2 crush/mapper: fix crush_choose_firstn comment
Signed-off-by: Sage Weil <sage@inktank.com>
2013-12-18 21:22:24 -08:00
Sage Weil
ea3a0bb8b7 crush/mapper: attempts -> tries
Signed-off-by: Sage Weil <sage@inktank.com>
2013-12-18 21:22:24 -08:00
Sage Weil
0497db49e5 crush/mapper: finish adding choose_local_[fallback_]tries
Didn't finish this in d129e09e57.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-12-18 21:22:24 -08:00
Sage Weil
99f41de3be vstart.sh: NOTE, not WARNING, to make gitbuilder happy
Signed-off-by: Sage Weil <sage@inktank.com>
2013-12-18 21:22:08 -08:00
Joao Eduardo Luis
b3ee598f50 qa: workunit: cephtool: test osd pool create with erasure type
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-12-19 02:21:05 +00:00
Joao Eduardo Luis
250b44627e pybind: test_ceph_argparse: test 'ceph osd pool create' with pool type
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-12-19 02:21:05 +00:00
Joao Eduardo Luis
c996f66986 mon: OSDMonitor: add optional 'pool type' arg to 'osd pool create'
Allow specifying 'rep', 'raid4' and 'erasure'.
Only allow setting type 'erasure' if all up osds support erasure codes.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-12-19 02:21:05 +00:00
Joao Eduardo Luis
bdeaa84126 osd: OSDMap: add 'get_up_osds()' function
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-12-19 02:21:05 +00:00
Joao Eduardo Luis
5756c05a22 ceph_osd: add EC to OSD's supported features used by the messenger
Fixes: 6028

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-12-19 02:20:01 +00:00
Joao Eduardo Luis
59ad6da43a osd: OSD: reflect OSDMap EC flag being set by setting on-disk feature
If OSDMap has the EC feature set, then update our superblock to
reflect as such, making our on-disk format incompatible with previous
OSDs without EC support.

Fixes: 6028

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-12-19 02:19:52 +00:00
Joao Eduardo Luis
8ac84db050 mon: OSDMonitor: handle osd features on boot
Add the osd's features to the osd's extra info field in the OSDMap
so we can track which OSDs are able to deal with Erasure Codes.

This will allow us to decide whether or not we are ready to set EC
whenever the user asks us to set EC on a pool -- which shall be
handled by a subsequent commit.

Fixes: 6028

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-12-19 02:19:47 +00:00
Joao Eduardo Luis
31743d50a1 osd: OSDMap: add 'features' bit mask field to osd_xinfo_t
And make sure we dump it on osd_xinfo_t::dump().

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-12-19 02:14:57 +00:00
Joao Eduardo Luis
73992d2ed4 osd: OSDMap: check for erasure pools when getting features
If we have a pool with type Erasure, then we consider we require
CEPH_FEATURE_OSD_ERASURE_CODES.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-12-19 02:14:57 +00:00
Joao Eduardo Luis
178f684179 osd: OSD: add binary compat feature for Erasure Codes
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-12-19 02:14:56 +00:00
Joao Eduardo Luis
bfc86a8243 include/ceph_features: add CEPH_FEATURES_OSD_ERASURE_CODES
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-12-19 02:14:56 +00:00
tamil
fe136845a8 added execute permission to the script
Signed-off-by: tamil <tamil.muthamizhan@inktank.com>
2013-12-18 14:32:35 -08:00
tamil
d9e33ea739 rgw workunit to test bucket quota
Signed-off-by: tamil <tamil.muthamizhan@inktank.com>
2013-12-18 14:23:54 -08:00
Sage Weil
25db0de17f Merge pull request #926 from yuyuyu101/wip/6950
Move PerfCounter from ObjectStore.h to FileStore.h

Reviewed-by: Sage Weil <sage@inktank.com>
2013-12-18 10:42:40 -08:00
Sage Weil
e54489da06 Merge pull request #961 from dachary/wip-erasure-code-alignment
erasure-code: tests must use aligned buffers

Reviewed-by: Sage Weil <sage@inktank.com>
2013-12-18 10:41:31 -08:00
Gregory Farnum
f32a36d24f Merge pull request #967 from ceph/wip-7026
osd/ReplicatedPG: fix hit_set_setup() on_activate()
Reviewed-by: Greg Farnum <greg@inktank.com>
2013-12-18 10:24:00 -08:00
Sage Weil
1bb46c0ec9 Merge pull request #955 from ceph/wip-crush-2
crush: make set_chooseleaf_tries work with firstn chooseleaf, too

Reviewed-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Loic Dachary <loic@dachary.com>
2013-12-18 10:00:55 -08:00
Loic Dachary
202d1f7b8d Merge pull request #964 from apeters1971/wip-arch-sse2
ARCH: add variable for sse2 register

Reviewed-by: Loic Dachary <loic@dachary.org>
2013-12-18 09:57:18 -08:00
Loic Dachary
e624e16690 crush: silence error messages in unit tests
The error messages are intentional when error conditions are
created. They will create false positive in the gitbuilder parser when
the string error is found.

The --debug-crush flag is detected to allow the caller to reset the
verbosity level.

Signed-off-by: Loic Dachary <loic@dachary.org>
2013-12-18 18:52:52 +01:00
Andreas Peters
9414970362 ARCH: adding SSE2 flag to arch-test 2013-12-18 18:05:17 +01:00
Sage Weil
fd5f40269e Merge pull request #965 from ksperis/rbdmap.upstart
upstart: add rbdmap script

Reviewed-by: Sage Weil <sage@inktank.com>
2013-12-18 08:57:29 -08:00
Sage Weil
7e0c84b84d mon/OSDMonitor: 'osd crush show-tunables'
Signed-off-by: Sage Weil <sage@inktank.com>
2013-12-18 08:35:25 -08:00
Sage Weil
88365c2953 crush: expand info about tunables that we dump
Include the tunables profile, and flags indicating whether it is optimal,
legacy, or requires certain features.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-12-18 08:35:25 -08:00