# Kafka-Elastic search sink connector showing high CPU usage

**URL:** <https://discuss.elastic.co/t/kafka-elastic-search-sink-connector-showing-high-cpu-usage/281043>\
**Category:** Elasticsearch\
**Created:** [August 11, 2021, 11:06am UTC](https://discuss.elastic.co/t/kafka-elastic-search-sink-connector-showing-high-cpu-usage/281043 "2021-08-11T11:06:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kushaq\_flier](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kushaq_flier/32/92837_2.png) [@kushaq\_flier](https://discuss.elastic.co/u/kushaq_flier)\
**Post date:** [August 11, 2021, 11:06am UTC](https://discuss.elastic.co/t/kafka-elastic-search-sink-connector-showing-high-cpu-usage/281043/1 "2021-08-11T11:06:20Z")

</div>

I am using elastic search sink connector in distributed mode(2 instance). With task of 8 and about 20 to 25 topics to be sink’ed to elastic search.

Even when there are no records to sink, the worker java process is showing 100% CPU usage.

The end to end transfer of records is happening properly, but high CPU usage is a concern.

my settings:

connector config  
{  
“name”: “elasticsearch-sink”,  
“config”: {  
“connector.class”: “io.confluent.connect.elasticsearch.ElasticsearchSinkConnector”,  
“tasks.max”: “8”,  
“topics.regex”:"(mytopics\_\d+$)",  
“key.ignore”: “true”,  
“schema.ignore”: “true”,  
“connection.url”: “[http://eshost](http://eshost/):esport”,  
“type.name”: “kafka-connect”  
}  
}

Worker settings:

bootstrap.servers=localhost:9094,localhost:9095  
group.id=test-cluster  
key.converter=org.apache.kafka.connect.storage.StringConverter  
value.converter=org.apache.kafka.connect.json.JsonConverter  
key.converter.schemas.enable=false  
value.converter.schemas.enable=false  
offset.storage.topic=connect-offsets  
offset.storage.replication.factor=3  
config.storage.topic=connect-configs  
config.storage.replication.factor=3  
status.storage.topic=connect-status  
status.storage.replication.factor=3  
status.storage.partitions=8  
rest.port=9034  
plugin.path=/pluginpath  
log4j.rootLogger=DEBUG, stdout

I’m trying it on a server grade setup (64GB RAM and 8 CPU cores) and there is good connectivity to kafka as well as es server.

snapshot of my devsetup:  
The usage using top -p shows CPU utilisation constantly above 22 to 25% even though there are no new records to process, this is a parallel test setup here the number of partitions to listen are little less.

 ![Screenshot 2021-08-11 at 4.35.29 PM](https://us1.discourse-cdn.com/elastic/original/3X/a/3/a32c32b4fd4b178a0ad1980d38b84e2cb265bce8.jpeg)

Any pointers will help.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 8, 2021, 11:07am UTC](https://discuss.elastic.co/t/kafka-elastic-search-sink-connector-showing-high-cpu-usage/281043/2 "2021-09-08T11:07:16Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
