SlideShare ist ein Scribd-Unternehmen logo
1 von 39
Downloaden Sie, um offline zu lesen
What to Do if Your
Kafka Streams App Gets OOMKilled?
Andrey Serebryanskiy
{
Andrey Serebryanskiy
Streaming Platform Owner at Raiffeisen Bank
What to Do if Your Kafka
Streams App Gets
OOMKilled?
The problem
3
Kafka Kafka Streams App
kubernetes
RocksDB
What is the problem with
this app?
Launch with resource limits
5
helm/templates/deployment.yaml
...
resources:
limits:
memory: 256Mi
requests:
memory: 128Mi
command:
- java
args:
- -jar
- app.jar
...
How to check if it is OOMKilled?
6
kubectl describe pod your-pod-name -n your-namespace
Name: your-pod-name
...
Containers:
app:
...
Last State: Terminated
Reason: OOMKilled
Exit Code: 137
Example app
Example app
8
Simple Kafka Streams topology
Application.java
public static void main(String[] args) {
var builder = new StreamsBuilder();
var stream = builder.stream(INPUT_TOPIC);
builder.addStateStore(Stores.keyValueStoreBuilder(
Stores.persistentKeyValueStore(STATE_STORE_NAME));
var persistedStream = stream.transformValues((readOnlyKey, val) -> {
...
stateStore.put(readOnlyKey, val);
...
}, STATE_STORE_NAME);
persistedStream.foreach((key, val) -> ...);
var topology = builder.build();
var kafkaStreams = new KafkaStreams(topology);
runApp(kafkaStreams);
}
Example app
9
Simple Kafka Streams topology
Application.java
public static void main(String[] args) {
var builder = new StreamsBuilder();
var stream = builder.stream(INPUT_TOPIC);
builder.addStateStore(Stores.keyValueStoreBuilder(
Stores.persistentKeyValueStore(STATE_STORE_NAME));
var persistedStream = stream.transformValues((readOnlyKey, val) -> {
...
stateStore.put(readOnlyKey, val);
...
}, STATE_STORE_NAME);
persistedStream.foreach((key, val) -> ...);
var topology = builder.build();
var kafkaStreams = new KafkaStreams(topology);
runApp(kafkaStreams);
}
Example app
10
Simple Kafka Streams topology
Application.java
public static void main(String[] args) {
var builder = new StreamsBuilder();
var stream = builder.stream(INPUT_TOPIC);
builder.addStateStore(Stores.keyValueStoreBuilder(
Stores.persistentKeyValueStore(STATE_STORE_NAME));
var persistedStream = stream.transformValues((readOnlyKey, val) -> {
...
stateStore.put(readOnlyKey, val);
...
}, STATE_STORE_NAME);
persistedStream.foreach((key, val) -> logMessageCount());
var topology = builder.build();
var kafkaStreams = new KafkaStreams(topology);
runApp(kafkaStreams);
}
Example app
11
Simple Kafka Streams topology
Application.java
public static void main(String[] args) {
var builder = new StreamsBuilder();
var stream = builder.stream(INPUT_TOPIC);
builder.addStateStore(Stores.keyValueStoreBuilder(
Stores.persistentKeyValueStore(STATE_STORE_NAME));
var persistedStream = stream.transformValues((readOnlyKey, val) -> {
...
stateStore.put(readOnlyKey, val);
...
}, STATE_STORE_NAME);
persistedStream.foreach((key, val) -> logMessageCount());
var topology = builder.build();
var kafkaStreams = new KafkaStreams(topology);
runApp(kafkaStreams);
}
Example app
12
Simple Kafka Streams topology
Application.java
public static void main(String[] args) {
...
runApp(kafkaStreams);
}
Please find full application code here:
https://github.com/a-serebryanskiy/kafka-streams-oom-killed
So you have your app
OOMKilled
Launch with resource limits
14
helm/templates/deployment.yaml
...
resources:
limits:
memory: 256Mi
requests:
memory: 128Mi
command:
- java
args:
- -jar
- app.jar
...
Let’s add heap limits
15
helm/templates/deployment.yaml
...
resources:
limits:
memory: 256Mi
requests:
memory: 128Mi
command:
- java
args:
- -XshowSettings:VM
- -XX:MinRAMPercentage=50.0
- -jar
- app.jar
...
Let’s add heap limits
16
helm/templates/deployment.yaml
...
resources:
limits:
memory: 256Mi
requests:
memory: 128Mi
command:
- java
args:
- -XshowSettings:VM
- -XX:MinRAMPercentage=50.0
- -jar
- app.jar
...
https://www.baeldung.com/java-jvm-parameters-rampercentage
VM settings:
Max. Heap Size (Estimated): 121.81M
Property settings:
java.version = 11.0.12
Turns out 50.0 is already a default value
App memory performance
17
Taken from grafana
container memory limit
container memory usage
jvm memory
100 mb
Kafka Streams
memory usage
Kafka Streams app memory
19
JVM Heap + RocksDB
Confluent article about Kafka Streams memory tunning:
https://docs.confluent.io/platform/current/streams/developer-guide/memory-mgmt.html
State Store
Kafka Streams
App
put(key, val)
Kafka Streams app memory
20
JVM Heap + RocksDB
Kafka Streams
App
CachingKeyValueStore
- ThreadCache context.cache()
Indexes
bloom
filters
block
cache
OS page
cache
memtable
State Store - RocksDB
! These items size
depends on number of
unique keys
JVM Heap
Not controlled by JVM
RocksDB memory details: https://github.com/facebook/rocksdb/wiki/Memory-usage-in-RocksDB
put(key, val)
native put(key, val)
How to fix unbounded RocksDB memory usage?
21
Application.java
properties.put(StreamsConfig.ROCKSDB_CONFIG_SETTER_CLASS_CONFIG,
”your.package.BoundedMemoryRocksDBConfig");
your.package.BoundedMemoryRocksDBConfig.java
@Override
public void setConfig(..., Options options, ...) {
BlockBasedTableConfig tableConfig = options.tableFormatConfig();
Cache cache = new LRUCache(computeTotalRocksDbMem(), -1, false);
tableConfig.setBlockCache(cache);
tableConfig.setCacheIndexAndFilterBlocks(true);
options.setWriteBufferManager(writeBufferManager);
...
}
How to fix unbounded RocksDB memory usage?
22
Application.java
properties.put(StreamsConfig.ROCKSDB_CONFIG_SETTER_CLASS_CONFIG,
”your.package.BoundedMemoryRocksDBConfig");
your.package.BoundedMemoryRocksDBConfig.java
@Override
public void setConfig(..., Options options, ...) {
BlockBasedTableConfig tableConfig = options.tableFormatConfig();
Cache cache = new LRUCache(computeTotalRocksDbMem(), -1, false);
tableConfig.setBlockCache(cache);
tableConfig.setCacheIndexAndFilterBlocks(true);
options.setWriteBufferManager(writeBufferManager);
...
}
How to fix unbounded RocksDB memory usage?
23
Application.java
properties.put(StreamsConfig.ROCKSDB_CONFIG_SETTER_CLASS_CONFIG,
”your.package.BoundedMemoryRocksDBConfig");
your.package.BoundedMemoryRocksDBConfig.java
@Override
public void setConfig(..., Options options, ...) {
BlockBasedTableConfig tableConfig = options.tableFormatConfig();
Cache cache = new LRUCache(computeTotalRocksDbMem(), -1, false);
tableConfig.setBlockCache(cache);
tableConfig.setCacheIndexAndFilterBlocks(true);
}
Pay attention to the number of stores and partitions:
https://docs.confluent.io/platform/current/streams/developer-guide/memory-mgmt.html#rocksdb
How to compute my
RocksDB memory?
Dynamic memory allocation
25
your.package.BoundedMemoryRocksDBConfig.java
private static long computeTotalRocksDbMem() {
long totalContainerMemoryBytes = getEnv("CONTAINER_MEMORY_LIMIT"));
double osPercentage = getEnv("OS_MEMORY_PERCENTAGE"));
long offHeapSizeMb = getEnv("OFF_HEAP_SIZE_MB"));
long maxHeapSizeMb = getEnv("MAX_HEAP_SIZE_MB"));
long jvmMemoryBytes = (offHeapSizeMb + maxHeapSizeMb) * 1024 * 1024;
return totalContainerMemoryBytes * (1 - osPercentage)) - jvmMemoryBytes;
}
Dynamic memory allocation
26
your.package.BoundedMemoryRocksDBConfig.java
private static long computeTotalRocksDbMem() {
long totalContainerMemoryBytes = getEnv("CONTAINER_MEMORY_LIMIT"));
double osPercentage = getEnv("OS_MEMORY_PERCENTAGE"));
long offHeapSizeMb = getEnv("OFF_HEAP_SIZE_MB"));
long maxHeapSizeMb = getEnv("MAX_HEAP_SIZE_MB"));
long jvmMemoryBytes = (offHeapSizeMb + maxHeapSizeMb) * 1024 * 1024;
return totalContainerMemoryBytes * (1 - osPercentage)) - jvmMemoryBytes;
}
Dynamic memory allocation
27
About using container props as env vars:
https://kubernetes.io/docs/tasks/inject-data-application/environment-variable-expose-pod-information/
helm/templates/deployment.yaml
...
env:
- name: CONTAINER_MEMORY_LIMIT
valueFrom:
resourceFieldRef:
containerName: app
resource: limits.memory
...
Dynamic memory allocation
28
your.package.BoundedMemoryRocksDBConfig.java
private static long computeTotalRocksDbMem() {
long totalContainerMemoryBytes = getEnv("CONTAINER_MEMORY_LIMIT"));
double osPercentage = getEnv("OS_MEMORY_PERCENTAGE"));
long offHeapSizeMb = getEnv("OFF_HEAP_SIZE_MB"));
long maxHeapSizeMb = getEnv("MAX_HEAP_SIZE_MB"));
long jvmMemoryBytes = (offHeapSizeMb + maxHeapSizeMb) * 1024 * 1024;
return totalContainerMemoryBytes * (1 - osPercentage)) - jvmMemoryBytes;
}
Dynamic memory allocation
29
helm/templates/deployment.yaml
env:
- name: OS_MEMORY_PERCENTAGE
value: "0.1"
- name: OFF_HEAP_SIZE_MB
value: "128"
- name: MAX_HEAP_SIZE_MB
value: "{{ .Values.heapSizeMb }}"
Dynamic memory allocation
30
your.package.BoundedMemoryRocksDBConfig.java
private static long computeTotalRocksDbMem() {
long totalContainerMemoryBytes = getEnv("CONTAINER_MEMORY_LIMIT"));
double osPercentage = getEnv("OS_MEMORY_PERCENTAGE"));
long offHeapSizeMb = getEnv("OFF_HEAP_SIZE_MB"));
long maxHeapSizeMb = getEnv("MAX_HEAP_SIZE_MB"));
long jvmMemoryBytes = (offHeapSizeMb + maxHeapSizeMb) * 1024 * 1024;
return totalContainerMemoryBytes * (1 - osPercentage)) - jvmMemoryBytes;
}
Dynamic memory allocation
31
helm/templates/deployment.yaml
env:
- name: OS_MEMORY_PERCENTAGE
value: "0.1"
# computed it based on the jcmd output
- name: OFF_HEAP_SIZE_MB
value: "128"
- name: MAX_HEAP_SIZE_MB
value: "{{ .Values.heapSizeMb }}"
If you would like to analyze non-heap JVM mem
32
1. Make sure you use JDK (not JRE) Docker image
2. Add to JVM args -XX:NativeMemoryTracking=summary
3. Execute command in container shell:
helm/templates/deployment.yaml
command:
- java
args:
- -XX:NativeMemoryTracking=summary
- -jar
- app.jar
bash
kubectl exec pod/your-pod-name -n your-namespace –it -- /bin/bash -c “jcmd 1 VM.native_memory”
Dynamic memory allocation
33
your.package.BoundedMemoryRocksDBConfig.java
private static long computeTotalRocksDbMem() {
long totalContainerMemoryBytes = getEnv("CONTAINER_MEMORY_LIMIT"));
double osPercentage = getEnv("OS_MEMORY_PERCENTAGE"));
long offHeapSizeMb = getEnv("OFF_HEAP_SIZE_MB"));
long maxHeapSizeMb = getEnv("MAX_HEAP_SIZE_MB"));
long jvmMemoryBytes = (offHeapSizeMb + maxHeapSizeMb) * 1024 * 1024;
return totalContainerMemoryBytes * (1 - osPercentage)) - jvmMemoryBytes;
}
Dynamic memory allocation
34
helm/templates/deployment.yaml
env:
- name: OFF_HEAP_SIZE_MB
value: "128"
- name: MAX_HEAP_SIZE_MB
value: "{{ .Values.heapSizeMb }}”
args:
- -Xmx{{ .Values.heapSizeMb }}m
- -jar
- app.jar
helm/values.yaml
heapSizeMb: 64
If you would like to profile your app
35
1) helm/templates/deployment.yaml
command:
- java
args:
- -Dcom.sun.management.jmxremote
- -Dcom.sun.management.jmxremote.port=13089
- -Dcom.sun.management.jmxremote.ssl=false
- -Dcom.sun.management.jmxremote.local.only=false
- -Dcom.sun.management.jmxremote.authenticate=false
- -Dcom.sun.management.jmxremote.rmi.port=13089
- -Djava.rmi.server.hostname=localhost
- -jar
- app.jar
ports:
- containerPort: 13089
name: jmx
protocol: TCP
2) kubectl port-forward pod/your-pod-name -n your-namespace 13089:13089
App memory performance (after fix)
36
Taken from grafana
Limitations are not the only way!
37
Links and materials
38
‱ How JVM analyze memory inside Docker container–
https://merikan.com/2019/04/jvm-in-a-container/#java-10
‱ How to use jcmd to analyze non-heap memory–
https://www.baeldung.com/native-memory-tracking-in-jvm
‱ Why use container_memory_working_set_bytes instead of container_memory_usage_bytes
https://blog.freshtracks.io/a-deep-dive-into-kubernetes-metrics-part-3-container-resource-metrics-361c5ee46e6
‱ How RocksDB store works with Kafka Streams:
https://www.confluent.io/blog/how-to-tune-rocksdb-kafka-streams-state-stores-performance/
‱ Linux memory controller for cgroups
https://lwn.net/Articles/432224/
/
Thank you!
39
https://t.me/aserebryanskiy
a.serebrianskiy@gmail.com

Weitere Àhnliche Inhalte

Was ist angesagt?

What is the State of my Kafka Streams Application? Unleashing Metrics. | Neil...
What is the State of my Kafka Streams Application? Unleashing Metrics. | Neil...What is the State of my Kafka Streams Application? Unleashing Metrics. | Neil...
What is the State of my Kafka Streams Application? Unleashing Metrics. | Neil...HostedbyConfluent
 
Performance Tuning RocksDB for Kafka Streams' State Stores (Dhruba Borthakur,...
Performance Tuning RocksDB for Kafka Streams' State Stores (Dhruba Borthakur,...Performance Tuning RocksDB for Kafka Streams' State Stores (Dhruba Borthakur,...
Performance Tuning RocksDB for Kafka Streams' State Stores (Dhruba Borthakur,...confluent
 
Terraform 0.12 + Terragrunt
Terraform 0.12 + TerragruntTerraform 0.12 + Terragrunt
Terraform 0.12 + TerragruntAnton Babenko
 
Introduction to memcached
Introduction to memcachedIntroduction to memcached
Introduction to memcachedJurriaan Persyn
 
Kafka Tutorial: Advanced Producers
Kafka Tutorial: Advanced ProducersKafka Tutorial: Advanced Producers
Kafka Tutorial: Advanced ProducersJean-Paul Azar
 
KSQL Performance Tuning for Fun and Profit ( Nick Dearden, Confluent) Kafka S...
KSQL Performance Tuning for Fun and Profit ( Nick Dearden, Confluent) Kafka S...KSQL Performance Tuning for Fun and Profit ( Nick Dearden, Confluent) Kafka S...
KSQL Performance Tuning for Fun and Profit ( Nick Dearden, Confluent) Kafka S...confluent
 
Deploying Kafka Streams Applications with Docker and Kubernetes
Deploying Kafka Streams Applications with Docker and KubernetesDeploying Kafka Streams Applications with Docker and Kubernetes
Deploying Kafka Streams Applications with Docker and Kubernetesconfluent
 
A Thorough Comparison of Delta Lake, Iceberg and Hudi
A Thorough Comparison of Delta Lake, Iceberg and HudiA Thorough Comparison of Delta Lake, Iceberg and Hudi
A Thorough Comparison of Delta Lake, Iceberg and HudiDatabricks
 
ksqlDB - Stream Processing simplified!
ksqlDB - Stream Processing simplified!ksqlDB - Stream Processing simplified!
ksqlDB - Stream Processing simplified!Guido Schmutz
 
Change Data Feed in Delta
Change Data Feed in DeltaChange Data Feed in Delta
Change Data Feed in DeltaDatabricks
 
Making Structured Streaming Ready for Production
Making Structured Streaming Ready for ProductionMaking Structured Streaming Ready for Production
Making Structured Streaming Ready for ProductionDatabricks
 
Grafana Mimir and VictoriaMetrics_ Performance Tests.pptx
Grafana Mimir and VictoriaMetrics_ Performance Tests.pptxGrafana Mimir and VictoriaMetrics_ Performance Tests.pptx
Grafana Mimir and VictoriaMetrics_ Performance Tests.pptxRomanKhavronenko
 
Flink vs. Spark
Flink vs. SparkFlink vs. Spark
Flink vs. SparkSlim Baltagi
 
Troubleshooting Kerberos in Hadoop: Taming the Beast
Troubleshooting Kerberos in Hadoop: Taming the BeastTroubleshooting Kerberos in Hadoop: Taming the Beast
Troubleshooting Kerberos in Hadoop: Taming the BeastDataWorks Summit
 
0-60: Tesla's Streaming Data Platform ( Jesse Yates, Tesla) Kafka Summit SF 2019
0-60: Tesla's Streaming Data Platform ( Jesse Yates, Tesla) Kafka Summit SF 20190-60: Tesla's Streaming Data Platform ( Jesse Yates, Tesla) Kafka Summit SF 2019
0-60: Tesla's Streaming Data Platform ( Jesse Yates, Tesla) Kafka Summit SF 2019confluent
 
Running Apache Spark on Kubernetes: Best Practices and Pitfalls
Running Apache Spark on Kubernetes: Best Practices and PitfallsRunning Apache Spark on Kubernetes: Best Practices and Pitfalls
Running Apache Spark on Kubernetes: Best Practices and PitfallsDatabricks
 
Introduction and Overview of Apache Kafka, TriHUG July 23, 2013
Introduction and Overview of Apache Kafka, TriHUG July 23, 2013Introduction and Overview of Apache Kafka, TriHUG July 23, 2013
Introduction and Overview of Apache Kafka, TriHUG July 23, 2013mumrah
 
Developing Kafka Streams Applications with Upgradability in Mind with Neil Bu...
Developing Kafka Streams Applications with Upgradability in Mind with Neil Bu...Developing Kafka Streams Applications with Upgradability in Mind with Neil Bu...
Developing Kafka Streams Applications with Upgradability in Mind with Neil Bu...HostedbyConfluent
 
Easy, scalable, fault tolerant stream processing with structured streaming - ...
Easy, scalable, fault tolerant stream processing with structured streaming - ...Easy, scalable, fault tolerant stream processing with structured streaming - ...
Easy, scalable, fault tolerant stream processing with structured streaming - ...Databricks
 

Was ist angesagt? (20)

What is the State of my Kafka Streams Application? Unleashing Metrics. | Neil...
What is the State of my Kafka Streams Application? Unleashing Metrics. | Neil...What is the State of my Kafka Streams Application? Unleashing Metrics. | Neil...
What is the State of my Kafka Streams Application? Unleashing Metrics. | Neil...
 
Performance Tuning RocksDB for Kafka Streams' State Stores (Dhruba Borthakur,...
Performance Tuning RocksDB for Kafka Streams' State Stores (Dhruba Borthakur,...Performance Tuning RocksDB for Kafka Streams' State Stores (Dhruba Borthakur,...
Performance Tuning RocksDB for Kafka Streams' State Stores (Dhruba Borthakur,...
 
Terraform 0.12 + Terragrunt
Terraform 0.12 + TerragruntTerraform 0.12 + Terragrunt
Terraform 0.12 + Terragrunt
 
Introduction to memcached
Introduction to memcachedIntroduction to memcached
Introduction to memcached
 
Kafka Tutorial: Advanced Producers
Kafka Tutorial: Advanced ProducersKafka Tutorial: Advanced Producers
Kafka Tutorial: Advanced Producers
 
KSQL Performance Tuning for Fun and Profit ( Nick Dearden, Confluent) Kafka S...
KSQL Performance Tuning for Fun and Profit ( Nick Dearden, Confluent) Kafka S...KSQL Performance Tuning for Fun and Profit ( Nick Dearden, Confluent) Kafka S...
KSQL Performance Tuning for Fun and Profit ( Nick Dearden, Confluent) Kafka S...
 
Deploying Kafka Streams Applications with Docker and Kubernetes
Deploying Kafka Streams Applications with Docker and KubernetesDeploying Kafka Streams Applications with Docker and Kubernetes
Deploying Kafka Streams Applications with Docker and Kubernetes
 
A Thorough Comparison of Delta Lake, Iceberg and Hudi
A Thorough Comparison of Delta Lake, Iceberg and HudiA Thorough Comparison of Delta Lake, Iceberg and Hudi
A Thorough Comparison of Delta Lake, Iceberg and Hudi
 
ksqlDB - Stream Processing simplified!
ksqlDB - Stream Processing simplified!ksqlDB - Stream Processing simplified!
ksqlDB - Stream Processing simplified!
 
Change Data Feed in Delta
Change Data Feed in DeltaChange Data Feed in Delta
Change Data Feed in Delta
 
Making Structured Streaming Ready for Production
Making Structured Streaming Ready for ProductionMaking Structured Streaming Ready for Production
Making Structured Streaming Ready for Production
 
kafka
kafkakafka
kafka
 
Grafana Mimir and VictoriaMetrics_ Performance Tests.pptx
Grafana Mimir and VictoriaMetrics_ Performance Tests.pptxGrafana Mimir and VictoriaMetrics_ Performance Tests.pptx
Grafana Mimir and VictoriaMetrics_ Performance Tests.pptx
 
Flink vs. Spark
Flink vs. SparkFlink vs. Spark
Flink vs. Spark
 
Troubleshooting Kerberos in Hadoop: Taming the Beast
Troubleshooting Kerberos in Hadoop: Taming the BeastTroubleshooting Kerberos in Hadoop: Taming the Beast
Troubleshooting Kerberos in Hadoop: Taming the Beast
 
0-60: Tesla's Streaming Data Platform ( Jesse Yates, Tesla) Kafka Summit SF 2019
0-60: Tesla's Streaming Data Platform ( Jesse Yates, Tesla) Kafka Summit SF 20190-60: Tesla's Streaming Data Platform ( Jesse Yates, Tesla) Kafka Summit SF 2019
0-60: Tesla's Streaming Data Platform ( Jesse Yates, Tesla) Kafka Summit SF 2019
 
Running Apache Spark on Kubernetes: Best Practices and Pitfalls
Running Apache Spark on Kubernetes: Best Practices and PitfallsRunning Apache Spark on Kubernetes: Best Practices and Pitfalls
Running Apache Spark on Kubernetes: Best Practices and Pitfalls
 
Introduction and Overview of Apache Kafka, TriHUG July 23, 2013
Introduction and Overview of Apache Kafka, TriHUG July 23, 2013Introduction and Overview of Apache Kafka, TriHUG July 23, 2013
Introduction and Overview of Apache Kafka, TriHUG July 23, 2013
 
Developing Kafka Streams Applications with Upgradability in Mind with Neil Bu...
Developing Kafka Streams Applications with Upgradability in Mind with Neil Bu...Developing Kafka Streams Applications with Upgradability in Mind with Neil Bu...
Developing Kafka Streams Applications with Upgradability in Mind with Neil Bu...
 
Easy, scalable, fault tolerant stream processing with structured streaming - ...
Easy, scalable, fault tolerant stream processing with structured streaming - ...Easy, scalable, fault tolerant stream processing with structured streaming - ...
Easy, scalable, fault tolerant stream processing with structured streaming - ...
 

Ähnlich wie What to do if Your Kafka Streams App Gets OOMKilled? with Andrey Serebryanskiy

Java on Linux for devs and ops
Java on Linux for devs and opsJava on Linux for devs and ops
Java on Linux for devs and opsaragozin
 
Java Đž Linux — ĐŸŃĐŸĐ±Đ”ĐœĐœĐŸŃŃ‚Đž эĐșŃĐżĐ»ŃƒĐ°Ń‚Đ°Ń†ĐžĐž / АлДĐșсДĐč Đ Đ°ĐłĐŸĐ·ĐžĐœ (Đ”ĐŸĐčчД Đ‘Đ°ĐœĐș)
Java Đž Linux — ĐŸŃĐŸĐ±Đ”ĐœĐœĐŸŃŃ‚Đž эĐșŃĐżĐ»ŃƒĐ°Ń‚Đ°Ń†ĐžĐž / АлДĐșсДĐč Đ Đ°ĐłĐŸĐ·ĐžĐœ (Đ”ĐŸĐčчД Đ‘Đ°ĐœĐș)Java Đž Linux — ĐŸŃĐŸĐ±Đ”ĐœĐœĐŸŃŃ‚Đž эĐșŃĐżĐ»ŃƒĐ°Ń‚Đ°Ń†ĐžĐž / АлДĐșсДĐč Đ Đ°ĐłĐŸĐ·ĐžĐœ (Đ”ĐŸĐčчД Đ‘Đ°ĐœĐș)
Java Đž Linux — ĐŸŃĐŸĐ±Đ”ĐœĐœĐŸŃŃ‚Đž эĐșŃĐżĐ»ŃƒĐ°Ń‚Đ°Ń†ĐžĐž / АлДĐșсДĐč Đ Đ°ĐłĐŸĐ·ĐžĐœ (Đ”ĐŸĐčчД Đ‘Đ°ĐœĐș)Ontico
 
Mastering java in containers - MadridJUG
Mastering java in containers - MadridJUGMastering java in containers - MadridJUG
Mastering java in containers - MadridJUGJorge Morales
 
Devoxx France 2018 : Mes Applications en Production sur Kubernetes
Devoxx France 2018 : Mes Applications en Production sur KubernetesDevoxx France 2018 : Mes Applications en Production sur Kubernetes
Devoxx France 2018 : Mes Applications en Production sur KubernetesMichaël Morello
 
Jug Lugano - Scale over the limits
Jug Lugano - Scale over the limitsJug Lugano - Scale over the limits
Jug Lugano - Scale over the limitsDavide Carnevali
 
ContainerWorkloadwithSemeru.pdf
ContainerWorkloadwithSemeru.pdfContainerWorkloadwithSemeru.pdf
ContainerWorkloadwithSemeru.pdfSumanMitra22
 
Jvm Performance Tunning
Jvm Performance TunningJvm Performance Tunning
Jvm Performance Tunningguest1f2740
 
Jvm Performance Tunning
Jvm Performance TunningJvm Performance Tunning
Jvm Performance TunningTerry Cho
 
7 jvm-arguments-Confoo
7 jvm-arguments-Confoo7 jvm-arguments-Confoo
7 jvm-arguments-ConfooTier1 app
 
Spark 2.x Troubleshooting Guide
Spark 2.x Troubleshooting GuideSpark 2.x Troubleshooting Guide
Spark 2.x Troubleshooting GuideIBM
 
Efficient Memory and Thread Management in Highly Parallel Java Applications
Efficient Memory and Thread Management in Highly Parallel Java ApplicationsEfficient Memory and Thread Management in Highly Parallel Java Applications
Efficient Memory and Thread Management in Highly Parallel Java ApplicationsPhillip Koza
 
16 ARTIFACTS TO CAPTURE WHEN YOUR CONTAINER APPLICATION IS IN TROUBLE
16 ARTIFACTS TO CAPTURE WHEN YOUR CONTAINER APPLICATION IS IN TROUBLE16 ARTIFACTS TO CAPTURE WHEN YOUR CONTAINER APPLICATION IS IN TROUBLE
16 ARTIFACTS TO CAPTURE WHEN YOUR CONTAINER APPLICATION IS IN TROUBLETier1 app
 
Rails Engine | Modular application
Rails Engine | Modular applicationRails Engine | Modular application
Rails Engine | Modular applicationmirrec
 
State of Java Elasticity. Tuning Java Efficiency - GIDS.JAVA LIVE 2020
State of Java Elasticity. Tuning Java Efficiency - GIDS.JAVA LIVE 2020State of Java Elasticity. Tuning Java Efficiency - GIDS.JAVA LIVE 2020
State of Java Elasticity. Tuning Java Efficiency - GIDS.JAVA LIVE 2020Jelastic Multi-Cloud PaaS
 
10 examples of hot spot jvm options in java
10 examples of hot spot jvm options in java10 examples of hot spot jvm options in java
10 examples of hot spot jvm options in javayamingd
 
Running your Java EE 6 applications in the Cloud (FISL 12)
Running your Java EE 6 applications in the Cloud (FISL 12)Running your Java EE 6 applications in the Cloud (FISL 12)
Running your Java EE 6 applications in the Cloud (FISL 12)Arun Gupta
 
Classloader leak detection in websphere application server
Classloader leak detection in websphere application serverClassloader leak detection in websphere application server
Classloader leak detection in websphere application serverRohit Kelapure
 
Master your java_applications_in_kubernetes
Master your java_applications_in_kubernetesMaster your java_applications_in_kubernetes
Master your java_applications_in_kubernetesAndy Moncsek
 

Ähnlich wie What to do if Your Kafka Streams App Gets OOMKilled? with Andrey Serebryanskiy (20)

Java on Linux for devs and ops
Java on Linux for devs and opsJava on Linux for devs and ops
Java on Linux for devs and ops
 
Java Đž Linux — ĐŸŃĐŸĐ±Đ”ĐœĐœĐŸŃŃ‚Đž эĐșŃĐżĐ»ŃƒĐ°Ń‚Đ°Ń†ĐžĐž / АлДĐșсДĐč Đ Đ°ĐłĐŸĐ·ĐžĐœ (Đ”ĐŸĐčчД Đ‘Đ°ĐœĐș)
Java Đž Linux — ĐŸŃĐŸĐ±Đ”ĐœĐœĐŸŃŃ‚Đž эĐșŃĐżĐ»ŃƒĐ°Ń‚Đ°Ń†ĐžĐž / АлДĐșсДĐč Đ Đ°ĐłĐŸĐ·ĐžĐœ (Đ”ĐŸĐčчД Đ‘Đ°ĐœĐș)Java Đž Linux — ĐŸŃĐŸĐ±Đ”ĐœĐœĐŸŃŃ‚Đž эĐșŃĐżĐ»ŃƒĐ°Ń‚Đ°Ń†ĐžĐž / АлДĐșсДĐč Đ Đ°ĐłĐŸĐ·ĐžĐœ (Đ”ĐŸĐčчД Đ‘Đ°ĐœĐș)
Java Đž Linux — ĐŸŃĐŸĐ±Đ”ĐœĐœĐŸŃŃ‚Đž эĐșŃĐżĐ»ŃƒĐ°Ń‚Đ°Ń†ĐžĐž / АлДĐșсДĐč Đ Đ°ĐłĐŸĐ·ĐžĐœ (Đ”ĐŸĐčчД Đ‘Đ°ĐœĐș)
 
Mastering java in containers - MadridJUG
Mastering java in containers - MadridJUGMastering java in containers - MadridJUG
Mastering java in containers - MadridJUG
 
Devoxx France 2018 : Mes Applications en Production sur Kubernetes
Devoxx France 2018 : Mes Applications en Production sur KubernetesDevoxx France 2018 : Mes Applications en Production sur Kubernetes
Devoxx France 2018 : Mes Applications en Production sur Kubernetes
 
Java performance tuning
Java performance tuningJava performance tuning
Java performance tuning
 
Jug Lugano - Scale over the limits
Jug Lugano - Scale over the limitsJug Lugano - Scale over the limits
Jug Lugano - Scale over the limits
 
ContainerWorkloadwithSemeru.pdf
ContainerWorkloadwithSemeru.pdfContainerWorkloadwithSemeru.pdf
ContainerWorkloadwithSemeru.pdf
 
Jvm Performance Tunning
Jvm Performance TunningJvm Performance Tunning
Jvm Performance Tunning
 
Jvm Performance Tunning
Jvm Performance TunningJvm Performance Tunning
Jvm Performance Tunning
 
7 jvm-arguments-Confoo
7 jvm-arguments-Confoo7 jvm-arguments-Confoo
7 jvm-arguments-Confoo
 
Spark 2.x Troubleshooting Guide
Spark 2.x Troubleshooting GuideSpark 2.x Troubleshooting Guide
Spark 2.x Troubleshooting Guide
 
Efficient Memory and Thread Management in Highly Parallel Java Applications
Efficient Memory and Thread Management in Highly Parallel Java ApplicationsEfficient Memory and Thread Management in Highly Parallel Java Applications
Efficient Memory and Thread Management in Highly Parallel Java Applications
 
16 ARTIFACTS TO CAPTURE WHEN YOUR CONTAINER APPLICATION IS IN TROUBLE
16 ARTIFACTS TO CAPTURE WHEN YOUR CONTAINER APPLICATION IS IN TROUBLE16 ARTIFACTS TO CAPTURE WHEN YOUR CONTAINER APPLICATION IS IN TROUBLE
16 ARTIFACTS TO CAPTURE WHEN YOUR CONTAINER APPLICATION IS IN TROUBLE
 
Rails Engine | Modular application
Rails Engine | Modular applicationRails Engine | Modular application
Rails Engine | Modular application
 
Scalr Demo
Scalr DemoScalr Demo
Scalr Demo
 
State of Java Elasticity. Tuning Java Efficiency - GIDS.JAVA LIVE 2020
State of Java Elasticity. Tuning Java Efficiency - GIDS.JAVA LIVE 2020State of Java Elasticity. Tuning Java Efficiency - GIDS.JAVA LIVE 2020
State of Java Elasticity. Tuning Java Efficiency - GIDS.JAVA LIVE 2020
 
10 examples of hot spot jvm options in java
10 examples of hot spot jvm options in java10 examples of hot spot jvm options in java
10 examples of hot spot jvm options in java
 
Running your Java EE 6 applications in the Cloud (FISL 12)
Running your Java EE 6 applications in the Cloud (FISL 12)Running your Java EE 6 applications in the Cloud (FISL 12)
Running your Java EE 6 applications in the Cloud (FISL 12)
 
Classloader leak detection in websphere application server
Classloader leak detection in websphere application serverClassloader leak detection in websphere application server
Classloader leak detection in websphere application server
 
Master your java_applications_in_kubernetes
Master your java_applications_in_kubernetesMaster your java_applications_in_kubernetes
Master your java_applications_in_kubernetes
 

Mehr von HostedbyConfluent

Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Renaming a Kafka Topic | Kafka Summit London
Renaming a Kafka Topic | Kafka Summit LondonRenaming a Kafka Topic | Kafka Summit London
Renaming a Kafka Topic | Kafka Summit LondonHostedbyConfluent
 
Evolution of NRT Data Ingestion Pipeline at Trendyol
Evolution of NRT Data Ingestion Pipeline at TrendyolEvolution of NRT Data Ingestion Pipeline at Trendyol
Evolution of NRT Data Ingestion Pipeline at TrendyolHostedbyConfluent
 
Ensuring Kafka Service Resilience: A Dive into Health-Checking Techniques
Ensuring Kafka Service Resilience: A Dive into Health-Checking TechniquesEnsuring Kafka Service Resilience: A Dive into Health-Checking Techniques
Ensuring Kafka Service Resilience: A Dive into Health-Checking TechniquesHostedbyConfluent
 
Exactly-once Stream Processing with Arroyo and Kafka
Exactly-once Stream Processing with Arroyo and KafkaExactly-once Stream Processing with Arroyo and Kafka
Exactly-once Stream Processing with Arroyo and KafkaHostedbyConfluent
 
Fish Plays Pokemon | Kafka Summit London
Fish Plays Pokemon | Kafka Summit LondonFish Plays Pokemon | Kafka Summit London
Fish Plays Pokemon | Kafka Summit LondonHostedbyConfluent
 
Tiered Storage 101 | Kafla Summit London
Tiered Storage 101 | Kafla Summit LondonTiered Storage 101 | Kafla Summit London
Tiered Storage 101 | Kafla Summit LondonHostedbyConfluent
 
Building a Self-Service Stream Processing Portal: How And Why
Building a Self-Service Stream Processing Portal: How And WhyBuilding a Self-Service Stream Processing Portal: How And Why
Building a Self-Service Stream Processing Portal: How And WhyHostedbyConfluent
 
From the Trenches: Improving Kafka Connect Source Connector Ingestion from 7 ...
From the Trenches: Improving Kafka Connect Source Connector Ingestion from 7 ...From the Trenches: Improving Kafka Connect Source Connector Ingestion from 7 ...
From the Trenches: Improving Kafka Connect Source Connector Ingestion from 7 ...HostedbyConfluent
 
Future with Zero Down-Time: End-to-end Resiliency with Chaos Engineering and ...
Future with Zero Down-Time: End-to-end Resiliency with Chaos Engineering and ...Future with Zero Down-Time: End-to-end Resiliency with Chaos Engineering and ...
Future with Zero Down-Time: End-to-end Resiliency with Chaos Engineering and ...HostedbyConfluent
 
Navigating Private Network Connectivity Options for Kafka Clusters
Navigating Private Network Connectivity Options for Kafka ClustersNavigating Private Network Connectivity Options for Kafka Clusters
Navigating Private Network Connectivity Options for Kafka ClustersHostedbyConfluent
 
Apache Flink: Building a Company-wide Self-service Streaming Data Platform
Apache Flink: Building a Company-wide Self-service Streaming Data PlatformApache Flink: Building a Company-wide Self-service Streaming Data Platform
Apache Flink: Building a Company-wide Self-service Streaming Data PlatformHostedbyConfluent
 
Explaining How Real-Time GenAI Works in a Noisy Pub
Explaining How Real-Time GenAI Works in a Noisy PubExplaining How Real-Time GenAI Works in a Noisy Pub
Explaining How Real-Time GenAI Works in a Noisy PubHostedbyConfluent
 
TL;DR Kafka Metrics | Kafka Summit London
TL;DR Kafka Metrics | Kafka Summit LondonTL;DR Kafka Metrics | Kafka Summit London
TL;DR Kafka Metrics | Kafka Summit LondonHostedbyConfluent
 
A Window Into Your Kafka Streams Tasks | KSL
A Window Into Your Kafka Streams Tasks | KSLA Window Into Your Kafka Streams Tasks | KSL
A Window Into Your Kafka Streams Tasks | KSLHostedbyConfluent
 
Mastering Kafka Producer Configs: A Guide to Optimizing Performance
Mastering Kafka Producer Configs: A Guide to Optimizing PerformanceMastering Kafka Producer Configs: A Guide to Optimizing Performance
Mastering Kafka Producer Configs: A Guide to Optimizing PerformanceHostedbyConfluent
 
Data Contracts Management: Schema Registry and Beyond
Data Contracts Management: Schema Registry and BeyondData Contracts Management: Schema Registry and Beyond
Data Contracts Management: Schema Registry and BeyondHostedbyConfluent
 
Code-First Approach: Crafting Efficient Flink Apps
Code-First Approach: Crafting Efficient Flink AppsCode-First Approach: Crafting Efficient Flink Apps
Code-First Approach: Crafting Efficient Flink AppsHostedbyConfluent
 
Debezium vs. the World: An Overview of the CDC Ecosystem
Debezium vs. the World: An Overview of the CDC EcosystemDebezium vs. the World: An Overview of the CDC Ecosystem
Debezium vs. the World: An Overview of the CDC EcosystemHostedbyConfluent
 
Beyond Tiered Storage: Serverless Kafka with No Local Disks
Beyond Tiered Storage: Serverless Kafka with No Local DisksBeyond Tiered Storage: Serverless Kafka with No Local Disks
Beyond Tiered Storage: Serverless Kafka with No Local DisksHostedbyConfluent
 

Mehr von HostedbyConfluent (20)

Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Renaming a Kafka Topic | Kafka Summit London
Renaming a Kafka Topic | Kafka Summit LondonRenaming a Kafka Topic | Kafka Summit London
Renaming a Kafka Topic | Kafka Summit London
 
Evolution of NRT Data Ingestion Pipeline at Trendyol
Evolution of NRT Data Ingestion Pipeline at TrendyolEvolution of NRT Data Ingestion Pipeline at Trendyol
Evolution of NRT Data Ingestion Pipeline at Trendyol
 
Ensuring Kafka Service Resilience: A Dive into Health-Checking Techniques
Ensuring Kafka Service Resilience: A Dive into Health-Checking TechniquesEnsuring Kafka Service Resilience: A Dive into Health-Checking Techniques
Ensuring Kafka Service Resilience: A Dive into Health-Checking Techniques
 
Exactly-once Stream Processing with Arroyo and Kafka
Exactly-once Stream Processing with Arroyo and KafkaExactly-once Stream Processing with Arroyo and Kafka
Exactly-once Stream Processing with Arroyo and Kafka
 
Fish Plays Pokemon | Kafka Summit London
Fish Plays Pokemon | Kafka Summit LondonFish Plays Pokemon | Kafka Summit London
Fish Plays Pokemon | Kafka Summit London
 
Tiered Storage 101 | Kafla Summit London
Tiered Storage 101 | Kafla Summit LondonTiered Storage 101 | Kafla Summit London
Tiered Storage 101 | Kafla Summit London
 
Building a Self-Service Stream Processing Portal: How And Why
Building a Self-Service Stream Processing Portal: How And WhyBuilding a Self-Service Stream Processing Portal: How And Why
Building a Self-Service Stream Processing Portal: How And Why
 
From the Trenches: Improving Kafka Connect Source Connector Ingestion from 7 ...
From the Trenches: Improving Kafka Connect Source Connector Ingestion from 7 ...From the Trenches: Improving Kafka Connect Source Connector Ingestion from 7 ...
From the Trenches: Improving Kafka Connect Source Connector Ingestion from 7 ...
 
Future with Zero Down-Time: End-to-end Resiliency with Chaos Engineering and ...
Future with Zero Down-Time: End-to-end Resiliency with Chaos Engineering and ...Future with Zero Down-Time: End-to-end Resiliency with Chaos Engineering and ...
Future with Zero Down-Time: End-to-end Resiliency with Chaos Engineering and ...
 
Navigating Private Network Connectivity Options for Kafka Clusters
Navigating Private Network Connectivity Options for Kafka ClustersNavigating Private Network Connectivity Options for Kafka Clusters
Navigating Private Network Connectivity Options for Kafka Clusters
 
Apache Flink: Building a Company-wide Self-service Streaming Data Platform
Apache Flink: Building a Company-wide Self-service Streaming Data PlatformApache Flink: Building a Company-wide Self-service Streaming Data Platform
Apache Flink: Building a Company-wide Self-service Streaming Data Platform
 
Explaining How Real-Time GenAI Works in a Noisy Pub
Explaining How Real-Time GenAI Works in a Noisy PubExplaining How Real-Time GenAI Works in a Noisy Pub
Explaining How Real-Time GenAI Works in a Noisy Pub
 
TL;DR Kafka Metrics | Kafka Summit London
TL;DR Kafka Metrics | Kafka Summit LondonTL;DR Kafka Metrics | Kafka Summit London
TL;DR Kafka Metrics | Kafka Summit London
 
A Window Into Your Kafka Streams Tasks | KSL
A Window Into Your Kafka Streams Tasks | KSLA Window Into Your Kafka Streams Tasks | KSL
A Window Into Your Kafka Streams Tasks | KSL
 
Mastering Kafka Producer Configs: A Guide to Optimizing Performance
Mastering Kafka Producer Configs: A Guide to Optimizing PerformanceMastering Kafka Producer Configs: A Guide to Optimizing Performance
Mastering Kafka Producer Configs: A Guide to Optimizing Performance
 
Data Contracts Management: Schema Registry and Beyond
Data Contracts Management: Schema Registry and BeyondData Contracts Management: Schema Registry and Beyond
Data Contracts Management: Schema Registry and Beyond
 
Code-First Approach: Crafting Efficient Flink Apps
Code-First Approach: Crafting Efficient Flink AppsCode-First Approach: Crafting Efficient Flink Apps
Code-First Approach: Crafting Efficient Flink Apps
 
Debezium vs. the World: An Overview of the CDC Ecosystem
Debezium vs. the World: An Overview of the CDC EcosystemDebezium vs. the World: An Overview of the CDC Ecosystem
Debezium vs. the World: An Overview of the CDC Ecosystem
 
Beyond Tiered Storage: Serverless Kafka with No Local Disks
Beyond Tiered Storage: Serverless Kafka with No Local DisksBeyond Tiered Storage: Serverless Kafka with No Local Disks
Beyond Tiered Storage: Serverless Kafka with No Local Disks
 

KĂŒrzlich hochgeladen

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Principled Technologies
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vĂĄzquez
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 

KĂŒrzlich hochgeladen (20)

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 

What to do if Your Kafka Streams App Gets OOMKilled? with Andrey Serebryanskiy

  • 1. What to Do if Your Kafka Streams App Gets OOMKilled? Andrey Serebryanskiy
  • 2. { Andrey Serebryanskiy Streaming Platform Owner at Raiffeisen Bank What to Do if Your Kafka Streams App Gets OOMKilled?
  • 3. The problem 3 Kafka Kafka Streams App kubernetes RocksDB
  • 4. What is the problem with this app?
  • 5. Launch with resource limits 5 helm/templates/deployment.yaml ... resources: limits: memory: 256Mi requests: memory: 128Mi command: - java args: - -jar - app.jar ...
  • 6. How to check if it is OOMKilled? 6 kubectl describe pod your-pod-name -n your-namespace Name: your-pod-name ... Containers: app: ... Last State: Terminated Reason: OOMKilled Exit Code: 137
  • 8. Example app 8 Simple Kafka Streams topology Application.java public static void main(String[] args) { var builder = new StreamsBuilder(); var stream = builder.stream(INPUT_TOPIC); builder.addStateStore(Stores.keyValueStoreBuilder( Stores.persistentKeyValueStore(STATE_STORE_NAME)); var persistedStream = stream.transformValues((readOnlyKey, val) -> { ... stateStore.put(readOnlyKey, val); ... }, STATE_STORE_NAME); persistedStream.foreach((key, val) -> ...); var topology = builder.build(); var kafkaStreams = new KafkaStreams(topology); runApp(kafkaStreams); }
  • 9. Example app 9 Simple Kafka Streams topology Application.java public static void main(String[] args) { var builder = new StreamsBuilder(); var stream = builder.stream(INPUT_TOPIC); builder.addStateStore(Stores.keyValueStoreBuilder( Stores.persistentKeyValueStore(STATE_STORE_NAME)); var persistedStream = stream.transformValues((readOnlyKey, val) -> { ... stateStore.put(readOnlyKey, val); ... }, STATE_STORE_NAME); persistedStream.foreach((key, val) -> ...); var topology = builder.build(); var kafkaStreams = new KafkaStreams(topology); runApp(kafkaStreams); }
  • 10. Example app 10 Simple Kafka Streams topology Application.java public static void main(String[] args) { var builder = new StreamsBuilder(); var stream = builder.stream(INPUT_TOPIC); builder.addStateStore(Stores.keyValueStoreBuilder( Stores.persistentKeyValueStore(STATE_STORE_NAME)); var persistedStream = stream.transformValues((readOnlyKey, val) -> { ... stateStore.put(readOnlyKey, val); ... }, STATE_STORE_NAME); persistedStream.foreach((key, val) -> logMessageCount()); var topology = builder.build(); var kafkaStreams = new KafkaStreams(topology); runApp(kafkaStreams); }
  • 11. Example app 11 Simple Kafka Streams topology Application.java public static void main(String[] args) { var builder = new StreamsBuilder(); var stream = builder.stream(INPUT_TOPIC); builder.addStateStore(Stores.keyValueStoreBuilder( Stores.persistentKeyValueStore(STATE_STORE_NAME)); var persistedStream = stream.transformValues((readOnlyKey, val) -> { ... stateStore.put(readOnlyKey, val); ... }, STATE_STORE_NAME); persistedStream.foreach((key, val) -> logMessageCount()); var topology = builder.build(); var kafkaStreams = new KafkaStreams(topology); runApp(kafkaStreams); }
  • 12. Example app 12 Simple Kafka Streams topology Application.java public static void main(String[] args) { ... runApp(kafkaStreams); } Please find full application code here: https://github.com/a-serebryanskiy/kafka-streams-oom-killed
  • 13. So you have your app OOMKilled
  • 14. Launch with resource limits 14 helm/templates/deployment.yaml ... resources: limits: memory: 256Mi requests: memory: 128Mi command: - java args: - -jar - app.jar ...
  • 15. Let’s add heap limits 15 helm/templates/deployment.yaml ... resources: limits: memory: 256Mi requests: memory: 128Mi command: - java args: - -XshowSettings:VM - -XX:MinRAMPercentage=50.0 - -jar - app.jar ...
  • 16. Let’s add heap limits 16 helm/templates/deployment.yaml ... resources: limits: memory: 256Mi requests: memory: 128Mi command: - java args: - -XshowSettings:VM - -XX:MinRAMPercentage=50.0 - -jar - app.jar ... https://www.baeldung.com/java-jvm-parameters-rampercentage VM settings: Max. Heap Size (Estimated): 121.81M Property settings: java.version = 11.0.12 Turns out 50.0 is already a default value
  • 17. App memory performance 17 Taken from grafana container memory limit container memory usage jvm memory 100 mb
  • 19. Kafka Streams app memory 19 JVM Heap + RocksDB Confluent article about Kafka Streams memory tunning: https://docs.confluent.io/platform/current/streams/developer-guide/memory-mgmt.html State Store Kafka Streams App put(key, val)
  • 20. Kafka Streams app memory 20 JVM Heap + RocksDB Kafka Streams App CachingKeyValueStore - ThreadCache context.cache() Indexes bloom filters block cache OS page cache memtable State Store - RocksDB ! These items size depends on number of unique keys JVM Heap Not controlled by JVM RocksDB memory details: https://github.com/facebook/rocksdb/wiki/Memory-usage-in-RocksDB put(key, val) native put(key, val)
  • 21. How to fix unbounded RocksDB memory usage? 21 Application.java properties.put(StreamsConfig.ROCKSDB_CONFIG_SETTER_CLASS_CONFIG, ”your.package.BoundedMemoryRocksDBConfig"); your.package.BoundedMemoryRocksDBConfig.java @Override public void setConfig(..., Options options, ...) { BlockBasedTableConfig tableConfig = options.tableFormatConfig(); Cache cache = new LRUCache(computeTotalRocksDbMem(), -1, false); tableConfig.setBlockCache(cache); tableConfig.setCacheIndexAndFilterBlocks(true); options.setWriteBufferManager(writeBufferManager); ... }
  • 22. How to fix unbounded RocksDB memory usage? 22 Application.java properties.put(StreamsConfig.ROCKSDB_CONFIG_SETTER_CLASS_CONFIG, ”your.package.BoundedMemoryRocksDBConfig"); your.package.BoundedMemoryRocksDBConfig.java @Override public void setConfig(..., Options options, ...) { BlockBasedTableConfig tableConfig = options.tableFormatConfig(); Cache cache = new LRUCache(computeTotalRocksDbMem(), -1, false); tableConfig.setBlockCache(cache); tableConfig.setCacheIndexAndFilterBlocks(true); options.setWriteBufferManager(writeBufferManager); ... }
  • 23. How to fix unbounded RocksDB memory usage? 23 Application.java properties.put(StreamsConfig.ROCKSDB_CONFIG_SETTER_CLASS_CONFIG, ”your.package.BoundedMemoryRocksDBConfig"); your.package.BoundedMemoryRocksDBConfig.java @Override public void setConfig(..., Options options, ...) { BlockBasedTableConfig tableConfig = options.tableFormatConfig(); Cache cache = new LRUCache(computeTotalRocksDbMem(), -1, false); tableConfig.setBlockCache(cache); tableConfig.setCacheIndexAndFilterBlocks(true); } Pay attention to the number of stores and partitions: https://docs.confluent.io/platform/current/streams/developer-guide/memory-mgmt.html#rocksdb
  • 24. How to compute my RocksDB memory?
  • 25. Dynamic memory allocation 25 your.package.BoundedMemoryRocksDBConfig.java private static long computeTotalRocksDbMem() { long totalContainerMemoryBytes = getEnv("CONTAINER_MEMORY_LIMIT")); double osPercentage = getEnv("OS_MEMORY_PERCENTAGE")); long offHeapSizeMb = getEnv("OFF_HEAP_SIZE_MB")); long maxHeapSizeMb = getEnv("MAX_HEAP_SIZE_MB")); long jvmMemoryBytes = (offHeapSizeMb + maxHeapSizeMb) * 1024 * 1024; return totalContainerMemoryBytes * (1 - osPercentage)) - jvmMemoryBytes; }
  • 26. Dynamic memory allocation 26 your.package.BoundedMemoryRocksDBConfig.java private static long computeTotalRocksDbMem() { long totalContainerMemoryBytes = getEnv("CONTAINER_MEMORY_LIMIT")); double osPercentage = getEnv("OS_MEMORY_PERCENTAGE")); long offHeapSizeMb = getEnv("OFF_HEAP_SIZE_MB")); long maxHeapSizeMb = getEnv("MAX_HEAP_SIZE_MB")); long jvmMemoryBytes = (offHeapSizeMb + maxHeapSizeMb) * 1024 * 1024; return totalContainerMemoryBytes * (1 - osPercentage)) - jvmMemoryBytes; }
  • 27. Dynamic memory allocation 27 About using container props as env vars: https://kubernetes.io/docs/tasks/inject-data-application/environment-variable-expose-pod-information/ helm/templates/deployment.yaml ... env: - name: CONTAINER_MEMORY_LIMIT valueFrom: resourceFieldRef: containerName: app resource: limits.memory ...
  • 28. Dynamic memory allocation 28 your.package.BoundedMemoryRocksDBConfig.java private static long computeTotalRocksDbMem() { long totalContainerMemoryBytes = getEnv("CONTAINER_MEMORY_LIMIT")); double osPercentage = getEnv("OS_MEMORY_PERCENTAGE")); long offHeapSizeMb = getEnv("OFF_HEAP_SIZE_MB")); long maxHeapSizeMb = getEnv("MAX_HEAP_SIZE_MB")); long jvmMemoryBytes = (offHeapSizeMb + maxHeapSizeMb) * 1024 * 1024; return totalContainerMemoryBytes * (1 - osPercentage)) - jvmMemoryBytes; }
  • 29. Dynamic memory allocation 29 helm/templates/deployment.yaml env: - name: OS_MEMORY_PERCENTAGE value: "0.1" - name: OFF_HEAP_SIZE_MB value: "128" - name: MAX_HEAP_SIZE_MB value: "{{ .Values.heapSizeMb }}"
  • 30. Dynamic memory allocation 30 your.package.BoundedMemoryRocksDBConfig.java private static long computeTotalRocksDbMem() { long totalContainerMemoryBytes = getEnv("CONTAINER_MEMORY_LIMIT")); double osPercentage = getEnv("OS_MEMORY_PERCENTAGE")); long offHeapSizeMb = getEnv("OFF_HEAP_SIZE_MB")); long maxHeapSizeMb = getEnv("MAX_HEAP_SIZE_MB")); long jvmMemoryBytes = (offHeapSizeMb + maxHeapSizeMb) * 1024 * 1024; return totalContainerMemoryBytes * (1 - osPercentage)) - jvmMemoryBytes; }
  • 31. Dynamic memory allocation 31 helm/templates/deployment.yaml env: - name: OS_MEMORY_PERCENTAGE value: "0.1" # computed it based on the jcmd output - name: OFF_HEAP_SIZE_MB value: "128" - name: MAX_HEAP_SIZE_MB value: "{{ .Values.heapSizeMb }}"
  • 32. If you would like to analyze non-heap JVM mem 32 1. Make sure you use JDK (not JRE) Docker image 2. Add to JVM args -XX:NativeMemoryTracking=summary 3. Execute command in container shell: helm/templates/deployment.yaml command: - java args: - -XX:NativeMemoryTracking=summary - -jar - app.jar bash kubectl exec pod/your-pod-name -n your-namespace –it -- /bin/bash -c “jcmd 1 VM.native_memory”
  • 33. Dynamic memory allocation 33 your.package.BoundedMemoryRocksDBConfig.java private static long computeTotalRocksDbMem() { long totalContainerMemoryBytes = getEnv("CONTAINER_MEMORY_LIMIT")); double osPercentage = getEnv("OS_MEMORY_PERCENTAGE")); long offHeapSizeMb = getEnv("OFF_HEAP_SIZE_MB")); long maxHeapSizeMb = getEnv("MAX_HEAP_SIZE_MB")); long jvmMemoryBytes = (offHeapSizeMb + maxHeapSizeMb) * 1024 * 1024; return totalContainerMemoryBytes * (1 - osPercentage)) - jvmMemoryBytes; }
  • 34. Dynamic memory allocation 34 helm/templates/deployment.yaml env: - name: OFF_HEAP_SIZE_MB value: "128" - name: MAX_HEAP_SIZE_MB value: "{{ .Values.heapSizeMb }}” args: - -Xmx{{ .Values.heapSizeMb }}m - -jar - app.jar helm/values.yaml heapSizeMb: 64
  • 35. If you would like to profile your app 35 1) helm/templates/deployment.yaml command: - java args: - -Dcom.sun.management.jmxremote - -Dcom.sun.management.jmxremote.port=13089 - -Dcom.sun.management.jmxremote.ssl=false - -Dcom.sun.management.jmxremote.local.only=false - -Dcom.sun.management.jmxremote.authenticate=false - -Dcom.sun.management.jmxremote.rmi.port=13089 - -Djava.rmi.server.hostname=localhost - -jar - app.jar ports: - containerPort: 13089 name: jmx protocol: TCP 2) kubectl port-forward pod/your-pod-name -n your-namespace 13089:13089
  • 36. App memory performance (after fix) 36 Taken from grafana
  • 37. Limitations are not the only way! 37
  • 38. Links and materials 38 ‱ How JVM analyze memory inside Docker container– https://merikan.com/2019/04/jvm-in-a-container/#java-10 ‱ How to use jcmd to analyze non-heap memory– https://www.baeldung.com/native-memory-tracking-in-jvm ‱ Why use container_memory_working_set_bytes instead of container_memory_usage_bytes https://blog.freshtracks.io/a-deep-dive-into-kubernetes-metrics-part-3-container-resource-metrics-361c5ee46e6 ‱ How RocksDB store works with Kafka Streams: https://www.confluent.io/blog/how-to-tune-rocksdb-kafka-streams-state-stores-performance/ ‱ Linux memory controller for cgroups https://lwn.net/Articles/432224/