This is a quick overview of how to profile any system, be it bare metal, a VM or a container.
- Docker and docker-compose are installed
- StorPerf is up and running
- SSH access to target system(s) to be profiled
Assumption: system that will run Docker to host StorPerf is Ubuntu.
Install Docker and Docker-Compose
This step may be skipped if docker is already installed.
Log out and back in so your user is now part of the docker group.
Set Up StorPerf
StorPerf still has some code that expects to find OpenStack variables, even if OpenStack will not be used.
Next, make a directory for storing metrics and ensure it has writable permissions for the Carbon process.
Pull and start the StorPerf container.
StorPerf Swaager UI is now available at the IP address of this server, at port 5000.
Initialize Volumes to Test
This is an important step, especially as we do not know the implementation of the underlying storage device. For example, Ceph uses lazy block allocation, so reading from a Ceph volume that has no data yields incredible performance as no disk I/O will occur.
We need to decide: are we profiling a device or a filesystem? Initialization of files in an existing filesystem with a directory called "/storperf" looks as follows:
Submitting this to the ReST API will cause a new job to start which will create 100 files of 2GB each in the /storperf directory.
Profile the Disk
We use the same parameters as the initialize, but now we add the operations to perform. StorPerf can iterate over a matrix of block sizes, queue depths and IO patterns. Post the following to the /api/v2.0/jobs API:
This will return a job id, which can be queried from the jobs API or viewed via the built-in graphite browser.
View the Results
First query the status of the job, using the id returned from the jobs API and type=status. This shows the status of a job that is still in progress.
This is a screenshot of Graphite showing the metrics for read and write latency.
Use the following graph targets to see average read and write latency for any job in Graphite:
Once the job has finished, the status API will return the following:
From there we can get the summary metrics by specifying status=metrics. Note: bandwidth is reported in kilobytes (KB) per second. Bandwidth is the product of IOPS times block size.
Or, if desired, the full report can be fetched using the status=metadata tag. This includes the "criteria" tag, which will be PASS or FAIL. PASS means all tests were able to achieve steady state and report valid statistics, and FAIL is reported when at least one test run failed to achieve steady state,
The metadata also includes a report_data tag which provides the raw metrics for all runs. The series data, max, min and slope are all provided in this raw report for plotting or investigation. Each run will also report steady_state: true or false to indicate if the metrics are based on steady state and therefore can be counted as valid.