-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[finagle-netty4] Expose a knob to control io-ratio in EpollEventLoop
Problem We can't control how much time netty spends processing i/o events compared to other work Solution Introduce a knob that allows us to do this Differential Revision: https://phabricator.twitter.biz/D1175405
- Loading branch information
Showing
2 changed files
with
34 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
finagle-netty4/src/main/scala/com/twitter/finagle/netty4/ioRatio.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.twitter.finagle.netty4 | ||
|
||
import com.twitter.app.GlobalFlag | ||
|
||
/** | ||
* Flag for defining the percentage of the desired amount of time spent for I/O in the child event | ||
* loops. The default value is 50, which means the event loop will try to spend the same amount of | ||
* time for I/O as for non-I/O tasks. | ||
* | ||
* {{ | ||
* -com.twitter.finagle.netty4.ioRatio=50 | ||
* }} | ||
* | ||
*/ | ||
object ioRatio | ||
extends GlobalFlag( | ||
50, | ||
"Sets the percentage of the desired amount of time spent for I/O in the child event loops. " + | ||
"The default value is 50, which means the event loop will try to spend the same amount of " + | ||
"time for I/O as for non-I/O tasks." | ||
) |