Giter Club home page Giter Club logo

kubernetes-scheduler-simulator's Introduction

๐Ÿš€ Kubernetes Scheduler Simulator

The simulator evaluates different scheduling policies in GPU-sharing clusters. It includes the Fragmentation Gradient Descent (FGD) policy proposed in the USENIX ATC 2023 paper "Beware of Fragmentation: Scheduling GPU-Sharing Workloads with Fragmentation Gradient Descent", along with other baseline policies (e.g., Best-fit, Dot-product, GPU Packing, GPU Clustering, Random-fit).

๐ŸŽฌ Demo

Step 1: Init and Run Experiments ย Step 2: Result Analysis

๐Ÿšง Environment Setup

Build from stratch

Please ensure that Go is installed.

go mod vendor installs the dependencies required for the simulator.

$ go mod vendor

make generates the compiled binary files in the bin directory.

$ make

Run within Docker

To save your time in the environment setup, we have just prepared a docker image with Golang 1.20.4, Python 3.10.11, and required libraries installed.

Besides, we have copied the GitHub repo under the home directory and compile the executable binary file (bin/simon), therefore, go mod vendor and make commands are no longer needed.

For the users not familiar with Docker, please refer to the official installation guide on Linux, Mac, or Windows platform. For the others, the following commands are for your reference.

# step 1: pull image
sudo docker pull qzweng/kubernetes-scheduler-simulator:atc23

# step 2: launch the docker container
sudo docker run -d --name=kss qzweng/kubernetes-scheduler-simulator:atc23 bash -c "sleep infinity"

# step 3: execute commands inside the container
sudo docker exec -it kss bash

# step 4: go to the project folder and conduct experiments
cd ~/kubernetes-scheduler-simulator

๐Ÿ”ฅ Quickstart Example

The following example will schedule 6 pods to a cluster with 2 nodes, and the expected output will show the allocation ratio of each resource dimension (CPU, memory, GPU). The default scheduling policy is fragmentation gradient descent (FGD).

$ bin/simon apply --extended-resources "gpu" \
                  -f example/test-cluster-config.yaml \
                  -s example/test-scheduler-config.yaml

๐Ÿ”ฎ Experiments on Production Traces

Install the required Python dependency environment.

$ pip install -r requirements.txt
  1. Please refer to README under the data directory to prepare production traces.
  2. Then refer to README under the experiments directory to reproduce the results reported in the paper.

๐Ÿ“ Paper

Please cite our paper if it is helpful to your research.

@inproceedings{FGD2023,
    title = {Beware of Fragmentation: Scheduling GPU-Sharing Workloads with Fragmentation Gradient Descent},
    author = {Qizhen Weng and Lingyun Yang and Yinghao Yu and Wei Wang and Xiaochuan Tang and Guodong Yang and Liping Zhang},
    booktitle = {2023 {USENIX} Annual Technical Conference},
    year = {2023},
    series = {{USENIX} {ATC} '23}
    url = {https://www.usenix.org/conference/atc23/presentation/weng},
    publisher = {{USENIX} Association},
}

๐Ÿ™๐Ÿป Acknowledge

Our simulator is developed based on open-simulator by Alibaba, a simulator used for cluster capacity planning. This repository primarily evaluates the performance of different scheduling polices on production traces. GPU-related plugin has been merged into the main branch of open-simulator.

โณ TODO

  • Add a minikube running example to demonstrate how the simulator schedules pods in a real Kubernetes cluster.

kubernetes-scheduler-simulator's People

Contributors

qzweng avatar mental2008 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.