uos-ste-resourced io.cost model database
=======================================

This directory contains per-disk io.cost.model and io.cost.qos parameters.
Each file describes exactly one block device and is matched by the disk's
partition UUID.

UUID sources (searched in order)
--------------------------------

1. /sys/block/<dev>/uuid
2. /sys/block/<dev>/device/uuid
3. /dev/disk/by-partuuid/<uuid> -> /dev/<dev>
4. /dev/disk/by-uuid/<uuid> -> /dev/<dev>

The first UUID found for a device is used as the lookup key.

File naming
-----------

Filenames are for human readability only; matching is done by the "UUID"
value inside the [Device] section.

Suggested filename:

    <uuid>.ini

INI format
----------

    [Device]
    UUID=12345678-1234-1234-1234-123456789abc

    [Model]
    ; Optional: a complete io.cost.model payload. When present and non-empty,
    ; it takes precedence over the individual coefficients below.
    ; Model=ctrl=user model=linear rbps=2100000000 rseqiops=120000 rrandiops=300000 wbps=1500000000 wseqiops=80000 wrandiops=220000

    ; Alternatively, provide the controller/type and the six coefficients;
    ; the daemon combines them into the kernel payload.
    Ctrl=user
    ModelType=linear
    RBPS=2100000000
    RSEQIOPS=120000
    RRANDIOPS=300000
    WBPS=1500000000
    WSEQIOPS=80000
    WRANDIOPS=220000

    ; QoS payload written to /sys/fs/cgroup/io.cost.qos, WITHOUT the kernel
    ; device id prefix.
    QoS=enable=1 ctrl=user rpct=95 rlat=40000 wpct=95 wlat=40000 min=25 max=20000

Field notes:

- [Device]/UUID: the whole-disk identifier used as the lookup key.
- [Model]/Model (optional): complete payload written to io.cost.model,
  WITHOUT the kernel device id prefix. Takes precedence if set.
- [Model]/Ctrl (default: user): io.cost controller.
- [Model]/ModelType (default: linear): cost model type.
- [Model]/RBPS, RSEQIOPS, RRANDIOPS, WBPS, WSEQIOPS, WRANDIOPS: the six
  linear-model coefficients. When Model= is not used, all six must be
  present and non-zero to produce a valid model payload.
- [Model]/QoS (optional): payload written to io.cost.qos, WITHOUT the
  kernel device id prefix.

The daemon prepends "MAJ:MIN " automatically before writing to the kernel.

Search order
------------

At runtime uos-ste-resourced looks for matching entries only in:

  /var/lib/uos-ste-resourced/iocost-model-local/   (local cache, writable)

If no entry matches, io.cost is not enabled for that device.
