Why Does Epic always make Dedicated Server Single Threaded?

I’ve seen several pieces of code where Epic is making sure to run single threaded on a dedicated server

Why is this so?

/**
 * Return true if we should be running in single threaded mode, ala dedicated server
**/
FORCEINLINE static bool PhysSingleThreadedMode()
{
if (IsRunningDedicatedServer() || FPlatformMisc::NumberOfCores() < 3 || !FPlatformProcess::SupportsMultithreading())
	{
		return true;
	}
	return false;
}

Thanks!

Rama

In a dedicated server environment, you generally will pack many instances onto a single machine.

This code is just making an assumption to make things easier when figuring out where things stand (performance wise) when you haven’t saturated the machine, due to the fact the multi-threading generally doesn’t help much in this situation (so it can give a false sense of security).

It is still useful though in situations where you have a dedicated machine with a single or small number of instances, so we can look at making this an option. Thanks.

“It is still useful though in situations where you have a dedicated machine with a single or small number of instances, so we can look at making this an option. Thanks.”

Thanks for the info John!

:heart:

Rama