Performance decrease in ipt_do_table
Subsystems (2)
Le 18/04/2023 à 16:37, pengyi (M) a écrit :
Quoted 3 lines
Hi, I found after the commit
d43b75fbc23f[vrf: don't run conntrack on vrf with !dflt qdisc] invrf.c, the performance ofipt_do_tabledecreased. Invrf.c, the locally generated packet was marked as "untracked" invrf_ip_out, because it won't be processed by the router(also mentioned in commit.d43b75fbc23f). And it will also made the statebit was set toXT_CONNTRACK_STATE_UNTRACKEDinconntrack_mt, which means we didn't had the information about in conntrack so we had to re-analysize the packet by callingtcp_mt().However, after the commit
d43b75fbc23f, all packets invrf_ip_outwas marked as "untracked", which made more times of callingtcp_mt(). Hence the time of processing all packets became longer and it affected the performance ofipt_do_table()in total. I wonder is it an expected behavior to see the performance decrease after the commitd43b75fbc23f?
It was not the goal of this commit :)
The performance regression seems to be specific to your rule set. As explained in the commit log, the goal was to have the same packet processing, whatever qdisc is configured on the vrf interface.
Before this patch, you should have the same performance level (as now) if a qdisc is configured.
Regards,
Nicolas