# Per-peer memory usage

**URL:** <https://delvingbitcoin.org/t/per-peer-memory-usage/194>\
**Category:** wg-blockrelay\
**Created:** [November 16, 2023, 3:25am UTC](https://delvingbitcoin.org/t/per-peer-memory-usage/194 "2023-11-16T03:25:56Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![mzumsande](https://delvingbitcoin.org/user_avatar/delvingbitcoin.org/mzumsande/32/145_2.png) [@mzumsande](https://delvingbitcoin.org/u/mzumsande)\
**Post date:** [November 30, 2023, 8:19pm UTC](https://delvingbitcoin.org/t/per-peer-memory-usage/194/4 "2023-11-30T20:19:30Z")

</div>

Looks great! Even though the analysis isn’t complete yet (some field not yet accounted for as you mention), I’m just trying to come up with a few high-level takeaways so far.

- Dynamic memory usage per tx-relaying peers is `~600kb - 1.4MB` per tx-relaying peer, a large part of it is probably the rolling bloom filter `m_tx_inventory_known_filter`.
- Block-Relay-Only peers only take up a very small fraction of that memory (\<10kb)
- CNode average memory is small in comparison with Peer on average - however, I’d expect hat there would be large spikes when we send / receive a large message that we haven’t processed yet - these likely wouldn’t be seen in this data.
- CNode memory considerations are mostly independent on whether the connection is block-relay-only or not.

Does this make sense? Any important takeaways so far that I am missing?

---

_[View the full topic](https://delvingbitcoin.org/t/per-peer-memory-usage/194)._
