Skip to content

codes storage models

Misbah Mubarak edited this page Dec 12, 2016 · 1 revision

Storage/Utility models

Local storage model

The local storage model (LSM) is fairly simple in design but is sufficient for many simulations with reasonable I/O access patterns. It is an overhead/latency/bandwidth model that tracks file and offset accesses to determine whether to apply seeking penalties to the performance of the access. It uses a simple histogram-based approach to parameterization: overhead/latency/bandwidth numbers are given relative to different access sizes. To gather such parameters, well-known I/O benchmarks such as fio (http://git.kernel.dk/?p=fio.git;a=summary) can be used.

The LP name used in configuration is "lsm" and the configuration is expected to be in a similarly named standalone group, an example of which is shown below:

lsm
{
    # in bytes
    request_sizes   = ( "4096","8192","16384","32768","65536","131072","262144","524288","1048576","2097152","4194304" );
    # in MiB/s (2^20 bytes / s)
    write_rates     = ( "1511.7","1511.7","1511.7","1511.7","1511.7","1511.7","1511.7","1511.7","1511.7","1511.7","1511.7" );
    read_rates      = ( "1542.1","1542.1","1542.1","1542.1","1542.1","1542.1","1542.1","1542.1","1542.1","1542.1","1542.1" );
    # in microseconds
    write_seeks     = ( "499.5","509.0","514.7","525.9","546.4","588.3","663.1","621.8","539.1","3179.5","6108.8" );
    read_seeks      = ( "3475.6","3470.0","3486.2","3531.2","3608.6","3741.0","3988.9","4530.2","5644.2","7922.0","11700.3" );
    write_overheads = ( "29.67","29.67","29.67","29.67","29.67","29.67","29.67","29.67","29.67","29.67","29.67" );
    read_overheads  = ( "23.67","23.67","23.67","23.67","23.67","23.67","23.67","23.67","23.67","23.67","23.67" );
}

The API can be found at codes/local-storage-model.h and example usage can be seen in tests/local-storage-model-test.c and tests/conf/lsm-test.conf.

The queueing policy of LSM is currently FIFO, and the default mode uses an implicit queue, simply incrementing counters and scheduling future events when I/O requests come in. Additionally, an explicit queue has been added and provides a simple FIFO+priority mechanism. To use, in the "lsm" group set "enable_scheduler" to the value "1".

Resource model

The resource model presents a simple integer counter representing some finite resource (e.g., bytes of memory available). LPs request some number of units of the resource, receiving a success/failure completion message via a callback mechanism. Optional "blocking" can be used to defer the completion message until the request is successfully completed.

The configuration LP name is "resource" and the parameters are given in a similarly-named group. An example is shown below:

resource { available="8192"; }

The API for the underlying resource data structure can be found in codes/resource.h. The user-facing API for communicating with the LP can be found in codes/resource-lp.h.

Clone this wiki locally