Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shared core functionality for messages #149

Merged
merged 10 commits into from
Jul 27, 2019
Merged

Conversation

dennisafa
Copy link
Member

Adds functionality to sleep when no messages are enqueued onto an nf's message ring.

Summary:

This is functionality I implemented as part of the larger mTCP project, in which an NF constantly receives lots of messages. This works exactly the same way as sleeping on an empty packet ring.

Usage:
Run the manager with shared CPU enabled.

This PR includes
Resolves issues
Breaking API changes
Internal API changes
Usability improvements
Bug fixes
New functionality X
New NF/onvm_mgr args
Changes to starting NFs
Dependency updates
Web stats updates

Merging notes:

  • Dependencies: None

TODO before merging :

  • PR is ready for review

Test Plan:

Tested by sending a large influx of messages to an NF running in shared cpu mode. Also tested with multiple NF's on the same core. Checked htop CPU usage to verify proper sleeping when no messages were being sent.

Review:

Review checklist:

  • Sanity checks, assigned to @koolzz @kevindweb

    • Run make in /onvm and /examples directories
    • Test the new functionality
  • Code style, assigned to @koolzz @kevindweb

    • Run linter
    • Check everything style related
  • Code design, assigned to @koolzz @kevindweb

    • Check for memory leaks
    • Check that code is reusable
    • Code is clean, functions are concise
    • Verify that edge cases properly handled
  • Performance, assigned to @koolzz @kevindweb

    • Run Speed Tester NF, report performance.
    • Run pktgen, report performance (not really required)
  • Documentation, assigned to @koolzz @kevindweb

    • Check if the new changes are well documented, in both code and READMEs

koolzz and others added 4 commits June 4, 2019 14:45
This PR releases OpenNetVM v19.05
This PR adds the following bug fix to the master branch:
[Bug Fix] Fix Typo in Console Stats Header (sdnfv#142)
[Bug Fix] Fix Stats Header in Release Notes (sdnfv#145)
@onvm
Copy link

onvm commented Jun 25, 2019

In response to PR creation

CI Message

Your results will arrive shortly

@onvm
Copy link

onvm commented Jun 25, 2019

In response to PR creation

CI Message

Error: ERROR: Failed to fetch results from nimbnode30

@dennisafa dennisafa changed the base branch from master to develop June 27, 2019 03:00
@dennisafa
Copy link
Member Author

@onvm try it now

@kevindweb
Copy link
Contributor

@onvm can we pass this pktgen test?

@onvm
Copy link

onvm commented Jun 28, 2019

@onvm can we pass this pktgen test?

CI Message

Your results will arrive shortly

Copy link

@onvm onvm left a comment

Choose a reason for hiding this comment

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

@onvm can we pass this pktgen test?

CI Message

Run successful see results:
✔️ PR submitted to develop branch
✔️ Pktgen performance check passed
✔️ Speed Test performance check passed
✔️ Linter passed

[Results from nimbnode17]

  • Median TX pps for Pktgen: 6361442

  • Performance rating - 106.02% (compared to 6000000 average)

  • Median TX pps for Speed Tester: 38118038

  • Performance rating - 108.91% (compared to 35000000 average)

@kevindweb
Copy link
Contributor

Yay to CI! I tested on cloudlab and got 13422053pps for pktgen. 4573120 rx/tx for 2 speed testers together. I'll test the specific message functionality later, but basic performance looks solid

Copy link
Member

@koolzz koolzz left a comment

Choose a reason for hiding this comment

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

Overall I approve, see comment for Monday discussion

onvm/onvm_nflib/onvm_nflib.c Outdated Show resolved Hide resolved
onvm/onvm_nflib/onvm_nflib.c Outdated Show resolved Hide resolved
@kevindweb
Copy link
Contributor

@onvm can we show dennis our new features?

@onvm
Copy link

onvm commented Jun 29, 2019

@onvm can we show dennis our new features?

CI Message

Your results will arrive shortly

Copy link

@onvm onvm left a comment

Choose a reason for hiding this comment

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

@onvm can we show dennis our new features?

CI Message

Run successful see results:
✔️ PR submitted to develop branch
❌ PR drops Pktgen performance below minimum requirement
✔️ Speed Test performance check passed
✔️ Linter passed

[Results from nimbnode17]

  • Median TX pps for Pktgen: 6313672

  • Performance rating - 63.14% (compared to 10000000 average)

  • Median TX pps for Speed Tester: 41629903

  • Performance rating - 111.01% (compared to 37500000 average)

@kevindweb
Copy link
Contributor

@dennisafa pktgen from CI will work if you merge develop into this branch

Copy link
Member

@koolzz koolzz left a comment

Choose a reason for hiding this comment

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

Good stuff, lets change this as we discussed in the meeting(only do the sleep check once one level up)

@koolzz
Copy link
Member

koolzz commented Jul 8, 2019

@onvm perf?

@kevindweb
Copy link
Contributor

@onvm perf

@onvm
Copy link

onvm commented Jul 8, 2019

@onvm perf

CI Message

Your results will arrive shortly

Copy link

@onvm onvm left a comment

Choose a reason for hiding this comment

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

@onvm perf

CI Message

Run successful see results:
✔️ PR submitted to develop branch
❌ PR drops Pktgen performance below minimum requirement
✔️ Speed Test performance check passed
✔️ Linter passed

[Results from nimbnode17]

  • Median TX pps for Pktgen: 0
    Performance rating - 0.00% (compared to 10000000 average)

  • Median TX pps for Speed Tester: 40242712
    Performance rating - 100.61% (compared to 40000000 average)

@kevindweb
Copy link
Contributor

@onvm i believe in you

@onvm
Copy link

onvm commented Jul 8, 2019

@onvm i believe in you

CI Message

Your results will arrive shortly

Copy link

@onvm onvm left a comment

Choose a reason for hiding this comment

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

@onvm i believe in you

CI Message

Run successful see results:
✔️ PR submitted to develop branch
❌ PR drops Pktgen performance below minimum requirement
✔️ Speed Test performance check passed
✔️ Linter passed

[Results from nimbnode17]

  • Median TX pps for Pktgen: 6445082
    Performance rating - 64.45% (compared to 10000000 average)

  • Median TX pps for Speed Tester: 40262852
    Performance rating - 100.66% (compared to 40000000 average)

@dennisafa
Copy link
Member Author

@onvm how's it goin pktgen

@onvm
Copy link

onvm commented Jul 11, 2019

@onvm how's it goin pktgen

CI Message

Your results will arrive shortly

Copy link

@onvm onvm left a comment

Choose a reason for hiding this comment

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

@onvm how's it goin pktgen

CI Message

Run successful see results:
✔️ PR submitted to develop branch
❌ PR drops Pktgen performance below minimum requirement
✔️ Speed Test performance check passed
✔️ Linter passed

[Results from nimbnode17]

  • Median TX pps for Pktgen: 0
    Performance rating - 0.00% (compared to 10000000 average)

  • Median TX pps for Speed Tester: 40340438
    Performance rating - 100.85% (compared to 40000000 average)

@kevindweb
Copy link
Contributor

@onvm if you fail I'll catch you now!

@onvm
Copy link

onvm commented Jul 13, 2019

@onvm if you fail I'll catch you now!

CI Message

Your results will arrive shortly

Copy link

@onvm onvm left a comment

Choose a reason for hiding this comment

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

@onvm if you fail I'll catch you now!

CI Message

Run successful see results:
✔️ PR submitted to develop branch
❌ PR drops Pktgen performance below minimum requirement
✔️ Speed Test performance check passed
✔️ Linter passed

[Results from nimbnode17]

  • Median TX pps for Pktgen: 6354164
    Performance rating - 63.54% (compared to 10000000 average)

  • Median TX pps for Speed Tester: 40907748
    Performance rating - 102.27% (compared to 40000000 average)

koolzz
koolzz previously approved these changes Jul 14, 2019
Copy link
Member

@koolzz koolzz left a comment

Choose a reason for hiding this comment

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

@dennisafa I approve just add a macro for msg threshold and should be good to merge

onvm/onvm_nflib/onvm_common.h Outdated Show resolved Hide resolved
koolzz
koolzz previously approved these changes Jul 20, 2019
Copy link
Member

@koolzz koolzz left a comment

Choose a reason for hiding this comment

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

Cool will merge soon, although please add a reamde note here, nf wakes up either when packets or a message arrives.

@koolzz
Copy link
Member

koolzz commented Jul 24, 2019

@dennisafa just add the https://github.com/sdnfv/openNetVM/pull/151/files changes into this pr

@koolzz koolzz mentioned this pull request Jul 24, 2019
@dennisafa
Copy link
Member Author

@dennisafa just add the https://github.com/sdnfv/openNetVM/pull/151/files changes into this pr

oops. got it.

@dennisafa dennisafa requested a review from kevindweb July 25, 2019 13:01
@onvm
Copy link

onvm commented Jul 25, 2019

Testing

CI Message

Your results will arrive shortly

@onvm
Copy link

onvm commented Jul 25, 2019

Testing

CI Message

Error: Failed to parse Speed Tester stats

@onvm
Copy link

onvm commented Jul 25, 2019

Testing

CI Message

Your results will arrive shortly

Copy link

@onvm onvm left a comment

Choose a reason for hiding this comment

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

Testing

CI Message

Run successful see results:
✔️ PR submitted to develop branch
❌ PR drops Pktgen performance below minimum requirement
✔️ Speed Test performance check passed
✔️ MTCP performance check passed
✔️ Linter passed

[Results from nimbnode17]

  • Median TX pps for Pktgen: 6408064
    Performance rating - 64.08% (compared to 10000000 average)

  • Median TX pps for Speed Tester: 40242298
    Performance rating - 100.61% (compared to 40000000 average)

  • Median TX pps for mtcp: 0.236000

  • Performance rating - 102.61% (compared to 0.230000 average)

Copy link
Contributor

@kevindweb kevindweb left a comment

Choose a reason for hiding this comment

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

Let's goooooooo! First successful mTCP CI run. I also have been testing on cloudlab, when I merged develop, and disabled flow table I got 14746136pps Pktgen, and 12895796pps with ft macro enabled, which is normal. Created a 4 speed tester chain with performance of ~17664647 pps tx on all 4, and got almost 52mil pps just running one speed_tester. Also, not a change request, just a question, was there a performance benefit to moving this code out of onvm_nflib_dequeue_packets, or did it just make more logical sense? I ask this because there doesn't seem to be a whole lot changed, except for the condition definition.

@dennisafa
Copy link
Member Author

dennisafa commented Jul 26, 2019 via email

Copy link
Member

@koolzz koolzz left a comment

Choose a reason for hiding this comment

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

Noice

@koolzz koolzz merged commit 60293fa into sdnfv:develop Jul 27, 2019
@dennisafa dennisafa deleted the shared_core_msg branch July 28, 2019 19:13
@koolzz koolzz added this to the ONVM v19.07 milestone Jul 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants