Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1385794

Summary: io-throttling: Calculate moving averages and throttle offending hosts
Product: [Community] GlusterFS Reporter: Shreyas Siravara <sshreyas>
Component: io-threadsAssignee: bugs <bugs>
Status: CLOSED DEFERRED QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: mainlineCC: atumball, bugs, pkarampu, ravishankar, rgowdapp, vbellur
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-05-09 20:21:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch none

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.