[OPNFLWPLUG-174] Implement ingress back pressure based on netty channel-autoread Created: 26/May/14  Updated: 27/Sep/21  Resolved: 20/Jun/14

Status: Resolved
Project: OpenFlowPlugin
Component/s: General
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Michal Rehak Assignee: Michal Rehak
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Linux
Platform: PC


Issue Links:
Blocks
blocks OPNFLWPLUG-115 Milestone: Implement proper runtime b... Resolved
blocks OPNFLWPLUG-119 cbench in throughput mode causes the ... Resolved
External issue ID: 1075

 Description   

Strategy proposal:

  • netty delivers message to connectionConductor (e.g.: onPacketInMessage())
  • put message into per-connection-queue (Queue.offer())
  • if queue is full then
  • store the message into local slot
  • invoke stopReading() on corresponding channel (still in netty thread)
  • and return Future<Void> with having value set only after 50% of queue is free
  • hook up a listener on this future which once the future value is set:
  • turns on channel reading
  • and enqueues the message in local slot into queue
  • return thread to OFJava/Netty (expect no more messages will arrive)
  • else return thread in order to deliver next message

QueueKeeper's push method wont be accessed by Netty's thread in ConnectionConductor.on* methods but queueKeeper will sequentially poll each per-connection-queue taking one item per turn using it's own thread. This way flooding by one device or connection is suppressed and all messages are enqueued fair.



 Comments   
Comment by Michal Rehak [ 20/Jun/14 ]

https://git.opendaylight.org/gerrit/#/c/7458/

merged

(in the end backpressure is not based on turning off autoread but on dropping messages)

Generated at Wed Feb 07 20:31:45 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.