November 8, 2016 · contiv

Contiv Volplugin Rate limiting - Runtime

One of the coolest features of Contiv volplugin is the ability to modify volume iops,bps resource restrictions on the fly.

This is facilitated by,
volcli volume runtime upload policy/volume < restrictions.json

policy/volume - policy name /volume name
restrictions.json - JSON file with resource restrictions

The entire flow..

Create a policy

volcli policy upload policy1 < policy1.json

Create a volume

volcli volume create policy1/volume1

Attach this volume to a container

docker run -it -v policy1/volume1:/mntpath ubuntu /bin/bash

So, now that the volume is attached - you can still modify the ios/bps on it via volcli

Create a JSON file - restrictions.json,

    {
        "rate-limit": {
        "write-bps": 1000,
        "read-bps": 10
        }
    }

Upload the new restrictions,

volcli volume runtime upload policy1/volume1 < restrictions.json

Done - the new restrictions are active now!

  • LinkedIn
  • Tumblr
  • Reddit
  • Google+
  • Pinterest
  • Pocket