# Influxdb memory issue

**URL:** <https://community.influxdata.com/t/influxdb-memory-issue/15533>\
**Category:** Systems\
**Created:** [August 9, 2020, 8:18am UTC](https://community.influxdata.com/t/influxdb-memory-issue/15533 "2020-08-09T08:18:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![neo1702](https://avatars.discourse-cdn.com/v4/letter/n/d9b06d/32.png) [@neo1702](https://community.influxdata.com/u/neo1702)\
**Post date:** [August 9, 2020, 8:18am UTC](https://community.influxdata.com/t/influxdb-memory-issue/15533/1 "2020-08-09T08:18:24Z")

</div>

is there a way to optimize influxdb other than switching to TSI?  
i am using TSI already it didn’t affect the load(memory usage) much.

---

<div class="post-metadata">

**Author:** ![dgnorton](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/dgnorton/32/40_2.png) [@dgnorton](https://community.influxdata.com/u/dgnorton)\
**Post date:** [August 24, 2020, 4:57pm UTC](https://community.influxdata.com/t/influxdb-memory-issue/15533/2 "2020-08-24T16:57:36Z")

</div>

@neo1702 some general thoughts:

- with `inmem` index, a large number of series can cause high memory usage because the entire index is held in-memory
- with `tsi`, a large number of shards can cause high memory usage because there is an index per shard and part of each shard’s index is held in memory.
- there’s no exact upper limit on number of series with `inmem` or upper limit on number of shards with `tsi` because that’s affected by the amount of memory available. Generally though, I would say \< 10M series with `inmem` and \< 500 shards with `tsi`.

How many series and shards do you have?

---

<div class="post-metadata">

**Author:** ![neo1702](https://avatars.discourse-cdn.com/v4/letter/n/d9b06d/32.png) [@neo1702](https://community.influxdata.com/u/neo1702)\
**Post date:** [August 27, 2020, 3:58pm UTC](https://community.influxdata.com/t/influxdb-memory-issue/15533/3 "2020-08-27T15:58:45Z")

</div>

around 100,000 per day
