[chord] dhashclient question
Emil Sit
sit at MIT.EDU
Mon Apr 10 09:30:54 EDT 2006
On Sun, 09 April 2006 at 22:09 (-0600), Yanyan Wang wrote:
> Or another possible reason for my observed high robustness performance
> could be, my file has too small size(200 bytes) to require 7 fragments
> to recover? Thanks!
That's correct: an object that requires less than one MTU will
essentially be highly replicated. The reason for this is that
dhash/client.C's insert method calls dhblock_chash::generate_fragment
which calculates Ida::optimal_dfrag (size, mtu) as the number
of fragments needed for reconstruction. From utils/ida.C
Ida::optimal_dfrag (u_long len, u_long mtu)
{
// Calculate best packing for fragments to minimize packet count.
// Estimate first assuming no per-fragment overhead.
u_long m = (len + (mtu - 1)) / mtu;
if (m == 0) m = 1; // Handle special case if len == 0
// Check to see that a fragment would really fit, with overhead
u_long nomfragsize = (len / m) + (4 + m)*2;
// If it doesn't fit (i.e. would need to chunk), might as well parallelize.
if (nomfragsize > mtu)
m++;
return m;
}
Suppose MTU \approx 1200 (accounting for up to 300 bytes of various
transport_prot, RPC header, UDP/IP header overhead); then
m = (200 + 1199)/1200 = 1. So any one fragment will be sufficient to
reconstruct, i.e., replication.
I think Frank's suggestion of tweaking efrags and dfrags would do
what you want.
--
Emil Sit / MIT CSAIL PDOS / http://pdos.csail.mit.edu/chord/
More information about the chord
mailing list