Skip to content

[watremark] Add watermark HLD#245

Merged
andriymoroz-mlnx merged 2 commits intosonic-net:gh-pagesfrom
mykolaf:w
Nov 23, 2018
Merged

[watremark] Add watermark HLD#245
andriymoroz-mlnx merged 2 commits intosonic-net:gh-pagesfrom
mykolaf:w

Conversation

@mykolaf
Copy link
Copy Markdown
Collaborator

@mykolaf mykolaf commented Sep 7, 2018

Watermark High Level Design Document for SONiC

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the regular user should also be able to reset the watermark.

Copy link
Copy Markdown
Contributor

@wendani wendani Sep 10, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the use case for resetting the watermark?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clear the watermark, for example, if user wants to know how buffer is utilized under current traffic, he will want to clear the existing watermark and check the new one.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clear the watermark, for example, if user wants to know how buffer is utilized under current traffic, he will want to clear the existing watermark and check the new one.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we have clear the watermark, to be able to check the new one, we should also have a get watermark?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

User will have CLI to show current watermark, f.e. "show queue watermark unicast" for current watermark, and "show queue persistent-watermark unicast" for persistent one.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

streaming telemetry is periodically resetting the watermark.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. This sentence is copy-pasted from requirements :)

@lguohan
Copy link
Copy Markdown
Contributor

lguohan commented Sep 10, 2018

I cannot see those figures, have you uploaded them?

Copy link
Copy Markdown
Contributor

@lguohan lguohan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add more command line

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we have the total pool watermark here? I think we need that as well.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pool watermark was not in the requirements. Also as far as I know pool objects are not created in SONiC, so more complexity.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

show priority-group watermark headroom

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

show priority-group watermark shared

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

show queue watermark unicast

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

show queue watermark multicast

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clear priority-group watermark headroom
clear priority-group watermark shared
clear queue watermark unicast
clear qeueu watermark mutlicast

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

show priority-group persistent-watermark headroom
show priority-group persistent-watermark shared
show queue persistent-watermark unicast
show queue persistent-watermark multicast

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also add following

show pool watermark ingress
show pool watermark egress
show pool watermark headroom

@lguohan
Copy link
Copy Markdown
Contributor

lguohan commented Sep 11, 2018

I can see the figure now, but the there is no marker on the figure and there is no explanation on the figure. couldn't understand, can you explain the figure that has the timeline and events.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not use flex counter to do the query? It is better to consolidate all counter query into one place. We already have a flex counter thread to do the query, in my opinion, all counter query should be there.

Copy link
Copy Markdown
Contributor

@lguohan lguohan Sep 15, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename to WATERMARKS - containing periodically cleared watermarks.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add CACHED_WATERMARK to temporarily store the water mark before last user clear.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need HIGHEST_WATERMARK table to store last highest watermark, this is not persistent watermark table. when user clear the water mark, it needs also clear the highest_watermark.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Periocially, the flex counter put the current watermark into WATERMARK table, and then clear it on hardware.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the watermarks need to be integrated in telemetry virtual path, but this can be phase II.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there should be a CACHED_WATERMARK table that is used to save the watermark before user clear. whenever user clears the watermark, it needs to put the last read watermark into the CACHED_WATERMARK. telemetry should read the CACHED_WATERMARK and WATERMARK and return the maximum value if there is CACHED_WATERMARK. After that, CAHCED_WATERMARK should be deleted.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btw, I would suggest to use the lua plugin to the comparision and merge.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

at point 2, the CACHED_WATERMARK is generated, in next periodically clear point, the CACHED_WATERMARK is compared with WATERMARK and send to telemetry. after that, the CACHED_WATERMARK is deleted.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to walk through the timeline and connect these events to the detail design to see how everything works. currently, the description of events is not associated with your design.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to have --period in the cli.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no --period, issue query immediately

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add the schema you want to introduce for read-on-clear for a group of counters?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename -> USER_WATERMARKS

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove the --period

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sonic-clear priority-group [watermark|persistent-watermark] headroom

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

depending the performance, we may need to increase the polling interval for the watermark and introduce on-demand asic counter clear on the watermarks.

@Chornei
Copy link
Copy Markdown

Chornei commented Sep 19, 2018 via email

Signed-off-by: Mykola Faryma <mykolaf@mellanox.com>
Signed-off-by: Mykola Faryma <mykolaf@mellanox.com>
@andriymoroz-mlnx andriymoroz-mlnx merged commit 90ff8a9 into sonic-net:gh-pages Nov 23, 2018
lguohan pushed a commit that referenced this pull request Nov 28, 2018
* [watremark] Add watermark HLD

Signed-off-by: Mykola Faryma <mykolaf@mellanox.com>
@mykolaf mykolaf deleted the w branch March 6, 2019 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants