Question about process class

Is a fdbserver allowed to run only one processor? For example, run a proxy or log server.

A single fdbserver process can serve as multiple roles in a cluster. In fact, installing the FoundationDB packages creates a single-process cluster where that one process performs the storage, log, proxy, resolver, master, and cluster controller roles. The recommended production deployment, though, would involve having enough transaction and stateless class processes that your processes don’t have to run multiple roles. It’s also preferable not to have your log processes sharing disks with the storage processes.

If your question was instead whether a single fdbserver process can scale up to use multiple cores, the answer is no, because fdbserver is mostly single-threaded (there are actually a few threads, but all the main activity is done on one). The way to utilize more processor cores in a cluster is to add more fdbserver processes.

Out of curiosity, what are the other threads used for?

Besides the main thread, there is also a thread used for writing the trace logs.

On Linux only, there is a thread that does what we call slow task profiling, where it basically checks in with the main thread to see that it hasn’t been running a single task for too long and logs backtraces if it does.

On Linux and Mac we use libeio for at least some of our asynchronous IO, and it starts several threads.

It also looks like on Windows we optionally start a thread if you want the lifetime of the process to be attached to some parent process (using --parentpid). I think this is being used by the FoundationDB service when installing from the FoundationDB msi.