Skip to content

pbmoura/scalability_experiments

Repository files navigation

This is a simple system to emulate a service receiving a workload and distributing it to some instances.
It is composed by the following executables:
- client: creates a set of processes to emulate simultaneous users;
- loadbalancer: receives messages from client and distributes to workers doing round robin
- worker: emulate task execution
The task emulation by the worker is in three phases:
- one that takes constant time
- one whose time increases linearly with the number of workers running
- one whose time increases quadratically with the number of workers
The intention is to observe the effects of contention and coherency in scalability, as define in the Universal Scalability Law (USL).

You can use 'make' to compile all the executables. The binaries will at bin/ folder.

Each of those executables receives some parameters.
The script generate.py creates a bash script, in experiments/ folder, to automate experiments execution.
The generated script, when executed, runs the system, distributed in DAS-4 nodes, a number of times,
varying two of executables' parameters (the number of client processes and the number of worker instances).

generate.py receives the following parameters:

$1) number of client processes (per step)
$2) the number of sequential messages each client process will send to the load balancer
$3) the duration of each task in a worker
$4) number of nodes running a worker (per step)
$5) the duration of each synchronization between two workers in linear phase
$6) the duration of each synchronization between two workers in quadratic phase
$7) (optional) final step. default=30
$8) (optional) initial step. default=1

then, it produces a script with one line per step to execute in the experiment.
In the first line, the number of processes is equals to $1 * $8 and number of worker instances equals to $4 * $7.
In each subsequent line, they are incremented by $1 and $4 respectively.

During the execution, time measurements are saved in results/ folder.
Other messages are saved in logs/ folder.

The experiment scripts use the scripts run, client.sh, loadbalancer.sh and worker.sh, found in this project's root directory.

Folder analysis/, contains R scripts to estimate the USL scalability model based on experiment measurements. 
estimate.R is executable and processes a .client file produced by an experiment.
$ ./estimate.R Experiment_result.client N
creates the file Experiment_result.client.pdf containing a graph with measurements (points), 
the ideal model according to experiment parameters (dashed line) and the model estimated from N first measurements (solid line).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published