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:
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.
(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.
Valid issue. With introduction of global thread pooling, and other focuses, keeping it under DEFERRED, and will revisit after couple of releases.