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

[#859][Improvement] Set MALLOC_ARENA_MAX in start-shuffle-server.sh #860

Merged
merged 2 commits into from
May 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions bin/rss-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ XMX_SIZE="80g" # Shuffle Server JVM XMX size
# RSS_LOG_DIR, Where log files are stored (Default: ${RSS_HOME}/logs)
# RSS_IP, IP address Shuffle Server binds to on this node (Default: first non-loopback ipv4)
# MAX_DIRECT_MEMORY_SIZE Shuffle Server JVM off heap memory size (Default: not set)
# MALLOC_ARENA_MAX, Set the number of memory arenas for Shuffle Server (Default: 4)
8 changes: 8 additions & 0 deletions bin/start-shuffle-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ if [ -n "${RSS_IP:-}" ]; then
echo "Shuffle Server RSS_IP: ${RSS_IP}"
fi

# glibc use an arena memory allocator that causes virtual
# memory usage to explode. This interacts badly
# with the many threads that we use in rss. Tune the variable
# down to prevent vmem explosion.
# glibc's default value of MALLOC_ARENA_MAX is 8 * CORES.
# After referring to hadoop/presto, the default MALLOC_ARENA_MAX of shuffle server is set to 4.
export MALLOC_ARENA_MAX=${MALLOC_ARENA_MAX:-4}
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we choose 4 as our default value?
The comment is a little misunderstanding.

Default value is 8 * CORES

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Why do we choose 4 as our default value? The comment is a little misunderstanding.

Default value is 8 * CORES

Comments may be confusing. Default value is 8 * CORES. Is the default value for glibc. ShuffleServer set to 4 by default is a reference to hadoop/presto configuration.

Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we choose 4 as our default value? The comment is a little misunderstanding.

Default value is 8 * CORES

Comments may be confusing. Default value is 8 * CORES. Is the default value for glibc. ShuffleServer set to 4 by default is a reference to hadoop/presto configuration.

Could you modify the misunderstanding comment?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Why do we choose 4 as our default value? The comment is a little misunderstanding.

Default value is 8 * CORES

Comments may be confusing. Default value is 8 * CORES. Is the default value for glibc. ShuffleServer set to 4 by default is a reference to hadoop/presto configuration.

Could you modify the misunderstanding comment?

yes


MAIN_CLASS="org.apache.uniffle.server.ShuffleServer"

HADOOP_DEPENDENCY="$("$HADOOP_HOME/bin/hadoop" classpath --glob)"
Expand Down