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

Add an option to avoid OutOfDirectMemoryError for AlluxioFuse #16096

Closed

Conversation

secfree
Copy link
Contributor

@secfree secfree commented Aug 25, 2022

What changes are proposed in this pull request?

Add an option to avoid OutOfDirectMemoryError for AlluxioFuse.

Why are the changes needed?

Fix #16094

Does this PR introduce any user facing changes?

No

@alluxio-bot
Copy link
Contributor

Automated checks report:

  • Commits associated with Github account: PASS
  • PR title follows the conventions: FAIL
    • The title of the PR does not pass all the checks. Please fix the following issues:
      • First word of title ("Doc") is not an imperative verb. Please use one of the valid words

Some checks failed. Please fix the reported issues and reply 'alluxio-bot, check this please' to re-run checks.

@secfree secfree changed the title Doc netty noPreferDirect for OutOfDirectMemoryError Add an option to avoid OutOfDirectMemoryError for AlluxioFuse Aug 25, 2022
@alluxio-bot
Copy link
Contributor

Automated checks report:

  • Commits associated with Github account: PASS
  • PR title follows the conventions: PASS

All checks passed!

@yyongycy
Copy link
Contributor

Do you have any hard evidence this option fixes the issue? How did you tested/verified that?

@secfree
Copy link
Contributor Author

secfree commented Aug 25, 2022

Do you have any hard evidence this option fixes the issue? How did you tested/verified that?

I did the test the following way

  1. alluxio-fuse mount with/without the property -Dio.netty.noPreferDirect=true, keep all other parameters consistent
  2. Use the same number of processes to read an alluxio-fuse mount path

The result is

  • There are a lot of OutOfDirectMemoryError without -Dio.netty.noPreferDirect=true
  • There is no OutOfDirectMemoryError with -Dio.netty.noPreferDirect=true

I was able to reproduce it repeatedly.

As alluxio-fuse is using netty, and netty manages the direct memory pool by itself. With -Dio.netty.noPreferDirect=true, it does not use direct memory and uses heap memory, which is managed by GC, and GC releases memory faster.

@yyongycy
Copy link
Contributor

Do you have any hard evidence this option fixes the issue? How did you tested/verified that?

I did the test the following way

  1. alluxio-fuse mount with/without the property -Dio.netty.noPreferDirect=true, keep all other parameters consistent
  2. Use the same number of processes to read an alluxio-fuse mount path

The result is

  • There are a lot of OutOfDirectMemoryError without -Dio.netty.noPreferDirect=true
  • There is no OutOfDirectMemoryError with -Dio.netty.noPreferDirect=true

I was able to reproduce it repeatedly.

As alluxio-fuse is using netty, and netty manages the direct memory pool by itself. With -Dio.netty.noPreferDirect=true, it does not use direct memory and uses heap memory, which is managed by GC, and GC releases memory faster.

Any side effect? and other options? Wondering in what situation it is triggered?

@secfree
Copy link
Contributor Author

secfree commented Aug 25, 2022

Any side effect? and other options?

The side effect is, without using direct memory, Zero Copy is disabled. The data needs to be copied once more between user space and kernel space.

Wondering in what situation it is triggered?

Background of my base: the platform needs to do alluxio-fuse mount for each user's job in its pod, as different jobs have different parallel, so it is difficult to set a fixed proper value for MaxDirectMemorySize.

@github-actions
Copy link

github-actions bot commented Feb 2, 2023

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in two weeks if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale The PR/Issue does not have recent activities and will be closed automatically label Feb 2, 2023
@github-actions github-actions bot removed the stale The PR/Issue does not have recent activities and will be closed automatically label May 17, 2023
@github-actions
Copy link

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in two weeks if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale The PR/Issue does not have recent activities and will be closed automatically label Jun 16, 2023
@secfree secfree closed this Jun 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Doc Fix stale The PR/Issue does not have recent activities and will be closed automatically
Projects
None yet
4 participants