Project

General

Profile

Task #1729

Add byte counters to FaceCounters

Added by John DeHart about 5 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Faces
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
1.00 h

Description

Add byte count fields to nfd::FaceCounters structure.

Byte count field reflect number of bytes received or sent on link layer.
Those counters include link layer headers imposed by NFD (NDNLP or LocalControlHeader), but exclude headers of underlying protocol (Ethernet or TCP or UDP).
Each counter is 64-bit, and can wrap around after overflowing.


Related issues

Blocked by ndn-cxx - Task #1765: Extend FaceStatus abstraction to include aggregate byte countClosed

Blocks NFD - Task #1766: Link layer byte count in UnixStreamFace, TcpFace, UdpFace, MulticastUdpFaceClosed

Blocks NFD - Task #1767: Expose link layer byte counts in FaceStatus blockClosed

Blocks NFD - Task #1781: Link layer byte count in WebSocketFaceClosed

Blocks NFD - Task #1780: Link layer byte count in EthernetFaceClosed

Blocks NFD - Feature #3177: LpFace countersClosed

History

#1 Updated by Junxiao Shi about 5 years ago

  • Category set to Faces
  • Start date deleted (07/02/2014)

Accurate byte count for Interest and Data separately is hard to obtain.
Recall that packets transmitted over the network socket can contain link layer header, such as NDNLP-TLV or LocalControlHeader.
Byte count for link layer header is available at link later only, but link layer may not distinguish between Interest and Data - a network layer concept.

Obtaining network layer byte count is easier, but it's less useful for network operation purposes.
For example, NDNLP-TLV delivers a packet to network layer only if all fragments are received.
If a fragment is lost, other fragments are discarded, and they won't be included in network layer byte count.

#2 Updated by Alex Afanasyev about 5 years ago

The objective here is not to get absolutely accurate information about transmitted packets through socket (this can be taken from the interface stats), but rather byte count for Interest/Data that were transferred through Faces. This is almost the same as packet count that we have now, just expressed in number of bytes, rather than packets.

#3 Updated by Junxiao Shi about 5 years ago

I think, for network operation purpose, it's more useful to have a byte count at link layer, without distinguishing between Interest and Data.

#4 Updated by Junxiao Shi about 5 years ago

20140704 conference call decides more clarification is needed.

@John DeHart, please clarity which one is desired:

  • link layer byte count without distinguishing between Interest and Data
  • network layer byte count
    Limitation: with NDNLP-TLV, if a fragment is lost, other fragments are dropped and not counted in, but they still consumed network bandwidth
  • link layer byte count, counting Interest and Data separately
    There is implementation difficulty for this one.

#5 Updated by John DeHart about 5 years ago

Long term it might be nice to have link layer byte counts for interest and data separately.

For the short term link layer byte count without distinguishing between Interest
and Data would be fine. And it is quite possible that this would be enough for
the long term.

#6 Updated by Alex Afanasyev about 5 years ago

  • Blocks Task #1765: Extend FaceStatus abstraction to include aggregate byte count added

#7 Updated by Alex Afanasyev about 5 years ago

  • Related to Task #1766: Link layer byte count in UnixStreamFace, TcpFace, UdpFace, MulticastUdpFace added

#8 Updated by Junxiao Shi about 5 years ago

  • Blocks deleted (Task #1765: Extend FaceStatus abstraction to include aggregate byte count)

#9 Updated by Junxiao Shi about 5 years ago

  • Blocked by Task #1765: Extend FaceStatus abstraction to include aggregate byte count added

#10 Updated by Junxiao Shi about 5 years ago

  • Related to deleted (Task #1766: Link layer byte count in UnixStreamFace, TcpFace, UdpFace, MulticastUdpFace)

#11 Updated by Junxiao Shi about 5 years ago

  • Blocks Task #1766: Link layer byte count in UnixStreamFace, TcpFace, UdpFace, MulticastUdpFace added

#12 Updated by Junxiao Shi about 5 years ago

  • Blocks Task #1767: Expose link layer byte counts in FaceStatus block added

#13 Updated by Junxiao Shi about 5 years ago

  • Subject changed from Add Byte counts to FaceStatus to Add byte counts to FaceStatus
  • Description updated (diff)
  • Status changed from New to In Progress
  • Assignee set to Junxiao Shi
  • Target version set to v0.3
  • Estimated time set to 1.00 h

#14 Updated by Junxiao Shi about 5 years ago

  • % Done changed from 0 to 50

http://gerrit.named-data.net/1037 adds NInBytes and NOutBytes to FaceCounters class, and reorganizes counters into NetworkLayerCounters and LinkLayerCounters base classes so that link layer counters won't appear in ForwarderCounters.

The next commit of this Task would make the new counter values appear in FaceStatus data structure.
That commit is blocked by #1765.

#15 Updated by Junxiao Shi about 5 years ago

  • Subject changed from Add byte counts to FaceStatus to Add byte counters to FaceCounters
  • Status changed from In Progress to Code review
  • % Done changed from 50 to 100

Bumping "% Done" because making byte counters appear in FaceStatus block should belong to Task #1767.

#16 Updated by Davide Pesavento about 5 years ago

What's the rationale for calling these counters "link layer"? And why do you include NDNLP headers but not Ethernet or TCP?

#17 Updated by Junxiao Shi about 5 years ago

NDN-TLV is at network layer.

NDNLP is a link protocol for NDN, according to its technical report.
The layer for link protocol is called "link layer".

Ethernet or TCP is at a layer lower than NDNLP.
Their overheads are out of scope of this Task.

#18 Updated by Junxiao Shi about 5 years ago

  • Status changed from Code review to Closed

#19 Updated by Junxiao Shi about 5 years ago

  • Blocks Task #1781: Link layer byte count in WebSocketFace added

#20 Updated by Junxiao Shi about 5 years ago

  • Blocks Task #1780: Link layer byte count in EthernetFace added

#21 Updated by Junxiao Shi almost 4 years ago

For the short term link layer byte count without distinguishing between Interest
and Data would be fine. And it is quite possible that this would be enough for
the long term.

On 20151019, John DeHart confirms:

Yes, I think it will be fine to continue for the long term with a combined byte counter.

#22 Updated by Junxiao Shi almost 4 years ago

Also available in: Atom PDF