2025-08-23
OriginN1N0N999Problem:Replicate a 500GB file to 1000 Machines1. Network IO each machine: R = 10GBit/s2. File size: S = 500GByte3. Destination machine number: N = 1000Solution 1Step 1: divide the file into N segments evenlyend up with S = s0 + s1 + ... s999time = 0Step 2:replicate s0 to machine N0, s1 to N1,s999 to N999time = S / R = 400sStep 3:N0 machine uses R/2 to write s0 to resttarget machinestime = S0 * (N - 1) / (R/2) = 799.2sin the exact meantime, N1, ... N999 are doing same thing;and N0 uses the rest R/2 to receive data from othersat N0's write completion, N1...N999 also complete writesTotal solution: time = 400s + 799.2s ~=1200sNOTE - this is an upper bound. In practice, Step 3 can start without waiting Step 2's completions0s1s999N1N0N999N2