* [dpdk-dev] [RFC] net/mlx5: memory optimization for flow
@ 2020-03-16 2:54 Suanming Mou
0 siblings, 0 replies; only message in thread
From: Suanming Mou @ 2020-03-16 2:54 UTC (permalink / raw)
To: Matan Azrad, viacheslavo; +Cc: dev
Once there are millions of flows be created, the memory consumption of
one flow will become more sensitive. A byte memory means Mbytes
consumption with millions of flows. In this case, to take care of every
bytes the flow costed becomes more important.
We are planning to save the memory consumption with flow creation step
by step.
Step 1, currently, the mlx5 rte_flow is composed with the mlx5_flow
subflows. The data struct memory optimization will mainly focus on the
two structs.
1. Merge the struct members those can be as union.
2. The members in the mlx5_flow subflows which are both same in the
rte_flow will be moved to save only in rte_flow struct. It’s not
needed to save the copies of the same actions in every mlx5_flow
subflows.
3. The members in the struct use limited bits will be stripped to the
bits only they are needed.
4. The structs aligned with holes will be reconstructed.
5. Some global limited resources such as port_id actions may not be
recorded in the flow data struct to save the pointer memory and only
to released when port is closed.
Step 2, as flow creation will allocate several small memory blocks, such
as the rte_flow memory, mlx5_flow memory, actions memory, the small
memory blocks will be allocated from pools to avoid the overhead of
every rte_malloc().
Step 3, data struct which stands for several mode may split for
individual mode, such as currently the struct mlx5_flow_counter contains
the members both batch and none-batch mode. The split of the members
will save the bytes of counters in the pool with different mode.
Thanks
SuanmingMou
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-03-16 2:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-16 2:54 [dpdk-dev] [RFC] net/mlx5: memory optimization for flow Suanming Mou
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).