replication count

4 views
Skip to first unread message

vs

unread,
May 16, 2011, 1:43:49 AM5/16/11
to KFS User
hey folks,

Any reason to choose the default replication count of 3. I ask this
because distributed FS like HDFS also uses 3-way replication. So is
there any advantage/particular reason of choosing 3-way replication.

Thanks,
-Venky

David Birdsong

unread,
May 16, 2011, 2:57:06 AM5/16/11
to kfs-...@googlegroups.com

3 replicas affords a single failure, an alert on the failure to
trigger action on the admin's part. while alert and action are
conveyed redundancy still exists.

3 is just the minimum for the above to be true, 4 is good too. 5 even better.

>
> Thanks,
> -Venky

Tony Qin

unread,
May 16, 2011, 3:22:32 AM5/16/11
to kfs-...@googlegroups.com
3-way replica of HDFS is learn from GFS.

The reason why GFS is adopted 3-ways is because
1) in replica update, it can make sure whether primary node is mis-updated
2) it can provide more read flow.

Sriram

unread,
May 16, 2011, 2:06:30 PM5/16/11
to KFS User

There is a paper from Netapp that talks about this issue of double
failures:
1. You lose a drive
2. When you go to recover from a replica, the data on-disk is
corrupt---due to a checksum mismatch which can be caused by the drive
firmware losing the write (viz., caused by software bugs in the drive
firmware software)
3. Having the third replica is insurance---triple concurrent failures
are highly unlikely; so, you can avoid data loss.

Sriram

Tung Nguyen

unread,
May 16, 2011, 5:48:40 PM5/16/11
to kfs-...@googlegroups.com
Hi,
I have a question that somewhat relates to this: in KFS, where/how do you distribute replicas of a block? In HDFS, they have 2 replicas in the same rack and the other is in different rack.
Thanks
TT

--- On Mon, 5/16/11, Sriram <srira...@gmail.com> wrote:

Venky Shankar

unread,
May 17, 2011, 1:28:41 AM5/17/11
to kfs-...@googlegroups.com
Thanks for the explanation Sriram. This means the more the number of replicas, the better (for recovery as well as read flow). So 3-way is just the minimum needed to be on the safe side, right ?

Thanks,
-Venky 
--
Astalavista Baby!!!

Venky Shankar

unread,
May 17, 2011, 11:36:19 AM5/17/11
to kfs-...@googlegroups.com
chunks are striped and replicated across chunkservers, which means if you have 3 chunkservers then each chunk will be replicated to the other two. I think KFS cannot do it the HDFS way (2 replicas in one chunkserver) because it stores the chunk as file_id.chunk_id.version filaname in $chunkdir which means it would overwrite the earlier chunk.

Thanks,
Venky
--
Astalavista Baby!!!

Sriram

unread,
May 17, 2011, 6:58:40 PM5/17/11
to KFS User

That is right...3 is for safety; if you go above 3, then there is cost
of replication vs benefits of read tradeoff.

Sriram
Reply all
Reply to author
Forward
0 new messages