Blog articleMethodology & analyticsComputer science

Hill climbing for cloud task scheduling: local search, load balancing and reliability factors explained

Hill climbing is one of the simplest ways to improve a schedule of tasks on cloud virtual machines, and a useful baseline for any thesis that proposes something more elaborate. This article explains how it works, how load-balancing and reliability factors can be built into it, and how to evaluate it fairly.

What you will learn

  • Explain why task scheduling on heterogeneous virtual machines is computationally hard
  • Describe how hill climbing searches a neighbourhood and why it stops at local optima
  • Distinguish hill climbing from metaheuristics that escape local optima
  • Explain how load-balancing and reliability factors can enter a scheduling rule
  • Design a fair, reproducible evaluation of a scheduling heuristic

What you will unlearn

  • Hill climbing is a metaheuristic.Basic hill climbing is a local-search heuristic; metaheuristics add mechanisms such as accepting worse moves or restarts to escape local optima.
  • A new heuristic that beats round robin in one simulation is a contribution.Claims need several workloads, strong baselines, repeated runs and statistical comparison.
  • NP-hard means the problem cannot be solved.It means no polynomial-time exact algorithm is known; small instances can be solved exactly and large ones approximately.

Skills you will practise

  • Formulating a scheduling problem
  • Designing a neighbourhood
  • Choosing baselines
  • Simulation-based evaluation
  • Statistical comparison of algorithms

The scheduling problem

In infrastructure-as-a-service clouds, users submit tasks that a broker must map onto virtual machines (VMs) with different processing capacities. Typical objectives are to minimise makespan (the time until the last task finishes), keep the load on VMs balanced, and use resources efficiently; reliability becomes an objective when VMs can fail. In simulation studies the broker queries a registry of available resources, receives the task list and applies a scheduling rule.

Even simple versions of this mapping problem are NP-hard. That term is often misused: it means the problem is at least as hard as every problem in the class NP, so no polynomial-time algorithm that always finds the best schedule is known, and none exists unless P equals NP (Fortnow, 2009; Cormen et al., 2022). It does not mean the problem cannot be solved: small instances can be solved exactly, and large ones are handled with heuristics that find good, not provably optimal, schedules quickly. Hill climbing is one of the simplest.

How hill climbing works

Hill climbing is a local search method. It starts from a complete solution, here an assignment of every task to a VM, and repeatedly moves to a neighbouring solution that is better according to an objective function. A neighbour is a solution reachable by one small change, such as moving one task to another VM or swapping two tasks between VMs. When no neighbour is better, the search stops.

  1. 1Start with an initial schedule
  2. 2Generate neighbouring schedules (move or swap tasks)
  3. 3Evaluate each neighbour (e.g. makespan)
  4. 4Move to a better neighbour
  5. 5Stop when no neighbour improves
Figure 1. The basic hill-climbing loop for task scheduling.

Three variants are common. Steepest-ascent hill climbing evaluates every neighbour and takes the best; first-improvement takes the first better neighbour found; stochastic hill climbing picks among improving neighbours at random. All share the same weakness: they stop at a local optimum, a solution better than all its neighbours but not necessarily the best overall, and they can stall on plateaus where neighbours are equally good. Random restarts, or accepting some worsening moves as simulated annealing does, address this. Those additions are what turn local search into a metaheuristic, which is why calling plain hill climbing a "metaheuristic".

Hill climbing remains useful in cloud scheduling research, both as a baseline and as a component. Kruekaew and Kimpan (2014), scheduling VMs with an artificial bee colony algorithm in CloudSim, note earlier work that used stochastic hill climbing for cloud load balancing, and Zeedan et al. (2023) combine a binary artificial bee colony algorithm with an enhanced beta-hill-climbing local search to balance load, reporting gains in response time, cost and utilisation over round robin and other simple balancers in CloudAnalyst.

Building in load balancing and reliability

A plain makespan objective can produce schedules that overload fast VMs while slow ones idle. A load-balancing factor adds a term that penalises imbalance, for example the standard deviation of VM completion times, which Kruekaew and Kimpan (2014) use as their measure of balance. The objective then becomes a weighted combination, and the weights are design choices that must be reported and tested.

A reliability factor addresses failure. One general approach is to keep, for each VM, a record of tasks completed and tasks failed, and to scale the VM's effective capability by that record, so that VMs that fail often are offered fewer or shorter tasks. Some schemes of this kind use separate success and failure factors that adjust a capability weight after each allocation. Whatever scheme a thesis uses, it should state how the factors are updated, how they are initialised, and how failures were simulated in the evaluation.

Design decisions in a hill-climbing scheduler
ComponentDesign choice to makeWhat to report
Solution representationTask-to-VM assignment vector or queue per VMEncoding and constraints
Initial solutionRandom, round robin or greedyMethod and seed
NeighbourhoodMove one task, swap two tasks, or bothMoves and neighbourhood size
ObjectiveMakespan, balance term, reliability term, costFormula and weights
AcceptanceSteepest ascent, first improvement, stochasticRule and tie-breaking
StoppingNo improvement, iteration or time budgetCriterion and budget
Reliability modelHow success and failure histories adjust capabilityUpdate rule and initial values

Worked example (illustrative)

Consider six tasks of 4,000, 3,000, 2,000, 2,000, 1,000 and 1,000 million instructions, and three VMs processing 1,000, 500 and 250 million instructions per second. A round-robin start places the 4,000 and the first 2,000 task on VM1 (6 s), the 3,000 and a 1,000 task on VM2 (8 s), and the second 2,000 and the other 1,000 task on VM3 (12 s). The makespan is 12 s.

With the "move one task" neighbourhood and steepest ascent, the best move transfers the 2,000 task from VM3 to VM1: VM1 now takes 8 s, VM2 8 s and VM3 4 s, so the makespan falls to 8 s. No single move can reduce the makespan further, because any task moved off one 8-second VM makes another VM finish later than 8 s, so the search stops. In this tiny case 8 s is also the global optimum, which can be confirmed by checking all 729 possible assignments. In realistic instances with hundreds of tasks no such check is possible, and the stopping point may be a local optimum well above the best schedule; that is why restarts and comparison with stronger methods matter.

Evaluating a scheduler fairly

Many published scheduling papers report a single simulation in which a proposed method beats round robin. That is weak evidence. No optimisation method is best on every problem (Wolpert & Macready, 1997), so a claim of superiority must be tied to defined workloads. A defensible evaluation uses several workload types and sizes, includes strong baselines (greedy heuristics, a well-tuned metaheuristic and, for small instances, an exact solver), and repeats stochastic methods over many independent runs. Results should be compared with appropriate non-parametric tests (Derrac et al., 2011), and the number of problems and runs chosen with care, because both affect the conclusions (Veček et al., 2017).

Benchmark design itself can mislead. Kudela (2022) showed that some test functions reward methods biased towards particular regions of the search space, which inflates apparent performance. The general lessons of experimental algorithmics apply: define the questions before running experiments, report the environment and parameters, and measure what the claims are about (McGeoch, 2012). Publish code, configuration and random seeds so others can reproduce the results (Sandve et al., 2013). For a related discussion of nature-inspired methods, see Elephant herding optimisation and beyond.

Directions for doctoral research

Hill-climbing schedulers can be extended in several directions, and these are reasonable starting points for a thesis if framed as testable questions rather than as promises of improvement.

  • Fog and edge computing: scheduling across devices with very different capacities and network delays, where a cheap local search may be preferable to a heavy population method.
  • Workflow scheduling: tasks with dependencies, where the neighbourhood must respect precedence constraints.
  • Large-scale data processing: placement of data-intensive tasks, where data transfer time enters the objective.
  • Adaptive fault tolerance: reliability factors learned from observed failures, evaluated under realistic failure traces rather than uniform random faults.
  • Hybrids: hill climbing as the local-improvement step inside a population method, with ablation studies that show what each component contributes.

Common mistakes

  • Describing hill climbing as a metaheuristic, or a new variant as "novel" without showing what differs.
  • Comparing only against round robin or first-come-first-served.
  • Reporting one run of a stochastic method with no variance or statistical test.
  • Leaving objective weights, reliability update rules or failure models unstated.
  • Reproducing another study's algorithm, tables or figures without credit.

Key takeaways

  • Task-to-VM scheduling is NP-hard, which justifies heuristics but does not make exact solutions impossible for small instances (Fortnow, 2009).
  • Hill climbing improves a schedule by local moves and stops at a local optimum; it is a local-search heuristic, not a metaheuristic.
  • Load-balancing and reliability factors change the objective or the capability estimates, and their weights and update rules must be reported.
  • Hill climbing is widely used as a baseline or as a component of hybrid schedulers (Kruekaew & Kimpan, 2014; Zeedan et al., 2023).
  • Fair evaluation needs several workloads, strong baselines, repeated runs and statistical tests (Derrac et al., 2011; Veček et al., 2017).
Your next step

Want to apply this to your own study?

  1. 1Tell us your topic, data and deadline
  2. 2A statistician reviews your work with you
  3. 3You get a plan and a quote
Quantitative analysis

References

  1. Cormen, T. H., Leiserson, C. E., Rivest, R. L., & Stein, C. (2022). Introduction to algorithms (4th ed.). MIT Press.
  2. Derrac, J., García, S., Molina, D., & Herrera, F. (2011). A practical tutorial on the use of nonparametric statistical tests as a methodology for comparing evolutionary and swarm intelligence algorithms. Swarm and Evolutionary Computation, 1(1), 3–18. https://doi.org/10.1016/j.swevo.2011.02.002
  3. Fortnow, L. (2009). The status of the P versus NP problem. Communications of the ACM, 52(9), 78–86. https://doi.org/10.1145/1562164.1562186
  4. Kruekaew, B., & Kimpan, W. (2014). Virtual machine scheduling management on cloud computing using artificial bee colony. In Proceedings of the International MultiConference of Engineers and Computer Scientists 2014 (Vol. I, pp. 18–22). IAENG. https://www.iaeng.org/publication/IMECS2014/IMECS2014_pp18-22.pdf
  5. Kudela, J. (2022). A critical problem in benchmarking and analysis of evolutionary computation methods. Nature Machine Intelligence, 4, 1238–1245. https://doi.org/10.1038/s42256-022-00579-0
  6. McGeoch, C. C. (2012). A guide to experimental algorithmics. Cambridge University Press. https://doi.org/10.1017/CBO9780511843747
  7. Sandve, G. K., Nekrutenko, A., Taylor, J., & Hovig, E. (2013). Ten simple rules for reproducible computational research. PLoS Computational Biology, 9(10), e1003285. https://doi.org/10.1371/journal.pcbi.1003285
  8. Veček, N., Črepinšek, M., & Mernik, M. (2017). On the influence of the number of algorithms, problems, and independent runs in the comparison of evolutionary algorithms. Applied Soft Computing, 54, 23–45. https://doi.org/10.1016/j.asoc.2017.01.011
  9. Wolpert, D. H., & Macready, W. G. (1997). No free lunch theorems for optimization. IEEE Transactions on Evolutionary Computation, 1(1), 67–82. https://doi.org/10.1109/4235.585893
  10. Zeedan, M., Attiya, G., & El-Fishawy, N. (2023). Enhanced load balancing based on hybrid artificial bee colony with enhanced β-hill climbing in cloud. Mansoura Engineering Journal, 48(3), Article 11. https://doi.org/10.58491/2735-4202.3098

How to cite this article

Choose your referencing style, then copy. Check your university's or journal's guide for local variations.

PhD Research Lab Academy. (2019, December 20). Hill climbing for cloud task scheduling: local search, load balancing and reliability factors explained. PhD Research Lab. https://www.phdassistance.com/blog/dissertation-algorithm-development-tips-for-developing-hill-climbing-algorithm-for-cloud-based-task-scheduling/

PhD Research Lab Academy. “Hill Climbing for Cloud Task Scheduling: Local Search, Load Balancing and Reliability Factors Explained.” PhD Research Lab, 20 Dec. 2019, www.phdassistance.com/blog/dissertation-algorithm-development-tips-for-developing-hill-climbing-algorithm-for-cloud-based-task-scheduling. Accessed [access date].

PhD Research Lab Academy (2019) Hill climbing for cloud task scheduling: local search, load balancing and reliability factors explained. PhD Research Lab. Available at: https://www.phdassistance.com/blog/dissertation-algorithm-development-tips-for-developing-hill-climbing-algorithm-for-cloud-based-task-scheduling/ (Accessed: [access date]).

PhD Research Lab Academy. “Hill Climbing for Cloud Task Scheduling: Local Search, Load Balancing and Reliability Factors Explained.” PhD Research Lab. December 20, 2019. https://www.phdassistance.com/blog/dissertation-algorithm-development-tips-for-developing-hill-climbing-algorithm-for-cloud-based-task-scheduling.

PhD Research Lab Academy, ‘Hill Climbing for Cloud Task Scheduling: Local Search, Load Balancing and Reliability Factors Explained’ (PhD Research Lab, 20 December 2019) <https://www.phdassistance.com/blog/dissertation-algorithm-development-tips-for-developing-hill-climbing-algorithm-for-cloud-based-task-scheduling> accessed [access date].

PhD Research Lab Academy. Hill climbing for cloud task scheduling: local search, load balancing and reliability factors explained [Internet]. PhD Research Lab; 2019 Dec 20 [cited [access date]]. Available from: https://www.phdassistance.com/blog/dissertation-algorithm-development-tips-for-developing-hill-climbing-algorithm-for-cloud-based-task-scheduling/

PhD Research Lab Academy, “Hill climbing for cloud task scheduling: local search, load balancing and reliability factors explained,” PhD Research Lab, Dec. 20, 2019. [Online]. Available: https://www.phdassistance.com/blog/dissertation-algorithm-development-tips-for-developing-hill-climbing-algorithm-for-cloud-based-task-scheduling. [Accessed: [access date]].

@online{dissertation_algorithm_development_tips_for_developing_hill_climbing_algorithm_for_cloud_based_task_scheduling_2019,
  author = {{PhD Research Lab Academy}},
  title = {{Hill climbing for cloud task scheduling: local search, load balancing and reliability factors explained}},
  organization = {PhD Research Lab},
  date = {2019-12-20},
  url = {https://www.phdassistance.com/blog/dissertation-algorithm-development-tips-for-developing-hill-climbing-algorithm-for-cloud-based-task-scheduling},
  urldate = {[access date]}
}

This article is for learning. Use it to understand the method and cite the original sources above in your own work; do not copy or submit it as your own.

Hill climbing for cloud task schedulingNeed help applying it to your study?
Quantitative analysis