-
Notifications
You must be signed in to change notification settings - Fork 137
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
NF core reassignment on termination #87
Conversation
CI MessageYour results will arrive shortly |
This comment has been minimized.
This comment has been minimized.
PR review assigned to @dennisafa @rskennedy |
…core_reassignment
@onvm hello my old friend |
CI MessageYour results will arrive shortly |
CI MessageRun successful see results: Linter Passed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just some style nits
onvm/onvm_nflib/onvm_nflib.c
Outdated
@@ -585,7 +585,14 @@ onvm_nflib_handle_msg(struct onvm_nf_msg *msg, __attribute__((unused)) struct on | |||
RTE_LOG(INFO, APP, "Received scale message...\n"); | |||
onvm_nflib_scale((struct onvm_nf_scale_info *)msg->msg_data); | |||
break; | |||
case MSG_NOOP: | |||
case MSG_CHANGE_CORE: | |||
RTE_LOG(INFO, APP, "Recieved relocation message...\n"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: Received
onvm/onvm_nflib/onvm_threading.c
Outdated
onvm_threading_find_nf_to_reassign_core(uint16_t candidate_core, struct core_status *cores) { | ||
int i; | ||
int candidate_nf_id, most_used_core; | ||
int max_nfs_per_core; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe combine all these into one?
int i, candidate_nf_id, most_used_core, max_nfs_per_core;
onvm/onvm_nflib/onvm_threading.h
Outdated
int | ||
onvm_threading_find_nf_to_reassign_core(uint16_t candidate_core, struct core_status *cores); | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style nit: remove line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
Sanity checks
- Making in ONVM and examples works properly. Core is reassigned upon exiting NF as test plan described.
-
Code style
- Minor style nits
-
Code design
- Variables are understandably named, design is clean and concise. No recommended design changes.
-
Performance, assigned to @dennisafa @rskennedy
- Speed_tester runs properly at avg speed of 56m pps.
-
Documentation
- onvm_threading.h is documented properly.
onvm/onvm_mgr/onvm_nf.c
Outdated
* Output : an error code | ||
* | ||
*/ | ||
inline int |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
95: Line ends in whitespace.
onvm/onvm_mgr/onvm_nf.c
Outdated
|
||
inline int onvm_nf_relocate_nf(uint16_t dest, uint16_t new_core) { | ||
uint16_t *msg_data; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
314: Line ends in whitespace.
onvm/onvm_nflib/onvm_nflib.c
Outdated
@@ -585,7 +585,14 @@ onvm_nflib_handle_msg(struct onvm_nf_msg *msg, __attribute__((unused)) struct on | |||
RTE_LOG(INFO, APP, "Received scale message...\n"); | |||
onvm_nflib_scale((struct onvm_nf_scale_info *)msg->msg_data); | |||
break; | |||
case MSG_NOOP: | |||
case MSG_CHANGE_CORE: | |||
RTE_LOG(INFO, APP, "Received relocation message...\n"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
589: Line ends in whitespace.
onvm/onvm_nflib/onvm_nflib.c
Outdated
case MSG_NOOP: | ||
case MSG_CHANGE_CORE: | ||
RTE_LOG(INFO, APP, "Received relocation message...\n"); | ||
RTE_LOG(INFO, APP, "Moving NF to core %d\n", *(uint16_t *)msg->msg_data); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
590: Line ends in whitespace.
@dennisafa implemented requested changes, approve if everything else is good. |
@rskennedy give this a review when you can |
The more I though about this we should create a macro for it. This is optimization that might not always be wanted. |
…core_reassignment Conflicts: onvm/onvm_mgr/onvm_nf.c onvm/onvm_nflib/onvm_msg_common.h
@onvm updated. |
CI MessageYour results will arrive shortly |
CI MessageRun successful see results: Linter Passed |
@dennisafa does introducing the macro make sense? |
Yea, I'm a fan of the macros. It makes sense to be able to enable or disable them (like ONVM_NF_SHUTDOWN_CORE_REASSIGNMENT) based on what your purposes may be. Edit: I'll give it another test for sanity check |
Will update with the new config approach when shared cpu changes are merged |
…core_reassignment Conflicts: onvm/onvm_mgr/onvm_nf.c onvm/onvm_nflib/onvm_msg_common.h onvm/onvm_nflib/onvm_nflib.c onvm/onvm_nflib/onvm_threading.h
@onvm should be put in queue |
CI MessageAnother CI run in progress, adding request to the end of the list |
@onvm hopefully this doesn't run |
CI MessageDuplicate request already waiting, ignoring message |
CI MessageYour results will arrive shortly |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@onvm should be put in queue
CI Message
Run successful see results:
✔️ PR submitted to develop branch
✔️ Speed tester performance check passed
✔️ Linter passed
[Results from nimbnode30]
- Median TX pps for Speed Tester: 39265985
- Performance rating - 112.19% (compared to 35000000 average)
@onvm not sure why nfd isn't working |
CI MessageYour results will arrive shortly |
CI MessageError: ERROR: Failed to post results to GitHub |
@onvm this should be better now |
CI MessageYour results will arrive shortly |
CI MessageError: ERROR: Failed to post results to GitHub |
@onvm test |
@onvm now really test |
CI MessageYour results will arrive shortly |
CI MessageError: ERROR: Failed to fetch results from nimbnode17 |
@onvm please send 0 |
CI MessageYour results will arrive shortly |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@onvm please send 0
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 Speed Tester: 41231422
Performance rating - 103.08% (compared to 40000000 average) -
Median TX pps for Pktgen: 6420024
Performance rating - 64.20% (compared to 10000000 average) -
Time (ms) per request for mTCP and Apache Benchmark: 0.235000
Performance rating - 102.17% (compared to 0.230000 average)
…core_reassignment
@onvm |
CI MessageYour results will arrive shortly |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let us see
CI Message
Run successful see results:
✔️ PR submitted to develop branch
✔️ Pktgen performance check passed
✔️ Speed Test performance check passed
❌ PR drops mTCP performance below minimum requirement
✔️ Linter passed
[Results from nimbnode17]
-
Median TX pps for Speed Tester: 40206604
Performance rating - 100.52% (compared to 40000000 average) -
Median TX pps for Pktgen: 10184821
Performance rating - 101.85% (compared to 10000000 average) -
Time (ms) per request for mTCP and Apache Benchmark: 0.075000
Performance rating - 32.61% (compared to 0.230000 average)
I'll fix that mTCP thing (not a bug apache benchmark just went faster), I'm just trying to make sure pktgen is working |
CI MessageError: ERROR: Failed to copy ONVM files to nimbnode17 |
CI MessageError: ERROR: Script failed on nimbnode17 |
Adds functionality to onvm_mgr to reassign cores on NF shutdown.
Summary:
Reallocates a NF to another core when another NF shuts down and a better core allocation is possible.
This is a part of multiple changes regarding the autoscaling and core managing improvments for ONVM, working with @ratnadeepb on these.
Usage:
Run onvm_mgr with 2 cores for NFs, f.e:
./go.sh 0,1,2 0 0x60
Run basic monitor (or any other NF really)
./go.sh 2
Run basic monitor in shared more (or any other NF really)
./go.sh -l 0 -- -r 1 -s --
Run another basic monitor in shared more (or any other NF really)
./go.sh -l 0 -- -r 1 -s --
*Then Ctrl-C the first NF (the one not running in shared mode)
The second NF should now be reallocated to the core that the first NF was running on.
Merging notes:
TODO before merging :
Test Plan:
Figure out if this can break anything.
Review:
Review checklist:
Sanity checks, assigned to @dennisafa @rskennedy
/onvm
and/examples
directoriesCode style, assigned to @dennisafa @rskennedy
Code design, assigned to @dennisafa @rskennedy
Performance, assigned to @dennisafa @rskennedy
Documentation, assigned to @dennisafa @rskennedy