SGPM: A coroutine scheduling model for wound-wait concurrency control optimization

Environment set up

  1. off the mod go env -w GO111MODULE=off
  2. change to GPATH to project directory go env -w GOPATH=$HOME/sgpm

Usage

This project serves the article: SGPM: A coroutine scheduling model for wound-wait concurrency control optimization

// change root
cd sgpm

Run workloads

type = [nondeterministic, determinisitc]

non-deterministic concurrency control protocols include:

tpl(2pl), sstpl, sstpl_nw, occ_nw, mvcc

deterministic concurrency control protocols include:

calvin, calvin_nw, bohm, bohm_nw, pwv, pwv_nw, aria.

high contention

go run src/t_coro/benchmark/${type}/high_conflict/main.go
// sample
go run src/t_coro/benchmark/nondeterministic/high_conflict/main.go
tpl:
thread: 1	ktps: 13203.4326812422	    reset_cnt: 0	ag_cnt: 0
thread: 2	ktps: 12833.339578891928	reset_cnt: 0	ag_cnt: 6301
thread: 3	ktps: 8493.386278668624	    reset_cnt: 0	ag_cnt: 24566
...

sstpl:
thread: 1	ktps: 12409.277324639228	reset_cnt: 0	ag_cnt: 0
thread: 2	ktps: 15492.526648377492	reset_cnt: 0	ag_cnt: 5419
thread: 3	ktps: 13830.129088350392	reset_cnt: 0	ag_cnt: 12211
...

low contention

go run src/t_coro/benchmark/${type}/low_conflict/main.go
// sample
go run src/t_coro/benchmark/deterministic/low_conflict/main.go
calvin:
thread: 1	ktps: 3080.4342981099535	reset_cnt: 0	ag_cnt: 0
thread: 2	ktps: 6755.481267119352		reset_cnt: 0	ag_cnt: 0
thread: 3	ktps: 10538.865470475926	reset_cnt: 0	ag_cnt: 0
...

pwv:
thread: 1	ktps: 5865.370279066106		reset_cnt: 0	ag_cnt: 0
thread: 2	ktps: 13005.117140347866	reset_cnt: 0	ag_cnt: 0
thread: 3	ktps: 18185.346535817327	reset_cnt: 0	ag_cnt: 3456
...

Process Queue size Test

type = [nondeterministic, determinisitc]

high contention

go run t_coro/benchmark/${type}/p_test/high_conf_p/main.go -help
Usage:
  -t int
        specifiy the thread count (default 1)
// sample
go run src/t_coro/benchmark/nondeterministic/p_test/high_conf_p/main.go

calvin:
thread: 1	ktps: 3081.119371900259		reset_cnt: 0		ag_cnt: 0
thread: 2	ktps: 6043.745505100265		reset_cnt: 0		ag_cnt: 6
thread: 3	ktps: 10451.180001190492	reset_cnt: 0		ag_cnt: 61
...

pwv:
thread: 1	ktps: 6959.77334523733		reset_cnt: 0	ag_cnt: 0
thread: 2	ktps: 14039.339580087875	reset_cnt: 0	ag_cnt: 2
thread: 3	ktps: 20134.522449235472	reset_cnt: 0	ag_cnt: 44
...

low contention

go run t_coro/benchmark/${type}/p_test/low_conf_p/main.go -help
Usage:
  -t int
        specifiy the thread count (default 1)
// sample
go run src/t_coro/benchmark/deterministic/p_test/low_conf_p/main.go

calvin:
thread: 128	p_size: 1	ktps: 8.927117583707796	    reset_cnt: 0	ag_cnt: 0
thread: 128	p_size: 2	ktps: 7.572126534571706	    reset_cnt: 0	ag_cnt: 1
thread: 128	p_size: 3	ktps: 8.060705027695164	    reset_cnt: 0	ag_cnt: 0
...

pwv:
thread: 32	p_size: 1	ktps: 3.1161268676958214	reset_cnt: 0	ag_cnt: 22854
thread: 32	p_size: 2	ktps: 71.54406706014281	    reset_cnt: 0	ag_cnt: 4
thread: 32	p_size: 3	ktps: 76.44205646254906	    reset_cnt: 0	ag_cnt: 1
...

Run workload with Coroutine

type = [nondeterministic, determinisitc]

high contention

go run src/t_coro/benchmark/{$type}/p_test/high_conf_compare/main.go -help
Usage:
  -p int
        specifiy the processQueue size (default 1)
// sample
go run src/t_coro/benchmark/nondeterminisitc/p_test/high_conf_compare/main.go -p 15
tpl:
thread: 1	ktps: 13085.124228860917	reset_cnt: 0	ag_cnt: 0
thread: 2	ktps: 27736.84051258458		reset_cnt: 0	ag_cnt: 126
thread: 3	ktps: 32100.771563873062	reset_cnt: 0	ag_cnt: 1951
...

sstpl:
thread: 1	ktps: 14182.76765364547		reset_cnt: 0	ag_cnt: 0
thread: 2	ktps: 16045.794517841021	reset_cnt: 0	ag_cnt: 3020
thread: 3	ktps: 21472.280448664762	reset_cnt: 0	ag_cnt: 3147
...

low contention

go run src/t_coro/benchmark/{$type}/p_test/low_conf_compare/main.go -help
Usage:
  -p int
        specifiy the processQueue size (default 1)
// sample
go run src/t_coro/benchmark/determinisitc/p_test/low_conf_compare/main.go -p 15
calvin:
thread: 1	ktps: 3.2970616981793226	reset_cnt: 0	ag_cnt: 0
thread: 2	ktps: 7.411632828693931		reset_cnt: 0	ag_cnt: 0
thread: 3	ktps: 8.144347913968012		reset_cnt: 0	ag_cnt: 0
...

pwv:
thread: 1	ktps: 7.097991750997907		reset_cnt: 0	ag_cnt: 0
thread: 2	ktps: 14.109490379034808	reset_cnt: 0	ag_cnt: 0
thread: 3	ktps: 18.255801443594297	reset_cnt: 0	ag_cnt: 1
..
Similar Resources

Go library to wait for the detached/unmounted state of a path.

Unmountpoint Unmountpoint is Go library to wait for the detached/unmounted state of a path. DISCLAIMER: This project is under development and fully ex

Oct 19, 2022

SSHWaiterUtil - Wait for file to appear over an SSH connection

SSHWaiterUtil Simple util to wait for a remote file to appear, over SSH using pr

Jan 11, 2022

Linstor-wait-until - Waits until a specific component of LINSTOR is online and usable

linstor-wait-until Waits until a specific component of LINSTOR is online and usa

Feb 2, 2022

A sync.WaitGroup with error handling and concurrency control

go-waitgroup How to use An package that allows you to use the constructs of a sync.WaitGroup to create a pool of goroutines and control the concurrenc

Dec 31, 2022

Genetic Algorithm and Particle Swarm Optimization

evoli Genetic Algorithm and Particle Swarm Optimization written in Go Example Problem Given f(x,y) = cos(x^2 * y^2) * 1/(x^2 * y^2 + 1) Find (x,y) suc

Dec 22, 2022

Distributed hyperparameter optimization framework, inspired by Optuna.

Distributed hyperparameter optimization framework, inspired by Optuna.

Goptuna Distributed hyperparameter optimization framework, inspired by Optuna [1]. This library is particularly designed for machine learning, but eve

Jan 1, 2023

Go package for convex optimization

cvx Package cvx is a Go package for solving convex optimization problems. It is a straightforward translation of parts of the CVXOPT python package fo

Nov 23, 2022

Gonum is a set of numeric libraries for the Go programming language. It contains libraries for matrices, statistics, optimization, and more

Gonum Installation The core packages of the Gonum suite are written in pure Go with some assembly. Installation is done using go get. go get -u gonum.

Jan 8, 2023

Gonum is a set of numeric libraries for the Go programming language. It contains libraries for matrices, statistics, optimization, and more

Gonum Installation The core packages of the Gonum suite are written in pure Go with some assembly. Installation is done using go get. go get -u gonum.

Dec 29, 2022

Opsani Ignite for Kubernetes: Evaluate Applications for Optimization

Opsani Ignite for Kubernetes: Evaluate Applications for Optimization

Opsani Ignite for Kubernetes Opsani Ignite analyzes applications running on a Kubernetes cluster in order to identify performance and reliability risk

Aug 5, 2022

Camera Control is a software "remote control" for conference cameras, e.g. Tenveo NV10U.

Camera Control is a software

Camera Control Camera Control is a software "remote control" for conference cameras, e.g. Tenveo NV10U. Smart access to stored positions and zoom sett

May 1, 2022

Go Http Proxy with Authentication, Schedule Control, and Portal Control

goproxy Go Http Proxy with Authentication, Schedule Control, and Portal Control Why this tool? You may need to restrict my kids's youtube watch time i

Mar 27, 2022

Production-Grade Container Scheduling and Management

Production-Grade Container Scheduling and Management

Kubernetes (K8s) Kubernetes, also known as K8s, is an open source system for managing containerized applications across multiple hosts. It provides ba

Dec 28, 2022

pg_timetable: Advanced scheduling for PostgreSQL

pg_timetable: Advanced scheduling for PostgreSQL

pg_timetable: Advanced scheduling for PostgreSQL pg_timetable is an advanced job scheduler for PostgreSQL, offering many advantages over traditional s

Dec 29, 2022

clockwork - Simple and intuitive job scheduling library in Go.

clockwork - Simple and intuitive job scheduling library in Go.

clockwork A simple and intuitive scheduling library in Go. Inspired by python's schedule and ruby's clockwork libraries. Example use package main imp

Jul 27, 2022

Simple, zero-dependency scheduling library for Go

go-quartz Simple, zero-dependency scheduling library for Go. About Inspired by the Quartz Java scheduler. Library building blocks Job interface. Any t

Dec 30, 2022

Easy and fluent Go cron scheduling

goCron: A Golang Job Scheduling Package. goCron is a Golang job scheduling package which lets you run Go functions periodically at pre-determined inte

Jan 8, 2023

Job scheduling made easy.

scheduler Job scheduling made easy. Scheduler allows you to schedule recurrent jobs with an easy-to-read syntax. Inspired by the article Rethinking Cr

Dec 30, 2022

A library for scheduling when to dispatch a message to a channel

gosd go-schedulable-dispatcher (gosd), is a library for scheduling when to dispatch a message to a channel. Implementation The implementation provides

Sep 27, 2022
Distributed hyperparameter optimization framework, inspired by Optuna.
Distributed hyperparameter optimization framework, inspired by Optuna.

Goptuna Distributed hyperparameter optimization framework, inspired by Optuna [1]. This library is particularly designed for machine learning, but eve

Jan 1, 2023
Collect gtfs vehicle movement data for ML model training.

Transitcast Real time transit monitor This project uses a static gtfs static schedules and frequent queries against a gtfs-rt vehicle position feed ge

Dec 19, 2022
Versioned model registry suitable for temporary in-training storage and permanent storage

Cogment Model Registry Cogment is an innovative open source AI platform designed to leverage the advent of AI to benefit humankind through human-AI co

May 26, 2022
A faster RWLock primitive in Go, 2-3 times faster than RWMutex. A Go implementation of concurrency control algorithm in paper

Go Left Right Concurrency A Go implementation of the left-right concurrency control algorithm in paper <Left-Right - A Concurrency Control Technique w

Jan 6, 2023
Evolutionary optimization library for Go (genetic algorithm, partical swarm optimization, differential evolution)
Evolutionary optimization library for Go (genetic algorithm, partical swarm optimization, differential evolution)

eaopt is an evolutionary optimization library Table of Contents Changelog Example Background Features Usage General advice Genetic algorithms Overview

Dec 30, 2022
high performance distributed task scheduling system, Support multi protocol scheduling tasks
 high performance distributed task scheduling system, Support multi protocol scheduling tasks

high performance distributed task scheduling system, Support multi protocol scheduling tasks

Dec 2, 2022
Coroutine based Deterministic 2PC Distributed Transaction

Enviorment set up off the mod go env -w GO111MODULE=off change to GPATH to project directory go env -w GOPATH=$HOME/coroprove Usage This project serve

Oct 30, 2021
CRUDist Model Driven Web Development. Automagically generate CRUD APIs from your model.

CRUDist - Model Driven API Development Automagicaly create CRUD APIs for your gorm models. Example Model definition type BaseModel struct { ID

Nov 15, 2021
Transmo - Transform Model into another model based on struct for Go (Golang).

Transmo Transmo is a Go library for transform model into another model base on struct. This library detect your field name to copy that into another m

Jan 7, 2022
Go-concurrency-patterns - Sample concurrency patterns with Goroutines

About This sample project provides some concurrency pattern examples in Go using

Feb 21, 2022