Skip to content

Google Summer of Code 2022 OpenAFS Filesystem Stress Tester

ajhingran edited this page Sep 12, 2022 · 33 revisions

Google Summer of Code 2022 - OpenAFS Filesystem Stress Tester

Contributor: Arnav Jhingran

Email: [email protected]

Github: ajhingran

Mentor: Michael Meffle

Contributor Work

This repository

The tester was built from the ground up throughout the coding period.

General Information

While tailored towards the needs and use cases of the OpenAFS project, the OpenAFS Filesystem Stress Tester is a general purpose filesystem stress tester written in C that allows users to measure the performance of their file system under different load environments.

Testing Features

The full feature set is outlined in the README file.

The tester is fully configurable and allows for full control over the frequency of IO operations, metadata operations, and other relevant testing parameters.

The tester can be setup simply by running make init and deployed through make run

How it works

The tester's utilizes the monkey-testing ideology for performance stress testing. Essentially the goal of the tester was to perform random operations on random files over a given period of time and record performance throughout the testing period.

The tester has a predefined set of operations: create, read, append/write, copy, rename, delete that are randomly chosen to be executed on a randomly selected file.

Each test directory will have certain files designated for reading(will be testfiles-0 to testfile-N where n is the number of read files set in the config). These read files are generated to be of 1gb in size and filled with random bytes of data to prevent any processor short cutting during testing.

Following the initialization of the test directories, the tester spawns n number of processes to run in parallel along all of the test directories. This way additional load is generated both on the file-system and the system itself as each process is manipulating random test files simultaneously instead of one process doing so sequentially. The number of processes spawned are determined by the number of cores available as defined in the config file and the number of test directories the user wants to generate.

Throughout the duration of the test each process will randomly generate a file path to a file in its set of directories and then based on the defined likelihood of an operation occurring(done in the config) the tester has a x% chance of performing the given operation on that file.

Each operation except for the read sequential and random access read record the wall time taken to complete said operation. These data points are stored in corresponding .txt files that are stored in the metrics folder in order to evaluate performance. The read operations record the bytes per second throughput for the given file being read.

Performance Visualization

In order to ease visualization of performance trends from the gathered metrics, the testing suite also provides the ability to generate a scatter plot visualization that can be stored both in rasterized and vector image files.

To obtain the scatter plots run make viewplots following the completion of any stress test. The images (both .png and .pdf) will be stored in the metrics directory.

Example Visuals (from a local test)

The tester also produces vector images with better fidelity

append-metrics

delete-metrics

rename-metrics

AFS Deployment

Currently deploying on AFS requires manually cloning or copying the testing suite onto any VM running an AFS client. Once the tester is loaded on the VM and moved to the ~/afs/NAME/test/testdir, running make init and make run will run the testing suite as normal.

Future work

While outside of the scope of this project, the final step will be to deploy the tester through Ansible to allow automated deployment onto test VMs and the automated retrieval of relevant metric visuals to a local machine.

Possible integration into the RoboTesting suite could be possible as well.