Skip to content

-XX:ParallelGCThreads=N #22245

Closed
Closed
@KeithTt

Description

@KeithTt

OpenJDK 64-Bit Server VM warning: If the number of processors is expected to increase from one, then you should configure the number of parallel GC threads appropriately using -XX:ParallelGCThreads=N

OS: CENTOS7.2

openjdk version "1.8.0_111"
OpenJDK Runtime Environment (build 1.8.0_111-b15)
OpenJDK 64-Bit Server VM (build 25.111-b15, mixed mode)

failed to start elasticsearch service...

Activity

jasontedor

jasontedor commented on Dec 17, 2016

@jasontedor
Member

Some OpenJDK package maintainers (the RedHat line for sure) decided to start shipping their OpenJDK packages with -XX:+AssumeMP enabled by default. Frankly I think that this is a mistake, but that is what leads to the message that you're seeing here. You can disable this by starting the JVM with -XX:-AssumeMP (either add it to ES_JAVA_OPTS, or add it to jvm.options if you're on Elasticsearch 5.x (please include the version in future issues)).

antboll

antboll commented on Jan 15, 2018

@antboll

Hi,
I got the same Problem with Elasticsearch 5.x and centOS. Unfortunately I`m not very familiar to Linux. Which Command do I have to add into jvm.options to get the Service startet?

KeithTt

KeithTt commented on Jan 15, 2018

@KeithTt
Author

There is a file named jvm.options at /etc/elasticsearch/jvm.options, just add -XX:+AssumeMP to this file.

flyinghawker

flyinghawker commented on Aug 15, 2018

@flyinghawker

I encounter same issue again and try to follow the idea @KeithTt
but not /etc/elasticsearch/jvm.options, elasticsearch-6.3.2/config/jvm.options instead,
adding -XX:+AssumeMP. Error still exsits.

centos_7_04_64_20G

openjdk version "1.8.0_181"
OpenJDK Runtime Environment (build 1.8.0_181-b13)
OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode)

jasontedor

jasontedor commented on Aug 15, 2018

@jasontedor
Member

@flyinghawker You want -XX:-AssumeMP, not -XX:+AssumeMP.

flyinghawker

flyinghawker commented on Aug 15, 2018

@flyinghawker

@jasontedor Thanks for the tricky detail notice. And setting -Xms?? and -Xmx?? also matters for me because my testing server RAM is only 1G, have to reduce to be lower than the free part of it. Thanks.

SaiDesabathina

SaiDesabathina commented on Nov 18, 2018

@SaiDesabathina

How do I add -XX:+AssumeMP if I am using a Docker. Where should I search for files

jasontedor

jasontedor commented on Nov 18, 2018

@jasontedor
Member

@SaiDesabathina I am happy to try to help but first I have some questions:

  • Are you using the official Elastic Docker container?
  • If so, which version of the container are you using?
  • What leads you to believe that you need this flag in your Docker container?
SaiDesabathina

SaiDesabathina commented on Nov 18, 2018

@SaiDesabathina

@jasontedor Thanks for coming forward to help. I will explain my problem clearly. It should answer your questions. I downloaded elastic search (6.5.0), kibana (6.5.0) and logstash (6.5.0) images from Elastic website. I was successful in launching elastic search and kibana containers and following this I was trying to link logstash with elastic search. I am doing by following a youtube tutorial. To link logstash and elastic search I ran the following command:

docker run -h logstash --name logstash_a --link elasticsearch_1:elasticsearch -it
--rm -v "SPwD":/config-dir logstash:6.5.0 -f /config-dir/logstash.config

This came up with the following error:

OpenJDK 64-Bit Server VM warning: If the number of processors is expected to increase from one, then you should configure the number of parallel GC threads appropriately using -XX:ParallelGCThreads=N
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000c5330000, 986513408, 0) failed; error='Cannot allocate memory' (errno=12)

There is insufficient memory for the Java Runtime Environment to continue.

Native memory allocation (mmap) failed to map 986513408 bytes for committing reserved memory.

An error report file with more information is saved as:

/usr/share/logstash/hs_err_pid1.log

Could you please help me in launching logstash container and linking it with elastic search. Do you have any tutorial that I can use to learn.

Regards
Sai

jasontedor

jasontedor commented on Nov 18, 2018

@jasontedor
Member

I still can not tell if you’re using the official Elastic Docker images or not. It appears not, but I would prefer to not assume. Ultimately your problem is not related to -XX:-AssumeMP. Your problem is that you have insufficient memory. The JVM is trying to reserve 1 GB of heap and you do not have that available, that is what the log message is telling you. We have elastic/stack-docker for help orchestrating a full Elastic Stack via Docker containers. After you have addressed the fact that you have insufficient memory to start the containers that you’re trying to start, I suggest that you look there for ideas on orchestrating a full Elastic Stack via Docker. Finally, we have gotten off track from what this issue is about: -XX:-AssumeMP. I would ask that if you have further questions that you please use the forums. We reserve GitHub for verified bug reports and feature requests.

WilburXu

WilburXu commented on Jun 27, 2019

@WilburXu

I encounter same issue again and try to follow the idea @KeithTt
but not /etc/elasticsearch/jvm.options, elasticsearch-6.3.2/config/jvm.options instead,
adding -XX:+AssumeMP. Error still exsits.

centos_7_04_64_20G

openjdk version "1.8.0_181"
OpenJDK Runtime Environment (build 1.8.0_181-b13)
OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode)

thanks!

tvernum

tvernum commented on Jun 27, 2019

@tvernum
Contributor

@WilburXu You want -XX:-AssumeMP which turns off this option, (not +AssumeMP which turns it on).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @tvernum@jasontedor@flyinghawker@KeithTt@WilburXu

        Issue actions

          -XX:ParallelGCThreads=N · Issue #22245 · elastic/elasticsearch