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

ZOOKEEPER-2835: Run server with -XX:+AlwaysPreTouch jvm flag #301

Closed
wants to merge 1 commit into from
Closed

ZOOKEEPER-2835: Run server with -XX:+AlwaysPreTouch jvm flag #301

wants to merge 1 commit into from

Conversation

@asdf2014
Copy link
Member

@asdf2014 asdf2014 commented Jul 4, 2017

Add -XX:+AlwaysPreTouch jvm flag for server, let jvm through demand-zeroed way to allocate memory once in place when the process started.

@afine
Copy link
Contributor

@afine afine commented Aug 3, 2017

I'm not sure if we should make this default configuration since it should increase startup time and will only increase performance for users with larger memory requirements. Our current default -XX args are pretty conservative and we don't really have any performance related switches there. Perhaps we should document this as a recommendation rather than making this default?

@asdf2014
Copy link
Member Author

@asdf2014 asdf2014 commented Aug 4, 2017

Hi @afine . Thanks for your comments. Your consider is entirely correct. But I found the PR#16937 from elasticsearch. And every node in our elasticsearch cluster always be set as huge ES_HEAP_SIZE value. Then it just spend a few second when the elasticsearch instance start up. However, the server node in zookeeper cluster usually we don't assign too large memory. So, the zookeeper as daemon instance will get more benefit from it. (PS, same tuning in Cassandra, Jenkins etc.)

@anmolnar
Copy link
Contributor

@anmolnar anmolnar commented Jan 30, 2019

@asdf2014 I agree with @afine that we should add this to the documentation as a potential performance improvement rather than making it default.
If you're willing, please create separate pull request with the documentation change and I close this PR.

@anmolnar anmolnar closed this Jan 30, 2019
@asdf2014 asdf2014 deleted the asdf2014:ZOOKEEPER-2835 branch Jan 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants