# Heartbeat Resource Usage

**URL:** https://discuss.elastic.co/t/heartbeat-resource-usage/218168
**Category:** Beats
**Tags:** elastic-stack-monitoring, heartbeat
**Created:** [February 6, 2020, 12:07pm UTC](https://discuss.elastic.co/t/heartbeat-resource-usage/218168 "2020-02-06T12:07:08Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![myatrakos](https://avatars.discourse-cdn.com/v4/letter/m/cdc98d/32.png) [@myatrakos](https://discuss.elastic.co/u/myatrakos)
#### Post date: [February 6, 2020, 12:07pm UTC](https://discuss.elastic.co/t/heartbeat-resource-usage/218168/1 "2020-02-06T12:07:09Z")

</div>

I have setup heartbeat-7.5.1-1 on a Centos 7 VM with 6 vCPUs and 4Gb of memory.

This is the heartbeat.yml config I am using:

```auto
    heartbeat.config.monitors:
      path: ${path.config}/monitors.d/**/*.yml
      reload.enabled: true
      reload.period: 1m
    setup.template.settings:
      index.number_of_shards: 1
      index.codec: best_compression
    name: name-01
    max_procs: 18
    output.logstash:
      hosts: ["host-01"]
      worker: 6
      pipelining: 2
      ssl:
        enabled: true
    processors:
      - add_observer_metadata: 
          geo: 
            name: location-01
    logging.selectors: ["*"]
    monitoring.enabled: true
    monitoring.cluster_uuid: 
    monitoring.elasticsearch:
      hosts: ["host1:9200", "host2:9200", "host3:9200"]
      protocol: "https"
      ssl.verification_mode: none
    http.enabled: true
    http.port: 5066

```

I am monitoring 140 http endpoints using simple configs similar to:

```auto
    - check.response:
        body: pong
        status: 200
      enabled: true
      ipv4: true
      ipv6: false
      mode: any
      name: name-01
      schedule: '@every 1m'
      ssl:
        supported_protocols:
        - TLSv1.0
        - TLSv1.1
        - TLSv1.2
      timeout: 30s
      type: http
      urls:
      - url-01

```

I am having troubles with heartbeat not being able to keep up and not pusing all events into logstash. The heartbeat process consumes all the memory available and eventually runs out of swap space and crashes altogether.

Is this an issue of not having enough resources for that many monitors? Or is it a misconfiguration on my part and if so what should I be adding to heartbeat.yml to get better performance?

---

<div class="post-metadata">

### Author: ![shahzad31](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shahzad31/32/51637_2.png) [@shahzad31](https://discuss.elastic.co/u/shahzad31)
#### Post date: [February 13, 2020, 4:57pm UTC](https://discuss.elastic.co/t/heartbeat-resource-usage/218168/2 "2020-02-13T16:57:23Z")

</div>

@ [myatrakos](https://discuss.elastic.co/u/myatrakos) This has been fixed in 7.6, can you give it a try?

---

<div class="post-metadata">

### Author: ![myatrakos](https://avatars.discourse-cdn.com/v4/letter/m/cdc98d/32.png) [@myatrakos](https://discuss.elastic.co/u/myatrakos)
#### Post date: [February 17, 2020, 6:33am UTC](https://discuss.elastic.co/t/heartbeat-resource-usage/218168/3 "2020-02-17T06:33:35Z")

</div>

Hi @shahzad31, I haven't updated to 7.6 yet, but I will give it a go. I'll post back here with the results, thanks!

---

<div class="post-metadata">

### Author: ![Andrew\_Cholakian1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrew_cholakian1/32/3612_2.png) [@Andrew\_Cholakian1](https://discuss.elastic.co/u/Andrew_Cholakian1)
#### Post date: [February 20, 2020, 3:20am UTC](https://discuss.elastic.co/t/heartbeat-resource-usage/218168/4 "2020-02-20T03:20:45Z")

</div>

Looking forward to hearing if this helps, we dramatically improved memory / CPU utilization in 7.6

---

<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: [March 19, 2020, 3:20am UTC](https://discuss.elastic.co/t/heartbeat-resource-usage/218168/5 "2020-03-19T03:20:53Z")

</div>

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