作者
Alessandro Staffolani,Victor-Alexandru Darvariu,Paolo Bellavista,Mirco Musolesi
摘要
Distributed workload queues are nowadays widely used due to their significant advantages in terms of decoupling, resilience, and scaling.Task allocation to worker nodes in distributed queue systems is typically simplistic (e.g., Least Recently Used) or uses hand-crafted heuristics that require task-specific information (e.g., task resource demands or expected time of execution).When such task information is not available and worker node capabilities are not homogeneous, the existing placement strategies may lead to unnecessarily large execution timings and usage costs.In this work, we investigate the task allocation problem within the Markov Decision Process framework, where an agent assigns tasks to an available resource, by receiving a numerical reward signal upon task completion.This allows our solution to learn effective task allocation strategies directly from experience in a completely dynamic way.In particular, we present the design, implementation, and experimental evaluation of RLQ (Reinforcement Learning based Queues), i.e., our adaptive and learning-based task allocation solution that we have implemented and integrated with the popular Celery task queuing system.By using both synthetic and real workload traces, we compare RLQ against traditional solutions, such as Least Recently Used.On average, using synthetic workloads, RLQ reduces the execution time by a factor of at least 3×.When considering the execution cost, the reduction is around 70%, whereas for the time waited before execution, the reduction is close to a factor of 7×.Using real traces, we observe around 70% improvement for execution time, around 20% for execution cost and a reduction of approximately 20× for waiting time.We also analyze RLQ performance against E-PVM, a state-of-the-art solution used in Google's Borg, showing that we are able to outperform it in the synthetic data evaluation, while we outperform it in all the three settings based on real data.