# High CPU utilization on master node

**URL:** <https://discuss.elastic.co/t/high-cpu-utilization-on-master-node/290096>\
**Category:** Elasticsearch\
**Created:** [November 24, 2021, 5:22pm UTC](https://discuss.elastic.co/t/high-cpu-utilization-on-master-node/290096 "2021-11-24T17:22:47Z")\
**Posts on this page:** 8\
**Page:** 2

<div class="post-metadata">

**Author:** ![guptaparv-rlr](https://avatars.discourse-cdn.com/v4/letter/g/e47774/32.png) [@guptaparv-rlr](https://discuss.elastic.co/u/guptaparv-rlr)\
**Post date:** [December 2, 2021, 2:50pm UTC](https://discuss.elastic.co/t/high-cpu-utilization-on-master-node/290096/21 "2021-12-02T14:50:34Z")

</div>

I recycled the pods and ran the process again. Can you please have a look at the logs again?

> <https://gist.github.com/guptaparv-rlr/f7ce53f87e0d394205fa935011425fa4>

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [December 2, 2021, 5:10pm UTC](https://discuss.elastic.co/t/high-cpu-utilization-on-master-node/290096/22 "2021-12-02T17:10:34Z")

</div>

The snapshot started at `2021-12-02T14:41:01,809Z`; you've only shared logs from one data node and they only start at `2021-12-02T14:46:05,544Z`.

---

<div class="post-metadata">

**Author:** ![guptaparv-rlr](https://avatars.discourse-cdn.com/v4/letter/g/e47774/32.png) [@guptaparv-rlr](https://discuss.elastic.co/u/guptaparv-rlr)\
**Post date:** [December 8, 2021, 1:26am UTC](https://discuss.elastic.co/t/high-cpu-utilization-on-master-node/290096/23 "2021-12-08T01:26:44Z")

</div>

Hi @DavidTurner , here are the logs again. The file is huge 308mb and I was unable to create the gist. So have created a repo and uploaded the file there. Would appreciate it if you can look at the logs.

> **[GitHub - guptaparv-rlr/snapshot](https://github.com/guptaparv-rlr/snapshot)**
>
> Contribute to guptaparv-rlr/snapshot development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [December 8, 2021, 7:50am UTC](https://discuss.elastic.co/t/high-cpu-utilization-on-master-node/290096/24 "2021-12-08T07:50:43Z")

</div>

It seems they are too big for Github too, at least it's using some large-file feature that I don't have installed (and won't be spending time installing either):

```nohighlight
$ git clone git@github.com:guptaparv-rlr/snapshot.git
Cloning into 'snapshot'...
remote: Enumerating objects: 5, done.
remote: Counting objects: 100% (5/5), done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 5 (delta 0), reused 5 (delta 0), pack-reused 0
Receiving objects: 100% (5/5), done.
$ ls -al snapshot
total 24
drwxr-xr-x 6 davidturner staff 192 8 Dec 07:48 .
drwxr-xr-x 5 davidturner staff 160 8 Dec 07:48 ..
drwxr-xr-x 12 davidturner staff 384 8 Dec 07:48 .git
-rw-r--r-- 1 davidturner staff 143 8 Dec 07:48 .gitattributes
-rwxr-xr-x 1 davidturner staff 134 8 Dec 07:48 data-1.json
-rwxr-xr-x 1 davidturner staff 131 8 Dec 07:48 master-1.json
$ cat snapshot/data-1.json
version https://git-lfs.github.com/spec/v1
oid sha256:b103a5ac01171adfe54e8ad8a1a8d2af4576b60f2c458e0609ed21eef1b7df52
size 323753450

```

Could you just pick out the time range for the one specific snapshot and then gzip the files first?

---

<div class="post-metadata">

**Author:** ![guptaparv-rlr](https://avatars.discourse-cdn.com/v4/letter/g/e47774/32.png) [@guptaparv-rlr](https://discuss.elastic.co/u/guptaparv-rlr)\
**Post date:** [December 9, 2021, 9:11am UTC](https://discuss.elastic.co/t/high-cpu-utilization-on-master-node/290096/25 "2021-12-09T09:11:40Z")

</div>

I have zipped the files. You should be able to download and view the files now.

Thank you

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [December 9, 2021, 9:57am UTC](https://discuss.elastic.co/t/high-cpu-utilization-on-master-node/290096/26 "2021-12-09T09:57:30Z")

</div>

Looks like it's performing fine, but you've configured ES to split each file into chunks of 32 bytes?

`writeBlob(indices/aGkkRKEdQ4qxP_n3An93tg/0/__dqJn2U4XQpSdpaLa4n8zAw.part1650, stream, 32) - done`

Typical chunk sizes are measured in GBs, not bytes. Uploading a 1MB blob normally takes 50ms or so, but if you divide it into 30000 32-byte chunks then a few milliseconds of per-chunk overhead add up to minutes of wasted time.

---

<div class="post-metadata">

**Author:** ![guptaparv-rlr](https://avatars.discourse-cdn.com/v4/letter/g/e47774/32.png) [@guptaparv-rlr](https://discuss.elastic.co/u/guptaparv-rlr)\
**Post date:** [December 9, 2021, 5:01pm UTC](https://discuss.elastic.co/t/high-cpu-utilization-on-master-node/290096/27 "2021-12-09T17:01:58Z")

</div>

Thanks @DavidTurner. I'm not really sure where I saw the 32 bytes chunk size(maybe somewhere in the docs or github). But I have updated it to the default setting of 64Mb and now the snapshots are back to 1-3s.

Thank you so much for your help. Really grateful.

---

<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:** [January 6, 2022, 5:02pm UTC](https://discuss.elastic.co/t/high-cpu-utilization-on-master-node/290096/28 "2022-01-06T17:02:28Z")

</div>

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

[Previous page](https://discuss.elastic.co/t/high-cpu-utilization-on-master-node/290096.md?page=1)
