Bug 1385794 - io-throttling: Calculate moving averages and throttle offending hosts
Summary: io-throttling: Calculate moving averages and throttle offending hosts
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: GlusterFS
Classification: Community
Component: io-threads
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: bugs@gluster.org
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-17 17:16 UTC by Shreyas Siravara
Modified: 2019-05-09 20:21 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-09 20:21:41 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)
Patch (112.73 KB, patch)
2016-10-17 17:16 UTC, Shreyas Siravara
no flags Details | Diff

Description Shreyas Siravara 2016-10-17 17:16:12 UTC
Created attachment 1211476 [details]
Patch

Description of problem:
This diff gives gluster the ability to throttle FOPs happening over NFS.

It adds the following features:

* Introduces the notion of "namespaces" for throttling. A namespace is, in fact, simply an export, which is encoded in the file handles of all NFS ops. These
  operations pass through to the io-stats translator, which throttles FOPs based on namespaces.
* Leveraging FOP sampling, we continuously compute a simple moving average over the last 5 intervals that tells us what the current fop rate for a namespace is.
* Tags every frame coming from the NFS translator with an FOP priority and a "namespace id".
* Adds a config file called "throttling.conf" that essentially looks like this:

  /groot 100000
  /groot/share1 500
  /groot/share2 200

Every share must be defined with the allowed FOPs/second.

When an FOP comes into io-stats, we check what the allowed FOP rate for the share is, and what the current average FOP rate of the share is, and then sets the priority of the FOP to IOT_PRI_LEAST if the current rate violates the allowed rate. IO Threads then enqueues the FOPs and slows down the operations on that share, until users of the share start "behaving".

This feature requires NFS, FOP Sampling, and IO Threads.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 Niels de Vos 2016-12-13 16:57:42 UTC
I think this has been moved out of Gluster/NFS and into its own xlator? If this is still something that should be done in Gluster/NFS, then please correct the component.

Comment 3 Ravishankar N 2018-11-19 04:29:09 UTC
(In reply to Niels de Vos from comment #2)
> I think this has been moved out of Gluster/NFS and into its own xlator? If
> this is still something that should be done in Gluster/NFS, then please
> correct the component.

Component is io-threads. Clearing the need-info.

Comment 4 Amar Tumballi 2019-05-09 20:21:41 UTC
Valid issue. With introduction of global thread pooling, and other focuses, keeping it under DEFERRED, and will revisit after couple of releases.


Note You need to log in before you can comment on or make changes to this bug.