Skip to content

Document dpdk tool for cleaning up huge pages#65

Merged
koolzz merged 4 commits intosdnfv:developfrom
rskennedy:patch-1
Apr 3, 2019
Merged

Document dpdk tool for cleaning up huge pages#65
koolzz merged 4 commits intosdnfv:developfrom
rskennedy:patch-1

Conversation

@rskennedy
Copy link
Copy Markdown
Contributor

Sometimes using sudo rm -rf /mnt/huge/* doesn't work while the dpdk setup script can fix the problem. This was posted in the slack but it would be good to have documented.

Style nits welcome!

Reviewers: @twood02 @dreidenbaugh

Sometimes using `sudo rm -rf /mnt/huge/*` doesn't work while the dpdk setup script can fix the problem. This was posted in the slack but it would be good to have documented.
Comment thread docs/Install.md Outdated
Comment thread docs/Install.md Outdated
- In this case, either kill them manually by hitting Ctrl+C or run `sudo pkill NF_NAME` for every NF that you have ran.
- The manager and NFs are not running, but something crashed without freeing hugepages.
- To fix this, please run `sudo rm -rf /mnt/huge/*` to remove all files that contain hugepage data.
- An alternative method is to use the dpdk provided tools (the following may have changed since DPDK v18.11): Run `cd dpdk/usertools; sudo ./dpdk-setup.sh` then select "remove hugepage mappings" from the list of options. Then run `$ONVM_HOME/scripts/setup_environment.sh` to remount hugepages.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There is no need to run the dpdk script with sudo

Copy link
Copy Markdown
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.

I've had a lot of success with the dpdk/usertools/dpdk-setup.sh script, when no hugepages are found I just use the Setup hugepage mappings for NUMA systems option and it almost always fixes the hugepages. On quick investigation our setup_environment.sh script isn't doing the same steps that the dpdk script does for allocating huge pages, maybe its just outdated?.

I think this pr should just fix our scripts instead of saying to run the dpdk script, or alternatively we could just use the dpdk script and instruct people to install dpdk step by step(not so nice as it requires more effort when installing)

@twood02
Copy link
Copy Markdown
Member

twood02 commented Feb 5, 2019

should our setup script be directly calling the dpdk version instead of trying to reimplement? Is it possible to call that script in a programmatic way, or does it expect user input?

@koolzz
Copy link
Copy Markdown
Member

koolzz commented Feb 6, 2019

@twood02 Some of it relies on user input so I'm not sure how things like adding huge pages would behave if we want to do it programmatically.

@koolzz
Copy link
Copy Markdown
Member

koolzz commented Mar 16, 2019

I suggest we add a few lines on how dpdk installation works (as a workaround when using the onvm install script that doesn't work). mTCP does this in a nice way https://github.com/mtcp-stack/mtcp#dpdk-version

@kevindweb
Copy link
Copy Markdown
Contributor

@onvm let's see if you work here!

@onvm
Copy link
Copy Markdown

onvm commented Mar 21, 2019

@onvm let's see if you work here!

CI Message

Your results will arrive shortly

@onvm
Copy link
Copy Markdown

onvm commented Mar 21, 2019

@onvm let's see if you work here!

CI Message

Error: ERROR: Failed to analyze results from nimbnode30

Linter Failed

examples/aes_decrypt/aes.c:523: If an else has a brace on one side, it should have it on both [readability/braces] [5]
examples/aes_decrypt/aes.c:1024: If an else has a brace on one side, it should have it on both [readability/braces] [5]
examples/aes_decrypt/aes.c:1028: If an else has a brace on one side, it should have it on both [readability/braces] [5]
examples/aes_decrypt/aes.c:1081: If an else has a brace on one side, it should have it on both [readability/braces] [5]
examples/aes_decrypt/aes.c:1087: If an else has a brace on one side, it should have it on both [readability/braces] [5]
Total errors found: 5
examples/aes_encrypt/aes.c:523: If an else has a brace on one side, it should have it on both [readability/braces] [5]
examples/aes_encrypt/aes.c:1024: If an else has a brace on one side, it should have it on both [readability/braces] [5]
examples/aes_encrypt/aes.c:1028: If an else has a brace on one side, it should have it on both [readability/braces] [5]
examples/aes_encrypt/aes.c:1081: If an else has a brace on one side, it should have it on both [readability/braces] [5]
examples/aes_encrypt/aes.c:1087: If an else has a brace on one side, it should have it on both [readability/braces] [5]
Total errors found: 5
examples/arp_response/arp_response.c:138: Missing space before ( in switch( [whitespace/parens] [5]
Total errors found: 1
examples/bridge/bridge.c:131: Missing space before ( in if( [whitespace/parens] [5]
examples/bridge/bridge.c:134: If an else has a brace on one side, it should have it on both [readability/braces] [5]
examples/bridge/bridge.c:152: If an else has a brace on one side, it should have it on both [readability/braces] [5]
Total errors found: 3
examples/flow_table/flow_table.c:103: Missing space before ( in if( [whitespace/parens] [5]
examples/flow_table/flow_table.c:198: Missing space before ( in if( [whitespace/parens] [5]
examples/flow_table/flow_table.c:216: Missing space before ( in if( [whitespace/parens] [5]
examples/flow_table/flow_table.c:224: Missing space before ( in if( [whitespace/parens] [5]
examples/flow_table/flow_table.c:231: If an else has a brace on one side, it should have it on both [readability/braces] [5]
examples/flow_table/flow_table.c:238: If an else has a brace on one side, it should have it on both [readability/braces] [5]
Total errors found: 6
examples/flow_table/msgbuf.c:71: Missing space before ( in if( [whitespace/parens] [5]
examples/flow_table/msgbuf.c:73: Missing space before ( in if( [whitespace/parens] [5]
examples/flow_table/msgbuf.c:83: Missing space before ( in while( [whitespace/parens] [5]
examples/flow_table/msgbuf.c:86: Missing space before ( in if( [whitespace/parens] [5]
examples/flow_table/msgbuf.c:89: Missing space before ( in if( [whitespace/parens] [5]
examples/flow_table/msgbuf.c:106: Missing space before ( in if( [whitespace/parens] [5]
examples/flow_table/msgbuf.c:108: Missing space before ( in if( [whitespace/parens] [5]
examples/flow_table/msgbuf.c:116: Missing space before ( in while( [whitespace/parens] [5]
examples/flow_table/msgbuf.c:119: Missing space before ( in if( [whitespace/parens] [5]
examples/flow_table/msgbuf.c:125: Missing space before ( in if( [whitespace/parens] [5]
examples/flow_table/msgbuf.c:138: Extra space before last semicolon. If this should be an empty statement, use {} instead. [whitespace/semicolon] [5]
examples/flow_table/msgbuf.c:140: Missing space before ( in if( [whitespace/parens] [5]
examples/flow_table/msgbuf.c:149: Missing space before ( in if( [whitespace/parens] [5]
examples/flow_table/msgbuf.c:157: Missing space before ( in if( [whitespace/parens] [5]
examples/flow_table/msgbuf.c:159: Missing space before ( in if( [whitespace/parens] [5]
examples/flow_table/msgbuf.c:162: Missing space before ( in if( [whitespace/parens] [5]
examples/flow_table/msgbuf.c:169: Missing space before ( in while( [whitespace/parens] [5]
Total errors found: 17
examples/flow_table/sdn.c:99: Extra space before last semicolon. If this should be an empty statement, use {} instead. [whitespace/semicolon] [5]
examples/flow_table/sdn.c:125: Missing space before ( in if( [whitespace/parens] [5]
examples/flow_table/sdn.c:127: Missing space before ( in if( [whitespace/parens] [5]
examples/flow_table/sdn.c:147: If an else has a brace on one side, it should have it on both [readability/braces] [5]
examples/flow_table/sdn.c:147: Missing space before { [whitespace/braces] [5]
examples/flow_table/sdn.c:153: Missing space before ( in while( [whitespace/parens] [5]
examples/flow_table/sdn.c:160: Missing space before { [whitespace/braces] [5]
examples/flow_table/sdn.c:235: If an else has a brace on one side, it should have it on both [readability/braces] [5]
examples/flow_table/sdn.c:239: If an else has a brace on one side, it should have it on both [readability/braces] [5]
examples/flow_table/sdn.c:279: Missing space before ( in if( [whitespace/parens] [5]
examples/flow_table/sdn.c:418: Missing space before ( in if( [whitespace/parens] [5]
examples/flow_table/sdn.c:423: Missing space before ( in if( [whitespace/parens] [5]
examples/flow_table/sdn.c:493: If an else has a brace on one side, it should have it on both [readability/braces] [5]
examples/flow_table/sdn.c:501: If an else has a brace on one side, it should have it on both [readability/braces] [5]
examples/flow_table/sdn.c:538: Missing space before ( in if( [whitespace/parens] [5]
examples/flow_table/sdn.c:542: Missing space before ( in if( [whitespace/parens] [5]
examples/flow_table/sdn.c:545: Missing space before ( in if( [whitespace/parens] [5]
examples/flow_table/sdn.c:547: Missing space before ( in if( [whitespace/parens] [5]
examples/flow_table/sdn.c:555: Missing space before ( in if( [whitespace/parens] [5]
examples/flow_table/sdn.c:569: Missing space before ( in while( [whitespace/parens] [5]
Total errors found: 20
examples/flow_table/setupconn.c:82: Missing space before ( in if( [whitespace/parens] [5]
examples/flow_table/setupconn.c:89: Missing space before ( in if( [whitespace/parens] [5]
examples/flow_table/setupconn.c:94: Missing space before ( in if( [whitespace/parens] [5]
examples/flow_table/setupconn.c:102: Missing space before ( in if( [whitespace/parens] [5]
examples/flow_table/setupconn.c:110: Missing space before { [whitespace/braces] [5]
examples/flow_table/setupconn.c:112: Missing space before { [whitespace/braces] [5]
examples/flow_table/setupconn.c:122: Missing space before ( in if( [whitespace/parens] [5]
examples/flow_table/setupconn.c:140: Missing space before ( in if( [whitespace/parens] [5]
examples/flow_table/setupconn.c:149: Missing space before ( in if( [whitespace/parens] [5]
examples/flow_table/setupconn.c:156: Missing space before ( in if( [whitespace/parens] [5]
Total errors found: 10
examples/flow_tracker/flow_tracker.c:103: Missing space before ( in switch( [whitespace/parens] [5]
examples/flow_tracker/flow_tracker.c:205: If an else has a brace on one side, it should have it on both [readability/braces] [5]
Total errors found: 2
examples/scaling_example/scaling.c:153: Mismatching spaces inside () in while [whitespace/parens] [5]
examples/scaling_example/scaling.c:258: Missing space before ( in while( [whitespace/parens] [5]
examples/scaling_example/scaling.c:289: Missing space before ( in while( [whitespace/parens] [5]
Total errors found: 3
onvm/onvm_mgr/main.c:99: Mismatching spaces inside () in while [whitespace/parens] [5]
Total errors found: 1
onvm/onvm_mgr/onvm_args.c:156: Missing space before ( in if( [whitespace/parens] [5]
onvm/onvm_mgr/onvm_args.c:156: Missing space before { [whitespace/braces] [5]
onvm/onvm_mgr/onvm_args.c:162: Missing space before ( in if( [whitespace/parens] [5]
onvm/onvm_mgr/onvm_args.c:162: Missing space before { [whitespace/braces] [5]
onvm/onvm_mgr/onvm_args.c:258: Missing space before { [whitespace/braces] [5]
onvm/onvm_mgr/onvm_args.c:263: Missing space before ( in if( [whitespace/parens] [5]
onvm/onvm_mgr/onvm_args.c:287: Missing space before { [whitespace/braces] [5]
onvm/onvm_mgr/onvm_args.c:292: Missing space before ( in if( [whitespace/parens] [5]
Total errors found: 8
onvm/onvm_mgr/onvm_nf.c:176: Missing space before ( in if( [whitespace/parens] [5]
onvm/onvm_mgr/onvm_nf.c:229: Missing space before ( in if( [whitespace/parens] [5]
Total errors found: 2
onvm/onvm_mgr/onvm_stats.c:179: Missing space before ( in if( [whitespace/parens] [5]
onvm/onvm_mgr/onvm_stats.c:179: Missing space before { [whitespace/braces] [5]
Total errors found: 2
onvm/onvm_nflib/onvm_config_common.c:52: Missing space before { [whitespace/braces] [5]
onvm/onvm_nflib/onvm_config_common.c:112: Missing space before ( in for( [whitespace/parens] [5]
onvm/onvm_nflib/onvm_config_common.c:112: Missing space before { [whitespace/braces] [5]
onvm/onvm_nflib/onvm_config_common.c:417: Never use sprintf. Use snprintf instead. [runtime/printf] [5]
onvm/onvm_nflib/onvm_config_common.c:433: Never use sprintf. Use snprintf instead. [runtime/printf] [5]
onvm/onvm_nflib/onvm_config_common.c:487: Never use sprintf. Use snprintf instead. [runtime/printf] [5]
Total errors found: 6
onvm/onvm_nflib/onvm_flow_dir.c:64: Missing space before ( in if( [whitespace/parens] [5]
onvm/onvm_nflib/onvm_flow_dir.c:95: Missing space before { [whitespace/braces] [5]
onvm/onvm_nflib/onvm_flow_dir.c:103: Missing space before { [whitespace/braces] [5]
onvm/onvm_nflib/onvm_flow_dir.c:111: Missing space before { [whitespace/braces] [5]
onvm/onvm_nflib/onvm_flow_dir.c:128: Missing space before { [whitespace/braces] [5]
onvm/onvm_nflib/onvm_flow_dir.c:143: Missing space before { [whitespace/braces] [5]
onvm/onvm_nflib/onvm_flow_dir.c:151: Missing space before { [whitespace/braces] [5]
onvm/onvm_nflib/onvm_flow_dir.c:159: Missing space before { [whitespace/braces] [5]
onvm/onvm_nflib/onvm_flow_dir.c:176: Missing space before { [whitespace/braces] [5]
Total errors found: 9
onvm/onvm_nflib/onvm_nflib.c:318: Missing space before ( in if( [whitespace/parens] [5]
onvm/onvm_nflib/onvm_nflib.c:321: Missing space before ( in if( [whitespace/parens] [5]
onvm/onvm_nflib/onvm_nflib.c:470: Missing space before ( in while( [whitespace/parens] [5]
onvm/onvm_nflib/onvm_nflib.c:525: Missing space before ( in switch( [whitespace/parens] [5]
onvm/onvm_nflib/onvm_nflib.c:689: Missing space before ( in if( [whitespace/parens] [5]
onvm/onvm_nflib/onvm_nflib.c:700: Missing space before ( in if( [whitespace/parens] [5]
onvm/onvm_nflib/onvm_nflib.c:761: Missing space before { [whitespace/braces] [5]
Total errors found: 7
onvm/onvm_nflib/onvm_pkt_helper.c:313: Missing space before ( in switch( [whitespace/parens] [5]
onvm/onvm_nflib/onvm_pkt_helper.c:376: Missing space before { [whitespace/braces] [5]
Total errors found: 2

@rskennedy
Copy link
Copy Markdown
Contributor Author

Tested setting up fresh install using the dpdk-setup.sh script and it works. Documentation now suggests using DPDK setup script to troubleshoot.

Copy link
Copy Markdown
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.

Nice, I changed step 22 to 1024 hugepages, will merge soon.

@koolzz koolzz dismissed twood02’s stale review April 3, 2019 00:21

Resolved in the install script update PR

@koolzz koolzz merged commit a7d546b into sdnfv:develop Apr 3, 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.

5 participants