[fpmsyncd] support pipeline to flush with a timer#3241
[fpmsyncd] support pipeline to flush with a timer#3241prsunny merged 4 commits intosonic-net:masterfrom
Conversation
f3d9c55 to
f48b154
Compare
Its compilation needs this pr to be released |
45568ef to
5af28d2
Compare
5af28d2 to
5d0e7b0
Compare
30707f8 to
dcc16ad
Compare
2cbc4a2 to
13404ba
Compare
fpmsyncd/fpmsyncd.cpp
Outdated
| int idle = pipeline.getIdleTime(); | ||
|
|
||
| // flush right away | ||
| if (remaining < SMALL_TRAFFIC || idle >= gFlushTimeout || idle <= 0 || scheduled) { |
There was a problem hiding this comment.
Why flush with small traffic?
If there are lots of data, the pipeline will not flush until next timeout?
There was a problem hiding this comment.
This optimization aims to reduce pipeline flushes in the case of scaled traffic.
Hence for SMALL_TRAFFIC, do immediate flush to maintain the logic before optimization. So that it would not affect the performance when you want to dispatch several critical routes.
But since we skip several flushes, we need to set a timeout to make sure the routes would eventually get flushed, that's when idle >= gFlushTimeout
idle <=0 happens when the system clock is not steady, but since we use steady_clock it shouldn't happen.
There was a problem hiding this comment.
#Closed
Suggest add this info to code comments.
7a7005e to
80c961f
Compare
|
This PR also depends on merging PR#954 |
80c961f to
53a75da
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
1203bc5 to
d223316
Compare
What I did change the pipeline size for RouteSync modify the fpmsyncd flush behavior so that it could delay the flush with an expiring timer the timer is simulated by setting the timeout for select function
What I did change the pipeline size for RouteSync modify the fpmsyncd flush behavior so that it could delay the flush with an expiring timer the timer is simulated by setting the timeout for select function
What I did change the pipeline size for RouteSync modify the fpmsyncd flush behavior so that it could delay the flush with an expiring timer the timer is simulated by setting the timeout for select function
What I did change the pipeline size for RouteSync modify the fpmsyncd flush behavior so that it could delay the flush with an expiring timer the timer is simulated by setting the timeout for select function
What I did change the pipeline size for RouteSync modify the fpmsyncd flush behavior so that it could delay the flush with an expiring timer the timer is simulated by setting the timeout for select function
What I did change the pipeline size for RouteSync modify the fpmsyncd flush behavior so that it could delay the flush with an expiring timer the timer is simulated by setting the timeout for select function
What I did change the pipeline size for RouteSync modify the fpmsyncd flush behavior so that it could delay the flush with an expiring timer the timer is simulated by setting the timeout for select function
What I did change the pipeline size for RouteSync modify the fpmsyncd flush behavior so that it could delay the flush with an expiring timer the timer is simulated by setting the timeout for select function Signed-off-by: Baorong Liu <[email protected]>
What I did
RouteSyncselectfunctionWhy I did it
APP_DBHow I verified it
measure the performance with PerformanceTimer