I have just started to read up on VPP/FD.io, and I have a question about
graph optimization and was wondering if (as I suspect) this has already
been thought about and either planned or decided against.


The documentation I found on VPP essentially says that VPP uses batch
processing and processes all packets in a vector on one step before
proceeding to the next step. The claim is this provides overall better
throughput because of instruction caching.


I was wondering if optimization of the graph to understand where
concurrency can be leveraged has been considered, as well as where you
could process the vector by two steps with an offset. If this is possible,
then steps could be pinned to cores and perhaps both concurrency and
instruction caching could be leveraged.


For example assume the following graph:


[image: image.png]


In this graph, steps B,C can be done concurrently as they don't "modify"
the vector. Steps D, E can't be done concurrently, but as they don't
require look back/forward they can be done in offset.


What I am suggesting is, if there are enough cores, then steps could be
pinned to cores to achieve the benefits of instruction caching, and after
step A is complete, steps B,C could be done concurrently. After B,C are
complete then D can be started and as D completes processing on a packet if
can then be processed by E (i.e., the entire vector does not need to be
processed by D before processing by E is started).


I make no argument that this doesn't increase complexity and also
introduces coordination costs that don't exists today. To be fair, offset
processing could be viewed as splitting the original large vector into
smaller vectors and processing the smaller vectors from start to finish
(almost dynamic optimization based on dynamic vector resizing).

Just curious to hear others thoughts and if some of this has been thought
through or experimented with. As I said, just thinking off the cuff and
wondering; not fully thought through.


avèk respè,

/david
_______________________________________________
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Reply via email to