# Recommended DB Buffers and Unicorn Workers

**URL:** https://meta.discourse.org/t/recommended-db-buffers-and-unicorn-workers/110491
**Category:** Self-hosting
**Created:** [March 2, 2019, 3:43am UTC](https://meta.discourse.org/t/recommended-db-buffers-and-unicorn-workers/110491 "2019-03-02T03:43:05Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![foros](https://avatars.discourse-cdn.com/v4/letter/f/db5fbb/32.png) [@foros](https://meta.discourse.org/u/foros)
#### Post date: [March 2, 2019, 3:43am UTC](https://meta.discourse.org/t/recommended-db-buffers-and-unicorn-workers/110491/1 "2019-03-02T03:43:05Z")

</div>

Hi,  
I would like to know if what I got for db buffers and unicorn worker is good for my machine.

So, I have a VM with 4vCPU and 32 RAM. I set db buffers to 8000MB and 10 unicorn workers. Does this setting is good for my VM?

Johnny

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [March 3, 2019, 11:16pm UTC](https://meta.discourse.org/t/recommended-db-buffers-and-unicorn-workers/110491/2 "2019-03-03T23:16:04Z")

</div>

Depends on how big your database is. If you have 500meg database, giving it 8gb of shared buffers is pointless.

---

<div class="post-metadata">

### Author: ![foros](https://avatars.discourse-cdn.com/v4/letter/f/db5fbb/32.png) [@foros](https://meta.discourse.org/u/foros)
#### Post date: [March 4, 2019, 12:02am UTC](https://meta.discourse.org/t/recommended-db-buffers-and-unicorn-workers/110491/3 "2019-03-04T00:02:53Z")

</div>

> [@sam](#):
>
> Depends on how big your database is

I have a 140GB NVMe disk space.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [March 4, 2019, 12:05am UTC](https://meta.discourse.org/t/recommended-db-buffers-and-unicorn-workers/110491/4 "2019-03-04T00:05:02Z")

</div>

I don’t mean to be rude here but

> Sam: What is your petrol gauge at?  
> Johnny: I own a petrol station

---

<div class="post-metadata">

### Author: ![foros](https://avatars.discourse-cdn.com/v4/letter/f/db5fbb/32.png) [@foros](https://meta.discourse.org/u/foros)
#### Post date: [March 4, 2019, 12:10am UTC](https://meta.discourse.org/t/recommended-db-buffers-and-unicorn-workers/110491/5 "2019-03-04T00:10:55Z")

</div>

Lol! All good Sam. So having a 140GB NVMe with 4 CPUs and 32GB or RAM is safe to say that 8GB of shared buffers and 10 unicorn workers is healthy?

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [March 4, 2019, 12:13am UTC](https://meta.discourse.org/t/recommended-db-buffers-and-unicorn-workers/110491/6 "2019-03-04T00:13:27Z")

</div>

Impossible to say anything without knowing real world load you have, where the bottlenecks are, how big your database is and so on.

Go with what the discourse setup script recommends, and if you have performance issues you can report back here with more specifics about your load, database size and so on.

If your forum is just starting out then your database is tiny. Giving it 8 gigs or RAM to keep the DB in memory is not going to make any diff.

---

<div class="post-metadata">

### Author: ![foros](https://avatars.discourse-cdn.com/v4/letter/f/db5fbb/32.png) [@foros](https://meta.discourse.org/u/foros)
#### Post date: [March 4, 2019, 12:14am UTC](https://meta.discourse.org/t/recommended-db-buffers-and-unicorn-workers/110491/7 "2019-03-04T00:14:28Z")

</div>

Got it.. Thanks for your insight.
