Improving Load Balance via Resource Exchange in Large-Scale Search Engines Kaiyue Duan, Yusen Li, Trent Marbach, Gang Wang, Xiaoguang Liu College of Computer Science Nankai University June 2020 1/18 Kaiyue Duan, Yusen Li, Trent Marbach, Gang Wang, Xiaoguang Liu Improving Load Balance via Resource Exchange in Large-Scale Search Engines
Background A simplified architecture of a search engine. Queries Answers Broker ... [Index Shards] [Index Shards] [Index Shards] Leaf Machine Leaf Machine Leaf Machine 2/18 Kaiyue Duan, Yusen Li, Trent Marbach, Gang Wang, Xiaoguang Liu Improving Load Balance via Resource Exchange in Large-Scale Search Engines
Background Load rebalancing is NP -hard. E.g., Google machine reassignment problem. 3/18 Kaiyue Duan, Yusen Li, Trent Marbach, Gang Wang, Xiaoguang Liu Improving Load Balance via Resource Exchange in Large-Scale Search Engines
Motivation Te transient resources affect shard reassignment! 4/18 Kaiyue Duan, Yusen Li, Trent Marbach, Gang Wang, Xiaoguang Liu Improving Load Balance via Resource Exchange in Large-Scale Search Engines
Motivation We use the exchangeable machines to facilitate load balancing. 5/18 Kaiyue Duan, Yusen Li, Trent Marbach, Gang Wang, Xiaoguang Liu Improving Load Balance via Resource Exchange in Large-Scale Search Engines
Shard Reassignment Problem M L the set of leaf machines M E the set of exchangeable ma- chines Te objective function: M M L ∪ M E R the set of resources � � V m | u m [ r ] − utl [ r ] | . min S the set of shards c m [ r ] the capacity of machine m for r ∈ R m ∈ M resource r ,where the u m [ r ] and utl [ r ] are defined as u m [ r ] the utilization of resource r by follows: machine m utl [ r ] the expected utilization of re- � s ∈ S X s , m d s [ r ] u m [ r ] = . source r c m [ r ] d s [ r ] the demand for resource r by shard s � s ∈ S d s [ r ] X X s , m = 1, shard s is assigned utl [ r ] = m ∈ M L c m [ r ] . � to machine m; X s , m = 0, oth- erwise V m if machine m will be returned 6/18 Kaiyue Duan, Yusen Li, Trent Marbach, Gang Wang, Xiaoguang Liu Improving Load Balance via Resource Exchange in Large-Scale Search Engines
Shard Reassignment Problem Hard constraints: Single principle constraint 1 Capacity constraint 2 Transient constraint 3 Conflict constraint 4 Qota constraint 5 7/18 Kaiyue Duan, Yusen Li, Trent Marbach, Gang Wang, Xiaoguang Liu Improving Load Balance via Resource Exchange in Large-Scale Search Engines
SRA overview Shard Reassignment Algorithm (SRA) 8/18 Kaiyue Duan, Yusen Li, Trent Marbach, Gang Wang, Xiaoguang Liu Improving Load Balance via Resource Exchange in Large-Scale Search Engines
Te core procedures of SRA in details Te flowchart: 9/18 Kaiyue Duan, Yusen Li, Trent Marbach, Gang Wang, Xiaoguang Liu Improving Load Balance via Resource Exchange in Large-Scale Search Engines
Experiment 1 Input setings (synthetic and real ) and baseline (noisy strategy based local search (NLS), SRA without EX machines) Table: Summary of the synthetic input setings C 1 C 2 C 3 C 4 C 5 C 6 C 7 C 8 r 1 range S S L L S S L L r 2 range S L S L S L S L machines Homogeneous Heterogeneous the No. shards ( α = 0 . 2) 14074 6281 6285 6121 9358 4572 4651 3882 Table: Summary of the real datasets DS 1 to DS 4 Instance ID DS 1 DS 2 DS 3 DS 4 Machine type Hetero Hetero Hetero Hetero Number of indexes 78 64 123 60 Number of shards 3072 2753 2936 3057 Number of machines 1816 1220 1987 1976 Machine mean Utl. (r 1 ) 0 . 50 0 . 74 0 . 66 0 . 42 Machine mean Utl. (r 2 ) 0 . 39 0 . 66 0 . 65 0 . 29 10/18 Kaiyue Duan, Yusen Li, Trent Marbach, Gang Wang, Xiaoguang Liu Improving Load Balance via Resource Exchange in Large-Scale Search Engines
Experiment 2 Load balancing on synthetic datasets 11/18 Kaiyue Duan, Yusen Li, Trent Marbach, Gang Wang, Xiaoguang Liu Improving Load Balance via Resource Exchange in Large-Scale Search Engines
Experiment 3 Load balancing on real datasets Global Imbalance ( × 10 3 ) NLS SRA noEX SRA 10 · 10 3 5503 5442 8 5229 6 3152 2876 1894 1746 1843 1694 4 1286 1174 1122 2 0 DS 1 DS 2 DS 3 DS 4 12/18 Kaiyue Duan, Yusen Li, Trent Marbach, Gang Wang, Xiaoguang Liu Improving Load Balance via Resource Exchange in Large-Scale Search Engines
Experiment 4 Load balancing under different runtimes (unit: minutes) 13/18 Kaiyue Duan, Yusen Li, Trent Marbach, Gang Wang, Xiaoguang Liu Improving Load Balance via Resource Exchange in Large-Scale Search Engines
Experiment 5 Global imbalance and different 6 Global imbalance and different No. EX. Machines on No. EX. Machines on real synthetic datasets datasets C 1 C 2 C 3 C 4 DS 1 DS 2 DS 3 DS 4 · 10 3 Global Imbalance ( × 10 3 ) C 5 C 6 C 7 C 8 6 · 10 3 Global Imbalance ( × 10 3 ) 1 4 0 . 5 2 0 0 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 proportion of exchangeable machines (%) proportion of exchangeable machines (%) 14/18 Kaiyue Duan, Yusen Li, Trent Marbach, Gang Wang, Xiaoguang Liu Improving Load Balance via Resource Exchange in Large-Scale Search Engines
Experiment 7 Global imbalance under different No. leaf machines C 1 C 5 Global Imbalance ( × 10 3 ) · 10 3 15 25% 23% 10 53% 46% 5 63% 68% 0 1000 2000 5000 1000 2000 5000 NLS SRA noEX SRA 15/18 Kaiyue Duan, Yusen Li, Trent Marbach, Gang Wang, Xiaoguang Liu Improving Load Balance via Resource Exchange in Large-Scale Search Engines
Experiment 8 Comparing with the lower bound Global Imbalance ( × 10 2 ) Relaxation NLS SRA noEX SRA · 10 2 6% 2 19% 17% 1 28% 0 C 5 C 6 C 7 C 8 16/18 Kaiyue Duan, Yusen Li, Trent Marbach, Gang Wang, Xiaoguang Liu Improving Load Balance via Resource Exchange in Large-Scale Search Engines
Conclusion Use exchangeable machines and the SRA to handle the shard reassignment problem. Tere are two trade-offs. We have not deploy the SRA on a real search engine. 17/18 Kaiyue Duan, Yusen Li, Trent Marbach, Gang Wang, Xiaoguang Liu Improving Load Balance via Resource Exchange in Large-Scale Search Engines
18/18
Recommend
More recommend