All of lore.kernel.org
 help / color / mirror / Atom feed
From: Loic Dachary <loic@dachary.org>
To: Samuel Just <sam.just@inktank.com>
Cc: Ceph Development <ceph-devel@vger.kernel.org>,
	Andreas Joachim Peters <Andreas.Joachim.Peters@cern.ch>
Subject: controlling erasure code chunk size
Date: Sun, 02 Feb 2014 16:15:52 +0100	[thread overview]
Message-ID: <52EE6128.209@dachary.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 953 bytes --]

[cc' ceph-devel]

Hi Sam,

Here is how chunks are expected to be aligned:

https://github.com/ceph/ceph/blob/4c4e1d0d470beba7690d1c0e39bfd1146a25f465/src/osd/ErasureCodePluginJerasure/ErasureCodeJerasure.cc#L365

 unsigned alignment = k*w*packetsize*sizeof(int);
  if ( ((w*packetsize*sizeof(int))%LARGEST_VECTOR_WORDSIZE) )
    alignment = k*w*packetsize*LARGEST_VECTOR_WORDSIZE;
  return alignment;

If you are going to encode small objects, it may very well lead to oversized chunks if packetsize is large. At the moment the default is 3072

https://github.com/ceph/ceph/blob/4c4e1d0d470beba7690d1c0e39bfd1146a25f465/src/common/config_opts.h#L406

A value I picked when experimenting with 1MB objects encoding ( http://dachary.org/?p=2594 ). 

I'm not entirely sure why the alignment is calculated the way it is. Andreas certainly has a better understanding on this topic.

Cheers

-- 
Loïc Dachary, Artisan Logiciel Libre


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 263 bytes --]

             reply	other threads:[~2014-02-02 15:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-02 15:15 Loic Dachary [this message]
2014-02-02 16:18 ` controlling erasure code chunk size Andreas Joachim Peters
2014-02-02 22:45   ` Samuel Just
2014-02-02 23:27     ` Andreas Joachim Peters
2014-02-02 23:33       ` Samuel Just
2014-02-04 16:17         ` Loic Dachary
2014-02-04 17:01           ` Andreas Joachim Peters
2014-02-03 10:57       ` Loic Dachary
2014-02-03 11:35     ` Loic Dachary
2014-02-03 18:15       ` Samuel Just

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52EE6128.209@dachary.org \
    --to=loic@dachary.org \
    --cc=Andreas.Joachim.Peters@cern.ch \
    --cc=ceph-devel@vger.kernel.org \
    --cc=sam.just@inktank.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.