Member since
08-08-2017
1652
Posts
30
Kudos Received
11
Solutions
My Accepted Solutions
| Title | Views | Posted |
|---|---|---|
| 1950 | 06-15-2020 05:23 AM | |
| 15882 | 01-30-2020 08:04 PM | |
| 2093 | 07-07-2019 09:06 PM | |
| 8189 | 01-27-2018 10:17 PM | |
| 4646 | 12-31-2017 10:12 PM |
05-24-2018
12:59 PM
@Jay now I get the right values from ps -ef | grep kafka kafka 74086 1 99 12:53 ? 00:00:15 /usr/jdk64/jdk1.8.0_112/bin/java -Xms3g -Xmx3g -server now is it possible to set the value export KAFKA_HEAP_OPTS="-Xms3g -Xmx3g" by API ? * we want to automate this process by script bash
... View more
05-24-2018
12:43 PM
@jay according to the article ( https://community.hortonworks.com/articles/80813/kafka-best-practices-2.html ) , I see Kafka Broker: Java Version We recommend latest java 1.8 with G1 collector ( which is default in new version). If you are using Java 1.7 and G1 collector make sure you are on u51 or higher. A recommended setting for JVM looks like following -Xmx8g -Xms8g -XX:MetaspaceSize=96m -XX:+UseG1GC-XX:MaxGCPauseMillis=20 -XX:InitiatingHeapOccupancyPercent=35 -XX:G1HeapRegionSize=16M-XX:MinMetaspaceFreeRatio=50 -XX:MaxMetaspaceFreeRatio=80 lets say that I update the new "-Xmx8g -Xms8g" in the script - /usr/hdp/2.6.4 /kafka/bin/kafka-server-start on each kafka then where I need to add/change other values - "-XX:MetaspaceSize=96m -XX:+UseG1GC-XX:MaxGCPauseMillis=20 -XX:InitiatingHeapOccupancyPercent=35 -XX:G1HeapRegionSize=16M-XX:MinMetaspaceFreeRatio=50 -XX:MaxMetaspaceFreeRatio=80" ?
... View more
05-24-2018
12:38 PM
@Jay after I update the lines in ambari I get: ps -ef | grep kafka<br>kafka 58614 1 99 11:49 ? 00:00:44 /usr/jdk64/jdk1.8.0_112/bin/java -Xms3g -Xmx3g -Xms3g -Xmx3g -Xms3g -Xmx3g instead to get: ps -ef | grep kafka<br>kafka 58614 1 99 11:49 ? 00:00:44 /usr/jdk64/jdk1.8.0_112/bin/java -Xms3g -Xmx3g
... View more
05-24-2018
11:57 AM
@Jay why not to update the script - /usr/hdp/2.6.4 /kafka/bin/kafka-server-start on each kafka ? and change there the Xmx and Xms insted to add the new Xmx and Xms inside the ambari in kafka-env template
... View more
05-24-2018
10:24 AM
@Jay I ask all these questions because seems that the default of 1G inst enough , and we have in the past critical errors as the following from kafka.err ( this was very big problem and causes restarting of kafka broker ) Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "kafka-network-thread-1002-PLAINTEXT-2"
Exception in thread "ExpirationReaper-1002" Exception in thread "ExpirationReaper-1002" java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
... View more
05-24-2018
10:18 AM
$Jay , anyway what is your personal recommendation for Xmx and Xms values ? ( according to jafka memory size )
... View more
05-24-2018
10:16 AM
hi Jay we get the same values: ( after unset ) java -XX:+PrintFlagsFinal -version | grep HeapSize
uintx ErgoHeapSizeLimit = 0 {product}
uintx HeapSizePerGCThread = 87241520 {product}
uintx InitialHeapSize := 2147483648 {product}
uintx LargePageHeapSizeThreshold = 134217728 {product}
uintx MaxHeapSize := 32210157568 {product}
openjdk version "1.8.0_65"
OpenJDK Runtime Environment (build 1.8.0_65-b17)
OpenJDK 64-Bit Server VM (build 25.65-b01, mixed mode)
... View more
05-24-2018
09:39 AM
we have Hadoop cluster ( version 2.6.4 ) with 3 physical kafka machines we want to know what is the
values of Xmx and Xms that we need to allocate on the kafka machines in order to setup the in
the Xmx and Xms on kafka machine we need to configure the
script /usr/hdp/2.6.4 /kafka/bin/kafka-server-start for now the default values are ( Xmx is 1G and Xms is 1G ) if [ "x$KAFKA_HEAP_OPTS" = "x" ]; then
export
KAFKA_HEAP_OPTS="-Xmx1G –Xms1G"
fi
[root@kafka01 ~]# free -g
total used free shared buff/cache available
Mem: 251 17 11 0 222 233
Swap: 15 6 9
on each kafka we have 256G and we found this link - https://stackoverflow.com/questions/4667483/how-is-the-default-java-heap-size-determined according to the link in
stackoverflow we can use this formula: [root@kafka01 ~]# java -XX:+PrintFlagsFinal -version | grep HeapSize
uintx ErgoHeapSizeLimit = 0 {product}
uintx HeapSizePerGCThread = 87241520 {product}
uintx InitialHeapSize := 2147483648 {product}
uintx LargePageHeapSizeThreshold = 134217728 {product}
uintx MaxHeapSize := 32210157568 {product}
openjdk version "1.8.0_65"
OpenJDK Runtime Environment (build 1.8.0_65-b17)
OpenJDK 64-Bit Server VM (build 25.65-b01, mixed mode)
[root@kafka01 ~]# java -XX:+PrintFlagsFinal -version | grep HeapSize
uintx ErgoHeapSizeLimit = 0 {product}
uintx HeapSizePerGCThread = 87241520 {product}
uintx InitialHeapSize := 2147483648 {product}
uintx LargePageHeapSizeThreshold = 134217728 {product}
uintx MaxHeapSize := 32210157568 {product}
openjdk version "1.8.0_65"
OpenJDK Runtime Environment (build 1.8.0_65-b17)
OpenJDK 64-Bit Server VM (build 25.65-b01, mixed mode) So the values comes with bytes
and we can calculate them to Giga So Xmx = 32G Xms = 2G What is the recommendation of
hortonworks about Xmx and Xms ? Dose hortonworks except the
formula - java -XX:+PrintFlagsFinal -version | grep HeapSize In order to get the right values
of Xmx and Xms ?
... View more
Labels:
05-22-2018
06:17 PM
how to add the password - admin in the API?
... View more
05-22-2018
06:10 PM
this API withpout passord ?
... View more