Comparing straw2 and CARP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I recently discovered CARP[1] which is implemented in Squid[2] and provides the same features as straw2:

- stable placement when a device is added or removed
- weighted devices
- given enough objects their distribution is uniform

The differences are:

- the hash function:
  - bit rotation based on the name of the item / object for CARP[3]
  - Robert J. Jenkins hash on the PG id for CRUSH[4] and no hashing for the item id

- the combination of the item hash and the object hash
  - XOR for CARP[5]
  - Robert J. Jenkins hash on the PG id hash and the item id for CRUSH[6]

- applying the weight to the the combination of the item hash and the object hash
  - the multiplier is calculated per device for CARP[7] and the combined hash is multiplied by it to get the score[8]
  - the weight is multiplied with the log of the combined hash for CRUSH[9]

I'd like to setup a simulation that shows the effect of these differences. I tried a few but the results are roughly the same wether I use CRUSH or CARP. Any idea ?

Cheers

[1] CARP https://tools.ietf.org/html/draft-vinod-carp-v1-03
[2] CARP in squid http://bazaar.launchpad.net/~squid/squid/trunk/view/head:/src/carp.cc#L198
[3] CARP hash http://bazaar.launchpad.net/~squid/squid/trunk/view/head:/src/carp.cc#L96
[4] CRUSH hash https://github.com/ceph/ceph/blob/master/src/osd/osd_types.cc#L1357
[5] CARP combination http://bazaar.launchpad.net/~squid/squid/trunk/view/head:/src/carp.cc#L200
[6] CRUSH combination https://github.com/ceph/ceph/blob/master/src/crush/mapper.c#L313
[7] CARP multiplier http://bazaar.launchpad.net/~squid/squid/trunk/view/head:/src/carp.cc#L133
[8] CARP score http://bazaar.launchpad.net/~squid/squid/trunk/view/head:/src/carp.cc#L203
[9] CRUSH score https://github.com/ceph/ceph/blob/master/src/crush/mapper.c#L335

-- 
Loïc Dachary, Artisan Logiciel Libre
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux