Provisioning and scheduling are different steps
Resource provisioning decides how much capacity a workload gets and where it runs. Task scheduling decides which task runs on which resource, and when. Provisioning is about capacity. Scheduling is about assignment. A team might provision four VMs, then use a scheduler to decide which jobs run on each one.
What does provisioning mean in cloud computing?
Provisioning means allocating and preparing computing, storage, and network resources so that a workload can run, and making those resources available to the people and services that need them.
Static, dynamic, and self-provisioning
A common textbook division has three types:
- Static provisioning: capacity is fixed in advance. It is simple to plan, but idle capacity still costs money, and demand can exceed what was provisioned.
- Dynamic provisioning: capacity is adjusted while the system runs, to match demand.
- User self-provisioning: customers request and launch resources themselves through a portal or API.
Over-provisioning wastes money. Under-provisioning slows services and can cause missed service-level targets. The SLA life cycle explains how those targets are set and measured.
Purchase options
Providers sell capacity on different terms, which map onto the provisioning types:
- Reserved or committed capacity requires a commitment, typically for one or three years, in exchange for a lower rate. AWS Reserved Instances and Savings Plans can reduce on-demand prices by up to about 72 percent.
- On-demand capacity is billed for what you run, with no commitment.
- Spot or preemptible capacity is unused capacity sold at a steep discount, but the provider can reclaim it. AWS Spot can be up to about 90 percent cheaper and gives a two-minute interruption notice. Google Cloud Spot VMs and Azure Spot VMs give a 30-second notice.
Spot capacity suits work that can tolerate interruption, such as batch jobs that save checkpoints. It is not guaranteed. Discounts and notice periods change, so check each provider’s current terms.
Autoscaling
Autoscaling adjusts capacity automatically. Common modes include:
- Reactive (threshold-based): add capacity when a metric crosses a limit, such as CPU use above 70 percent.
- Target tracking: keep a metric close to a chosen target value.
- Scheduled: change capacity at known times, such as before a sale.
- Predictive: forecast demand and scale ahead of it.
There are two scaling directions. Horizontal scaling adds or removes instances. Vertical scaling resizes one instance, which often requires a restart.
Autoscaling is not instant. New VMs typically take tens of seconds to minutes to become ready. Warm-up and cooldown periods help prevent the system from adding and removing capacity repeatedly during a traffic spike.
What is resource management in cloud computing?
Resource management covers the ongoing work of keeping capacity useful and affordable. It includes monitoring usage, enforcing quotas and budgets, controlling who can change resources, and deciding when to add or release capacity. Provisioning is one part of it, and scheduling is another.
What is scheduling in computing?
Scheduling decides the order and place in which tasks run on limited resources. In an operating system, the scheduler decides which process gets the CPU next. In cloud and distributed systems, a scheduler assigns tasks or jobs to machines or VMs, and decides their order.
Types of scheduling
Task scheduling is usually described along several axes:
- Static or dynamic: static scheduling uses information known before execution. Dynamic scheduling adjusts as tasks run and conditions change.
- Preemptive or non-preemptive: a preemptive scheduler can interrupt a running task. A non-preemptive scheduler lets each task run to completion.
- Centralized or distributed: one scheduler makes every decision, or several schedulers share the work.
- Online or batch: an online scheduler places each task as it arrives. A batch scheduler collects tasks and schedules them together.
- Independent tasks or workflows: independent tasks have no dependencies. Workflows are graphs in which some tasks must finish before others start.
Common algorithms
- First come, first served (FCFS) runs tasks in arrival order.
- Round robin gives each task a fixed time slice in turn. It ignores task size and VM capacity, so it is rarely the best choice for cloud workloads.
- Shortest job first (SJF) runs the shortest tasks first to reduce average waiting time.
- Min-Min and Max-Min choose the next task to place based on its estimated completion time on each machine.
- HEFT (Heterogeneous Earliest Finish Time) is a common heuristic for workflows.
- Metaheuristics such as genetic algorithms, ant colony optimization, and particle swarm optimization search for good schedules when the options are too many to check.
What scheduling optimizes
Schedulers balance competing goals: makespan (the total time to finish a set of tasks), cost, energy use, load balance, deadline and SLA compliance, and throughput. No single algorithm is best on all of them. Finding the optimal schedule for multiple machines is NP-hard, so practical schedulers use heuristics that give good results rather than provably perfect ones.
Example: the Kubernetes scheduler
The Kubernetes scheduler places each pod in stages. It first filters out nodes that cannot run the pod, then scores the remaining nodes, and finally binds the pod to the best-scoring node. Containers are scheduled this way in many cloud platforms.
Simulating schedulers
Engineers and researchers often test provisioning and scheduling policies in a simulator before applying them to live systems. CloudSim, developed at the CLOUDS Lab at the University of Melbourne, is a widely used research simulator.
Key takeaways
- Provisioning sets how much capacity exists. Scheduling decides what runs where.
- Choose purchase options based on how steady the workload is and how well it tolerates interruption.
- Autoscaling takes time, so plan for lag. Load balancers handle the routing as instances come and go.
- Scheduling across shared machines is also a core problem in grid computing.
- Start with simple algorithms as a baseline, and measure before adding complexity.