mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-12 22:44:32 +00:00
MINOR: applet: assign the same nice value to a new appctx as its owner task
When an applet is created, let's assign it the same nice value as the task of the stream which owns it. It ensures that fairness is properly propagated to applets, and that the CLI can regain a low latency behaviour again. Huge differences have been seen under extreme loads, with the CLI being called every 200 microseconds instead of 11 milliseconds.
This commit is contained in:
parent
34b1facbcf
commit
10d81b8757
@ -302,8 +302,10 @@ static inline struct appctx *si_alloc_appctx(struct stream_interface *si, struct
|
||||
|
||||
si_release_endpoint(si);
|
||||
appctx = appctx_new(applet, tid_bit);
|
||||
if (appctx)
|
||||
if (appctx) {
|
||||
si_attach_appctx(si, appctx);
|
||||
appctx->t->nice = si_strm(si)->task->nice;
|
||||
}
|
||||
|
||||
return appctx;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user