In the TCP_CRR benchmark, ovs-vswitchd spends so much time in
update_stats() that it has a significant impact on flow setup
performance. Further work is needed in this area, but for now,
simply rate limiting facet_learn() has a roughly 10% improvement
with complex flow tables.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
* always be valid, since it could have been removed after newer
* subfacets were pushed onto the 'subfacets' list.) */
struct subfacet one_subfacet;
* always be valid, since it could have been removed after newer
* subfacets were pushed onto the 'subfacets' list.) */
struct subfacet one_subfacet;
+
+ long long int learn_rl; /* Rate limiter for facet_learn(). */
};
static struct facet *facet_create(struct rule_dpif *,
};
static struct facet *facet_create(struct rule_dpif *,
netflow_flow_init(&facet->nf_flow);
netflow_flow_update_time(ofproto->netflow, &facet->nf_flow, facet->used);
netflow_flow_init(&facet->nf_flow);
netflow_flow_update_time(ofproto->netflow, &facet->nf_flow, facet->used);
+ facet->learn_rl = time_msec() + 500;
+
struct subfacet, list_node);
struct action_xlate_ctx ctx;
struct subfacet, list_node);
struct action_xlate_ctx ctx;
+ if (time_msec() < facet->learn_rl) {
+ return;
+ }
+
+ facet->learn_rl = time_msec() + 500;
+
if (!facet->has_learn
&& !facet->has_normal
&& (!facet->has_fin_timeout
if (!facet->has_learn
&& !facet->has_normal
&& (!facet->has_fin_timeout