# Production optimizations

**URL:** <https://forums.foundationdb.org/t/production-optimizations/601>\
**Category:** Using FoundationDB\
**Created:** [July 30, 2018, 9:18pm UTC](https://forums.foundationdb.org/t/production-optimizations/601 "2018-07-30T21:18:56Z")\
**Posts on this page:** 1\
**Showing post:** 9

<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:** [August 1, 2018, 12:02am UTC](https://forums.foundationdb.org/t/production-optimizations/601/9 "2018-08-01T00:02:56Z")

</div>

> [@ThomasJ](#):
>
> - is it better to have many smaller servers or a few large ones?

What I’d actually suggest optimizing for is a process:disk ratio. 32 processes : 1 disk is probably a bit too much. Doing 1-2 processes per SSD is a thing that I’ve generally seen able to reach saturation of an SSD before, and anything above that just means an increase in disk latency but not throughput.

FDB will, by default, recruit a storage server on every process, so having 32 processes connected in a cluster will, if process classes aren’t specified, mean 32 storage servers all competing for disk accesses.

This advice applies a bit more to bare metal than VMs. I’ve generally only seem VM providers offer you one disk, so in that sense, it’s better to run more VMs that are smaller than fewer larger VMs because that gives you a better process:disk ratio.

> [@ThomasJ](#):
>
> - what is the most optimal configuration for a single server?

Running 1 log per disk, or 2 storage servers per disk, and setting the rest of the processes you might run as stateless will probably give you full throughput, and the best latency.

> [@ThomasJ](#):
>
> - I’m still pretty confused by the [process class](https://apple.github.io/foundationdb/configuration.html#guidelines-for-setting-process-class). Do I set them up manually? Do I let the client/server to decide which ones to dedicate or should I choose them manually?

You would need to set them up manually. Did you already see [this thread](https://forums.foundationdb.org/t/cluster-tuning-cookbook/520)?

Admittedly, these really do need to get easier to use, or preferably not necessary to understand at all to get a well performing FDB cluster. But until then, it helps to specify your cluster layout.

> [@ThomasJ](#):
>
> - It seems like NVME disks may not be optimal for FDB. Is it better to use just SSD?

I would expect NVMe disks to be better for FDB, and by the metrics that FDB, or any database should care about, NVMe drives should be much better. If you do `iotop`, or some equivalent process that can break down disk usage by process, can you double check it is indeed `fdbserver`?

> [@ThomasJ](#):
>
> The transaction logging disk is separate, if you are referring to the log dir

`logdir` is where our textual logs go, but not the transaction log data files. Those still go into datadir. The only way to prevent a storage server being recruited on the same process as a transaction log is to use process classes.

---

_[View the full topic](https://forums.foundationdb.org/t/production-optimizations/601)._
