# Cluster tuning cookbook

**URL:** https://forums.foundationdb.org/t/cluster-tuning-cookbook/520
**Category:** Using FoundationDB
**Created:** [June 19, 2018, 2:35pm UTC](https://forums.foundationdb.org/t/cluster-tuning-cookbook/520 "2018-06-19T14:35:25Z")
**Posts on this page:** 7
**Page:** 2

<div class="post-metadata">

### Author: ![alexmiller](https://sea1.discourse-cdn.com/foundationdb/user_avatar/forums.foundationdb.org/alexmiller/32/326_2.png) [@alexmiller](https://forums.foundationdb.org/u/alexmiller)
#### Post date: [July 2, 2018, 8:42pm UTC](https://forums.foundationdb.org/t/cluster-tuning-cookbook/520/21 "2018-07-02T20:42:48Z")

</div>

> [@KrzysFR](#):
>
> I assume that the convention is that knob `FOO_BAR_BAZ` in Knobs.h will be exposed as `knob_foo_bar_baz` in the .conf file ?

Correct. (In the conf file, and on the command line.)

> [@KrzysFR](#):
>
> I’m using github’s search to look for the places in the code, but I really don’t trust it to be accurate, because all I see is [https://github.com/apple/foundationdb/search?q=SERVER\_MEM\_LIMIT&amp;unscoped\_q=SERVER\_MEM\_LIMIT](https://github.com/apple/foundationdb/search?q=SERVER_MEM_LIMIT&amp;unscoped_q=SERVER_MEM_LIMIT)

That’s correct though. The majority of proxy memory usage comes from processing and handling commits, and SERVER\_MEM\_LIMIT caps that. It is not a generic memory limiting knob though, unlike what its name implies.

---

<div class="post-metadata">

### Author: ![KrzysFR](https://sea1.discourse-cdn.com/foundationdb/user_avatar/forums.foundationdb.org/krzysfr/32/43_2.png) [@KrzysFR](https://forums.foundationdb.org/u/KrzysFR)
#### Post date: [July 3, 2018, 8:24pm UTC](https://forums.foundationdb.org/t/cluster-tuning-cookbook/520/22 "2018-07-03T20:24:44Z")

</div>

Setting `knob_server_mem_limit = ...` in foundationdb.conf does not seem to be supported: the corresponding fdbserver process crashes with `Process="fdbserver.4503": Unrecognized knob option 'server_mem_limit'`

It seems that this particular knob is supposed to be configured via the `--memory` command line argument, which corresponds to the `memory = ...` field in foundationdb.conf. So I think I’m back to square one 🙂

---

<div class="post-metadata">

### Author: ![alexmiller](https://sea1.discourse-cdn.com/foundationdb/user_avatar/forums.foundationdb.org/alexmiller/32/326_2.png) [@alexmiller](https://forums.foundationdb.org/u/alexmiller)
#### Post date: [July 3, 2018, 8:44pm UTC](https://forums.foundationdb.org/t/cluster-tuning-cookbook/520/23 "2018-07-03T20:44:06Z")

</div>

It appears the change that adds `knob_server_mem_limit` isn’t in 5.2, and I forgot that would be a relevant detail for you. 😕

---

<div class="post-metadata">

### Author: ![KrzysFR](https://sea1.discourse-cdn.com/foundationdb/user_avatar/forums.foundationdb.org/krzysfr/32/43_2.png) [@KrzysFR](https://forums.foundationdb.org/u/KrzysFR)
#### Post date: [July 4, 2018, 6:53am UTC](https://forums.foundationdb.org/t/cluster-tuning-cookbook/520/24 "2018-07-04T06:53:36Z")

</div>

Oh, right. And I was also looking at the code in the master branch 🙂

---

<div class="post-metadata">

### Author: ![amirouche](https://sea1.discourse-cdn.com/foundationdb/user_avatar/forums.foundationdb.org/amirouche/32/2096_2.png) [@amirouche](https://forums.foundationdb.org/u/amirouche)
#### Post date: [July 11, 2018, 6:44pm UTC](https://forums.foundationdb.org/t/cluster-tuning-cookbook/520/25 "2018-07-11T18:44:54Z")

</div>

IMO the development part with foundationdb is a breeze but the operation part is daunting. I did not read the implementation details of so that’s maybe why I have a difficult time to understand the conversation around spinning a FDB cluster.

---

<div class="post-metadata">

### Author: ![ajbeamon](https://sea1.discourse-cdn.com/foundationdb/user_avatar/forums.foundationdb.org/ajbeamon/32/13_2.png) [@ajbeamon](https://forums.foundationdb.org/u/ajbeamon)
#### Post date: [September 13, 2018, 4:35pm UTC](https://forums.foundationdb.org/t/cluster-tuning-cookbook/520/26 "2018-09-13T16:35:50Z")

</div>

> [@alexmiller](#):
>
> The storage server page cache knob is --knob\_page\_cache\_4k, that describes the total number of bytes that should be held in the page cache (so divide by 4k to get the number of pages). It turns out that it defaults to 200MB, so it’s likely not going to be helpful to tweak down. (Though we should probably set the default higher in this day and age…)

I believe the default is 2GB, which makes the page cache one of the bigger users of memory. There is also a 64k page cache which is 200MB.

---

<div class="post-metadata">

### Author: ![nikolas.ioannou](https://avatars.discourse-cdn.com/v4/letter/n/5daacb/32.png) [@nikolas.ioannou](https://forums.foundationdb.org/u/nikolas.ioannou)
#### Post date: [February 1, 2019, 12:38pm UTC](https://forums.foundationdb.org/t/cluster-tuning-cookbook/520/27 "2019-02-01T12:38:24Z")

</div>

Hi! I’ve started playing around with FoundationDB with an aim towards understanding its storage engine performance characteristics, and this thread (and the forum in general) is of great help! I’m using a similar test parameter set to test R/W performance (started with a single FDB instance, and single ssd or single memory engines):  
"  
testTitle=RandomReadWriteTest  
testName=ReadWrite  
testDuration=30.0  
transactionsPerSecond=1000000  
readsPerTransactionA=10  
writesPerTransactionA=0  
readsPerTransactionB=0  
writesPerTransactionB=10  
alpha=${rwmix}  
nodeCount=10000000  
valueBytes=100  
"  
However, I needed to increase the nodeCount to 10000000 to get ~1GiB “Sum of key value sizes” as reported in the fdbcli status.

[Previous page](https://forums.foundationdb.org/t/cluster-tuning-cookbook/520.md?page=1)
