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

Fix: log jemalloc presence at startup, not at shutdown #4738

Merged
merged 5 commits into from
Apr 11, 2023

Conversation

fab-10
Copy link
Contributor

@fab-10 fab-10 commented Nov 25, 2022

Signed-off-by: Fabio Di Fabio fabio.difabio@consensys.net

PR description

Fixed Issue(s)

Documentation

  • I thought about documentation and added the doc-change-required label to this PR if
    updates are required.

Changelog

@fab-10 fab-10 marked this pull request as ready for review November 25, 2022 10:09
@fab-10
Copy link
Contributor Author

fab-10 commented Nov 25, 2022

@ajsutton if you want to check again, since I had to move the log where it does not interfere with other options output

@ahamlat
Copy link
Contributor

ahamlat commented Nov 25, 2022

What do you think about including this in ConfigurationOverviewBuilder.java ?

@fab-10
Copy link
Contributor Author

fab-10 commented Nov 25, 2022

What do you think about including this in ConfigurationOverviewBuilder.java ?

Make sense, will do

@macfarla
Copy link
Contributor

@fab-10 are you still planning on making changes to this PR?

@fab-10 fab-10 marked this pull request as draft December 13, 2022 11:31
@fab-10
Copy link
Contributor Author

fab-10 commented Dec 13, 2022

Converted back to draft since will continue to work on it later

@ahamlat
Copy link
Contributor

ahamlat commented Apr 6, 2023

@fab-10 Do you think you can add Jemalloc log to ConfigurationOverviewBuilder.java or I can do it if you have other priorities ?

@fab-10
Copy link
Contributor Author

fab-10 commented Apr 6, 2023

I can do it, and I also want to report the version

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
@fab-10
Copy link
Contributor Author

fab-10 commented Apr 6, 2023

@ahamlat now if jemalloc is used then its version is printed in the overview

sample output

####################################################################################################
#                                                                                                  #
# Besu version 23.1.3-dev-542fa80f                                                                 #
#                                                                                                  #
# Configuration:                                                                                   #
# Network: Mainnet                                                                                 #
# Network Id: 1                                                                                    #
# Data storage: Forest                                                                             #
# Sync mode: Fast                                                                                  #
# Engine APIs: ENGINE,ETH                                                                          #
# Engine port: 8551                                                                                #
# Engine JWT: build/install/besu/jwt.hex                                                           #
#                                                                                                  #
# Host:                                                                                            #
# Java: openjdk-java-17                                                                            #
# Maximum heap size: 3.89 GB                                                                       #
# OS: linux-x86_64                                                                                 #
# glibc: 2.35                                                                                      #
# jemalloc: 5.2.1-0-gea6b3e973b477b8061e0076bb257dbd7f3faa756                                      #
# Total memory: 15.54 GB                                                                           #
# CPU cores: 8                                                                                     #
#                                                                                                  #
####################################################################################################

@fab-10 fab-10 marked this pull request as ready for review April 6, 2023 17:42
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
@ahamlat
Copy link
Contributor

ahamlat commented Apr 7, 2023

Nice, what is the output when jemalloc is not installed ? What about other Operating systems like Windows ?

@fab-10
Copy link
Contributor Author

fab-10 commented Apr 7, 2023

Nice, what is the output when jemalloc is not installed ? What about other Operating systems like Windows ?

We only support jemalloc on Linux, and when it is not installed this is printed in the logs

logger.info("jemalloc library not found, memory usage may be reduced by installing it")

@ahamlat
Copy link
Contributor

ahamlat commented Apr 7, 2023

I meant, what is the output at startup when Jemalloc is not installed ? (Same output as above when Jemalloc is not installed )

@fab-10
Copy link
Contributor Author

fab-10 commented Apr 11, 2023

I meant, what is the output at startup when Jemalloc is not installed ? (Same output as above when Jemalloc is not installed )

On Linux, when jemalloc is not installed, then the configuration overview does not have the jemalloc line, and in the logs there is this line at info jemalloc library not found, memory usage may be reduced by installing it

On other OS there is nothing about jemalloc, since we only support it on Linux.

@fab-10 fab-10 enabled auto-merge (squash) April 11, 2023 12:53
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
@fab-10 fab-10 merged commit a9b906c into hyperledger:main Apr 11, 2023
@fab-10 fab-10 deleted the fix_jemalloc_log branch April 11, 2023 14:29
elenduuche pushed a commit to elenduuche/besu that referenced this pull request Aug 16, 2023
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
eum602 pushed a commit to lacchain/besu that referenced this pull request Nov 3, 2023
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants