# Memory Utilization

**URL:** <https://forum.rasa.com/t/memory-utilization/13303>\
**Category:** Rasa Open Source\
**Created:** [July 22, 2019, 9:51am UTC](https://forum.rasa.com/t/memory-utilization/13303 "2019-07-22T09:51:11Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![A7medBahgat](https://avatars.discourse-cdn.com/v4/letter/a/bbce88/32.png) [@A7medBahgat](https://forum.rasa.com/u/A7medBahgat)\
**Post date:** [July 22, 2019, 9:51am UTC](https://forum.rasa.com/t/memory-utilization/13303/1 "2019-07-22T09:51:12Z")

</div>

I’m using a custom Arabic language model, and this model is relatively large compared to spacy models, so during the training or starting the server, the memory usage increase rapidly, so are there any way to improve the memory utilization in this case specially as long as the nlu server is up?

---

<div class="post-metadata">

**Author:** ![A7medBahgat](https://avatars.discourse-cdn.com/v4/letter/a/bbce88/32.png) [@A7medBahgat](https://forum.rasa.com/u/A7medBahgat)\
**Post date:** [July 22, 2019, 10:19am UTC](https://forum.rasa.com/t/memory-utilization/13303/2 "2019-07-22T10:19:51Z")

</div>

@akelad your help is greatly appreciated, thanks in advance.

---

<div class="post-metadata">

**Author:** ![MetcalfeTom](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/metcalfetom/32/1422_2.png) [@MetcalfeTom](https://forum.rasa.com/u/MetcalfeTom)\
**Post date:** [July 22, 2019, 12:18pm UTC](https://forum.rasa.com/t/memory-utilization/13303/3 "2019-07-22T12:18:39Z")

</div>

Hey @A7medBahgat,

We store the language model in memory before parsing, so that usage is a necessity. What do you mean by “the memory usage increases rapidly” though? It should be fairly static after loading the model into memory.

---

<div class="post-metadata">

**Author:** ![A7medBahgat](https://avatars.discourse-cdn.com/v4/letter/a/bbce88/32.png) [@A7medBahgat](https://forum.rasa.com/u/A7medBahgat)\
**Post date:** [July 22, 2019, 1:09pm UTC](https://forum.rasa.com/t/memory-utilization/13303/4 "2019-07-22T13:09:54Z")

</div>

@MetcalfeTomThanks for the quick reply

I mean, it took too much cuz the model is large so I just wonder if there’s any way like using the model while it’s on the hard disk or something to save some memory

---

<div class="post-metadata">

**Author:** ![MetcalfeTom](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/metcalfetom/32/1422_2.png) [@MetcalfeTom](https://forum.rasa.com/u/MetcalfeTom)\
**Post date:** [July 22, 2019, 4:49pm UTC](https://forum.rasa.com/t/memory-utilization/13303/5 "2019-07-22T16:49:13Z")

</div>

No problem!

Unfortunately that might lead to problems when running in production - the model would be constantly shifting between loaded/unloaded (and besides, inference time slows down too).

The `supervised_embeddings` pipeline is usually more lightweight though. If you want to lower memory usage, I’d invite you to [compare that pipeline against your current Arabic language model](https://rasa.com/docs/rasa/user-guide/evaluating-models/#comparing-nlu-pipelines) and see how it fares in terms of accuracy vs. cost (I’d also love to see the graph from your results if you do so).

---

<div class="post-metadata">

**Author:** ![A7medBahgat](https://avatars.discourse-cdn.com/v4/letter/a/bbce88/32.png) [@A7medBahgat](https://forum.rasa.com/u/A7medBahgat)\
**Post date:** [July 26, 2019, 5:18pm UTC](https://forum.rasa.com/t/memory-utilization/13303/6 "2019-07-26T17:18:58Z")

</div>

@MetcalfeTom

I’m really sorry for replying late, i don’t know what’s wrong but suddenly I don’t receive notifications on my email anymore! any way, thanks for your reply, this is the result of the comparison but keep in mind that both are trained on little data so I think these results may be misleading,

 ![Screenshot%20from%202019-07-26%2019-03-13](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/3/3f91e4d7779be39660a1f5fdafdabbbec5fb4b0a.png)

**and those are the pipelines configuration:**

 ![Screenshot%20from%202019-07-26%2019-18-02](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/e/e4e42e38b4d07471ee1e0f613ec543d0a2ef2e7a.png) ![Screenshot%20from%202019-07-26%2019-17-51](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/6/69b2f316798415d3d60106b37099e6b04185030e.png)
