# Questions about db\_work\_mem

**URL:** <https://meta.discourse.org/t/questions-about-db-work-mem/189757>\
**Category:** Self-hosting\
**Created:** [May 8, 2021, 9:56am UTC](https://meta.discourse.org/t/questions-about-db-work-mem/189757 "2021-05-08T09:56:04Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Don](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/don/32/228726_2.png) [@Don](https://meta.discourse.org/u/Don)\
**Post date:** [May 8, 2021, 9:56am UTC](https://meta.discourse.org/t/questions-about-db-work-mem/189757/1 "2021-05-08T09:56:04Z")

</div>

Hello Everyone,

I have some question about this option. So that is clear this option is commented out by default in `app.yml` and **can improve sorting performance, but adds memory usage per-connection** but what does it mean actually. It depends on how many connections? What is `db_work_mem`? It also sets automatically when install Discourse just like `db_shared_buffers` and `UNICORN_WORKERS`? Is that a safety thing to enable it or advanced?

Now it looks like this: `#db_work_mem: "40MB"`

The server is:  
**Vultr High Frequency Compute 2 vCore, 4096 MB**

Thanks for any response! 🙂

---

_[View the full topic](https://meta.discourse.org/t/questions-about-db-work-mem/189757)._
