You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/07/17 05:54:40 UTC

[GitHub] [pulsar] wenjun8888 opened a new issue #7574: Set jvm options to each components

wenjun8888 opened a new issue #7574:
URL: https://github.com/apache/pulsar/issues/7574


   sir, i have an questions to ask.
   when i setting jvm options in pulsar_env.sh
   for example:
   ```
   # Extra options to be passed to the jvm
   PULSAR_MEM=${PULSAR_MEM:-"-Xms4g -Xmx4g -XX:MaxDirectMemorySize=4g"}
   ```
   Is that means  4g memory allocated for each components.
   In my case, a node with 8G memory and there are zookeeper\bookie\broker on it.
   So i think 8G is not enough...
   Please tell me if i have the wrong idea, or can i set jvm options for singel components.
   Thank you very much!
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] sijie commented on issue #7574: Set jvm options to each components

Posted by GitBox <gi...@apache.org>.
sijie commented on issue #7574:
URL: https://github.com/apache/pulsar/issues/7574#issuecomment-686867283


   @wenjun8888 Can you check @wolfstudy 's question?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] wolfstudy commented on issue #7574: Set jvm options to each components

Posted by GitBox <gi...@apache.org>.
wolfstudy commented on issue #7574:
URL: https://github.com/apache/pulsar/issues/7574#issuecomment-660408678


   You should configure `PULSAR_MEM` to allocate memory for running Pulsar components.
   
    - It is recommended to configure `-Xms` to equal to `-Xmx`, so that JVM can allocate the whole heap memory during initialization.
   - Since Pulsar uses direct memory extensively, you should make sure allocating enough directory memory for JVM. It is recommended to configure `-XX:MaxDirectMemorySize` to be twice of `-Xmx`.
   - Make sure the total size of JVM heap and direct memory does *NOT* exceed the total available memory on your machine. It is also recommended to leave at least 1~2 GB for your operating system.
   
   Let’s use a 8GB machine as an example, you can configure your maximum heap memory to be 2GB, directory memory to be 4GB and leave the remaining 2GB for your operating system. So your `PULSAR_MEM` will be:
   
   ```
   -Xms2g -Xmx2g -XX:MaxDirectMemorySize=4g 
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] wolfstudy commented on issue #7574: Set jvm options to each components

Posted by GitBox <gi...@apache.org>.
wolfstudy commented on issue #7574:
URL: https://github.com/apache/pulsar/issues/7574#issuecomment-688048416


   ping @wenjun8888 , will close this issue, If you have any questions about this, please reopen it or let me know, thanks.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] wolfstudy closed issue #7574: Set jvm options to each components

Posted by GitBox <gi...@apache.org>.
wolfstudy closed issue #7574:
URL: https://github.com/apache/pulsar/issues/7574


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org