CEPH filesystem development
 help / color / mirror / Atom feed
From: Thorsten Behrens <tbehrens@suse.com>
To: Sage Weil <sweil@redhat.com>
Cc: ceph-devel@vger.kernel.org
Subject: Re: crush: straw is dead, long live straw2
Date: Fri, 12 Dec 2014 10:14:08 +0100	[thread overview]
Message-ID: <20141212091408.GN4150@thinkpad.thebehrens.net> (raw)
In-Reply-To: <alpine.DEB.2.00.1412081516010.18281@cobra.newdream.net>

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

Sage Weil wrote:
> Calculating the ln() function is a bit annoying because it is a floating 
> point function and CRUSH is all fixed-point arithmetic (integer-based).  
> The current draft implementation uses a 128 KB lookup table (2 bytes per 
> entry for 16 bits of input precision).  It seems to be about 25% slower 
> than the original straw code in my simple microbenchmark, but I'm not sure 
> that's a number we should trust since it loops through a zillion inputs 
> and will pull most of the lookup table into the processor caches.
> 
> We could probably try a few others things:
> 
[snip]

My Hacker's Delight copy has a number of further variants (on
pp. 215), unfortunately only covering log_2 (which is trivially the
number of leading zeros in the binary representation) and log_10. But
since the logarithms are simply related by a multiplicative constant,
something clever might be doable here with a bit of thinking.

Cheers,

-- Thorsten

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 966 bytes --]

  parent reply	other threads:[~2014-12-12  9:17 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-08 23:48 crush: straw is dead, long live straw2 Sage Weil
2014-12-09  0:21 ` Josh Durgin
2014-12-12  9:14 ` Thorsten Behrens [this message]
2014-12-12 14:46   ` Sage Weil
2014-12-12 15:39     ` Joe Landman
2014-12-12 16:20       ` Sage Weil
2014-12-12 16:39         ` Joe Landman
2014-12-12 18:18         ` Joe Landman
2014-12-12 21:29           ` Sage Weil
2014-12-12 15:43     ` Milosz Tanski
2014-12-12 17:27 ` Yehuda Sadeh
2014-12-12 21:42   ` Mark Nelson
2017-01-27  0:26 ` Loic Dachary

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=20141212091408.GN4150@thinkpad.thebehrens.net \
    --to=tbehrens@suse.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=sweil@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox