linux - file copy from one to 100 servers -
i want transfer 100 gb file resides on single server 100 other servers in network on 1 gbps line. best way ? solution copy file k number of servers(say 9) , assign remaining (100-9) servers each of of 9 servers. way better solution copying file 1 server 100 sequentially. question how determine k ? or calculation determine efficient value of k. please suggest if there better solution too. sorry forgot mention .. cannot use torrent. not companies allow torrent. interview question. appreciate response. thanks
assuming can copy 1 server @ time, can go follows.
- main server copies server s1.
- s1 copies s2 (1 copy)
- s1 copies s3 , s2 copies s4 (2 copies in parallel)
- s1 copies s5, s2 copies s6, s3 copies s7, s4 copies s8 (4 copies in parallel)
and on..
so, pattern of number of copies follows: 2 pow 0, 2 pow 1, 2 pow 2 etc
1 + 2 + 4 + 8 + 16 + 32 + 64 > 100
so, number of copies s1 has can found formula
(2 pow k >= 100) , (2 pow (k-1) < 100)
in case, k evaluates 7 (after first copy)
Comments
Post a Comment