# Rasa core performance issues

**URL:** <https://forum.rasa.com/t/rasa-core-performance-issues/8784>\
**Category:** Rasa Open Source\
**Created:** [April 20, 2019, 1:13am UTC](https://forum.rasa.com/t/rasa-core-performance-issues/8784 "2019-04-20T01:13:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ggbond](https://avatars.discourse-cdn.com/v4/letter/g/8e8cbc/32.png) [@ggbond](https://forum.rasa.com/u/ggbond)\
**Post date:** [April 20, 2019, 1:13am UTC](https://forum.rasa.com/t/rasa-core-performance-issues/8784/1 "2019-04-20T01:13:27Z")

</div>

I run into scaling issue recently with my chatbot which uses Rasa stack. I found out that Rasa-core started to slow down during my load test. I tested against it by spawning 100 users constantly interact with my chatbot through a socketio channel. I noticed it spent a lot of time on saving and retrieving data from the Redis tracker store. Most of the transactions took more than 500ms to be completed during my test.

I understand that I can get a better result by scaling up more chatbot instances but 100 users seem like a fairly low traffic to me. I had also gevent monkey-patch my rasa-core instance to allow non-blocking calls but it still takes a long time to process those Redis calls. I am not sure if Rasa-core or Redis is the bottleneck here.

If someone has some ideas on optimizing it, that would be helpful for me. Thanks in advance!

---

<div class="post-metadata">

**Author:** ![ricwo](https://avatars.discourse-cdn.com/v4/letter/r/7ea924/32.png) [@ricwo](https://forum.rasa.com/u/ricwo)\
**Post date:** [May 14, 2019, 10:05am UTC](https://forum.rasa.com/t/rasa-core-performance-issues/8784/2 "2019-05-14T10:05:19Z")

</div>

@ggbond when you spawned your 100 users, at what rate do these users send messages?

> I am not sure if Rasa-core or Redis is the bottleneck here.

Can you try switching to the in-memory tracker store and compare performance?

---

<div class="post-metadata">

**Author:** ![dosapati](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/dosapati/32/1959_2.png) [@dosapati](https://forum.rasa.com/u/dosapati)\
**Post date:** [August 10, 2019, 8:18pm UTC](https://forum.rasa.com/t/rasa-core-performance-issues/8784/3 "2019-08-10T20:18:44Z")

</div>

Its because, as users are sending lots of messages, the tracker objects gets too big with events and serializing and deserializing the tracker around takes too much time.

I did dig deep into the code and able to solve by writing custom TrackerStore,

> ```auto
> class MyCustomRedisTrackerStore(RedisTrackerStore):
> 
> ```

read the existing events and delete the old events and save them back to the store. Hope this helps you too.

---

<div class="post-metadata">

**Author:** ![srinathgnath](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/srinathgnath/32/6846_2.png) [@srinathgnath](https://forum.rasa.com/u/srinathgnath)\
**Post date:** [February 22, 2020, 6:22am UTC](https://forum.rasa.com/t/rasa-core-performance-issues/8784/4 "2020-02-22T06:22:03Z")

</div>

@dosapati Could you please customer tracker store code deleting events.

---

<div class="post-metadata">

**Author:** ![karman1102](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/karman1102/32/9482_2.png) [@karman1102](https://forum.rasa.com/u/karman1102)\
**Post date:** [June 1, 2020, 10:51am UTC](https://forum.rasa.com/t/rasa-core-performance-issues/8784/5 "2020-06-01T10:51:29Z")

</div>

which software/ technique did you use to obtain these results?
