<p>That CPU usage spike is only at most 8% of the CPU capacity, which is extremely small. I get spikes on my laptop CPU of 100% for longer time intervals than the spikes here, when just casually browsing the web.</p>
<p>If anything is being written anywhere on the computer, or anything is happening such as <code>slotMissedNum</code> increasing, I would  expect a CPU usage spike of around the size of the extremely small spikes you're seeing here.</p>
<p>I hope that takes care of the CPU spikes part of the question. If you believe that the increasing of <code>slotMissedNum</code> is a bug, then that's a different matter, for which I'm not immediately able to offer a solution, but that bug can be addressed entirely independently since the CPU spikes do not create any <em><strong>additional</strong></em> concerns.</p>

CC BY-SA 4.0
2021-08-23T22:24:25.477Z
Some of you have pointed out the same problem, what do you think?

https://github.com/input-output-hk/cardano-node/issues/2731
BTBF X-StakePool_XSP
CC BY-SA 4.0
2021-10-15T13:09:08.377Z
To clarify on the above answer, this spike occurs when it rights the state of the ledger in memory to disk at an interval. As the above comment states, it's a very small spike. If we didn't do this periodically, you'd have to rebuild the entire ledger state from scratch every restart of the node.
Samuel Leathers
CC BY-SA 4.0
2021-10-15T18:21:31.940Z
I think you mean, as the above ***answer*** indicates.
Nike Dattani
CC BY-SA 4.0
2021-08-23T19:16:04.677Z
2021-08-23T19:16:04.677Z
Nike Dattani
<p>About once an hour, when <code>TraceLedgerEvent.TookSnapshot</code> is written to the log, there is a CPU spike and at the same time the <code>slotMissedNum</code> is increasing. Is this a bug in the node? Or is there a fix?</p>
<p>cardano-node v1.27.0
CPU 6Core
Mem 16GB
<a href="https://i.sstatic.net/j68lX.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/j68lX.png" alt="enter image description here" /></a></p>

CC BY-SA 4.0
2021-08-23T19:18:46.067Z
+1. Welcome to our new community and thank you so much for contributing your question here! We hope to see much more of you in the future !!! Please take a look at the edits that I suggested since they may improve how well your question is received here.
Nike Dattani
<stake-pool><cardano-node>
There is a CPU spike once per hour when logging "TraceLedgerEvent.TookSnapshot". Is it a bug, or is there a fix?
# There is a CPU spike once per hour when logging "TraceLedgerEvent.TookSnapshot". Is it a bug, or is there a fix?

(Asked by: username_0 on 2021-08-23)

About once an hour, when `TraceLedgerEvent.TookSnapshot` is written to the log, there is a CPU spike and at the same time the `slotMissedNum` is increasing. Is this a bug in the node? Or is there a fix?

cardano-node v1.27.0
CPU 6Core
Mem 16GB
[![enter image description here](https://i.sstatic.net/j68lX.png)](https://i.sstatic.net/j68lX.png)

**Tags:** stake-pool, cardano-node
> **Comments:**
> **username_1**: +1. Welcome to our new community and thank you so much for contributing your question here! We hope to see much more of you in the future !!! Please take a look at the edits that I suggested since they may improve how well your question is received here.  

---

## 1 answers

### Answer by username_1 on 2021-08-23. Score: 2

That CPU usage spike is only at most 8% of the CPU capacity, which is extremely small. I get spikes on my laptop CPU of 100% for longer time intervals than the spikes here, when just casually browsing the web.

If anything is being written anywhere on the computer, or anything is happening such as `slotMissedNum` increasing, I would expect a CPU usage spike of around the size of the extremely small spikes you're seeing here.

I hope that takes care of the CPU spikes part of the question. If you believe that the increasing of `slotMissedNum` is a bug, then that's a different matter, for which I'm not immediately able to offer a solution, but that bug can be addressed entirely independently since the CPU spikes do not create any ***additional*** concerns.

> **Comments:**
> **username_0**: Some of you have pointed out the same problem, what do you think?  https://github.com/input-output-hk/cardano-node/issues/2731  
> **username_2**: To clarify on the above answer, this spike occurs when it rights the state of the ledger in memory to disk at an interval. As the above comment states, it's a very small spike. If we didn't do this periodically, you'd have to rebuild the entire ledger state from scratch every restart of the node.  
> **username_1**: I think you mean, as the above ***answer*** indicates.  

---

