Multiple instances are supported. Each instance has its own node in the config file.
Setting
Photon Default
Config Default
Description
ConfigName
–
–
Optional "ConfigName" value from config file; if present it will be logged.
ReportOnJob
–
FALSE
Causes Photon to determine if it is running inside a Win32 job object and if so reports on the limits currently imposed.
LogFileLocation
–
Sets the path for logfiles. Default is the location where the server is started. Can be absolute or relative to PhotonSocketServer.exe.
EnablePerformanceCounters
–
TRUE
Determines whether the server will enable its performance counters. The implementation creates a shared memory segment requiring suitable privileges. Set to "false" to run without those privileges.
MaxMessageSize
–
512000
Maximum number of bytes for a UDP, TCP or WebSockets message. If exceeded, the client will be disconnected. Can be overwritten in the appropriate listener.
ShutdownTimeout
–
30000
When a Photon shutdown has not finished after this timeout (in ms), the process is forcibly killed.
DisplayName
–
–
An optional display name for this instance, shown in Photon Control.
TCP
Setting
Photon Default
Config Default
Description
TCPBufferSize
–
4096
The size of buffer used during TCP data transfer. Does not restrict message size. Ideal to have slightly more than the average message size.
TCPBufferAllocatorPoolSize
–
500
The number of buffers used for TCP data transfer kept in the pool for later reuse. Trade-off of speed vs resources.
StreamSocketAllocatorPoolSize
–
250
The number of TCP sockets kept in the pool for later reuse. Trade-off of speed vs resources.
UDP/ENet
Setting
Photon Default
Config Default
Description
DatagramSocketAllocatorPoolSize
–
1000
The number of datagram sockets kept in the pool for later reuse. Trade-off of speed vs resources.
PingIntervalMilliseconds
–
1000
How often a ping is sent from server to client when no data is flowing. A larger value leads to less server load. Defaults to the ENet standard value of 500ms.
DataSendingDelayMilliseconds
5
5
How long the server waits to accumulate more data before sending. Larger values = fewer datagrams but higher latency.
AckSendingDelayMilliseconds
5
5
How long the server waits before sending an ACK, allowing it to piggyback onto a data packet. Doesn't increase latency.
ENETBufferAllocatorPoolSize
–
5000
The number of buffers kept in the pool for later reuse. Trade-off of speed vs resources.
ValidateCRCifPresent
–
FALSE
If enabled, incoming datagrams with an optional CRC value will have their checksum validated. Outbound datagrams to peers created with CRC will also include the CRC value.
MinimumTimeout
5000
5000
Minimum time before an ENet peer's lack of response causes a timeout disconnect. Actual time is determined dynamically per peer based on RTT history.
MaximumTimeout
30000
30000
Maximum time before an ENet peer's lack of response causes a timeout disconnect. Actual time is determined dynamically per peer based on RTT history.
MinimumRetransmitTimeout
200
–
Sets a minimum retransmission time. Low-latency peers may be delayed. Reduces retransmission speed and server load.
MaximumRetransmitTimeout
0
–
Defines the maximum retransmission time. 0 = feature is turned off.
RTTACKAdjustmentTimeout
0
–
When set, the last retransmit-timeout is used (fast resend) instead of last retransmit-timeout×2 if the peer received any data during the period. 0 = feature is turned off.
UDP/ENet Throttling
Setting
Photon Default
Config Default
Description
PerPeerMaxReliableDataInTransit
51200
16384
Maximum amount of reliable data (in bytes) a peer can have in-flight without ACK. Once reached, future reliable data is queued.
PerPeerTransmitRateLimitKBSec
256
256
Maximum data (reliable + unreliable) that can be sent per second (in KB). When reached, reliable data is queued and unreliable data is dropped.
PerPeerTransmitRatePeriodMilliseconds
–
200
How often the transmit rate limit is checked. Smaller = smoother flow; larger = less server resources used.
MaxQueuedDataPerPeer
512000
163840
Maximum amount of reliable data a peer can queue. Once exceeded, future reliable sends return an error code.
Debugging
Setting
Photon Default
Config Default
Description
ProduceDumps
–
TRUE
Enable or disable creation of dump files in case of a crash. Dump files are essential to find issues in the Photon Core.
DumpType
–
Full
Type of crash dumps: "Full", "Maxi", or "Mini". Less information from first to last but also less disk space.
MaxDumpsToProduce
–
10
Maximum number of dump files written. If files are moved or deleted, new ones can be written.
IOPool
Handles all I/O operations such as datagram sending/reception, TCP read completions, etc. Can also handle ENet protocol operations if ENetThreadPool\OnlyDispatchTimers is "true".
Setting
Photon Default
Config Default
Description
NumThreads
–
2
Number of threads for socket I/O. 4–8 tends to be good. If set to 0, uses 2× the number of CPU cores.
ThreadPool
The "Business Logic" thread pool used for all CLR operations.
Setting
Photon Default
Config Default
Description
InitialThreads
–
4
Number of threads the thread pool starts with.
MinThreads
–
4
Minimum number of threads in the pool.
MaxThreads
–
4
Maximum number of threads. If Initial, Min, and Max are the same, the pool is static (more efficient). Dynamic pools grow and shrink as demand changes.
MaxDormantThreads
–
4
Maximum number of dormant (idle) threads. Excess threads will be shut down.
PoolMaintPeriod
–
5000
How often (in ms) the pool is maintained to check on and shut down dormant threads.
DispatchTimeout
–
100
If a work item is dispatched and this many milliseconds pass before a worker picks it up, a new thread may be started.
ENetThreadPool
Used for all ENet protocol operations: deblocking inbound datagrams, ACK handling, retransmission, and ping generation.
Setting
Photon Default
Config Default
Description
InitialThreads
–
2
See ThreadPool.
MinThreads
–
2
See ThreadPool.
MaxThreads
–
2
See ThreadPool.
MaxDormantThreads
–
5
See ThreadPool.
PoolMaintPeriod
–
5000
See ThreadPool.
DispatchTimeout
–
100
See ThreadPool.
OnlyDispatchTimers
–
FALSE
If true, only ENet timer operations use this pool. If false, all ENet protocol operations are dispatched to this pool.
Runtime
Defines the Photon Runtime behavior.
Setting
Photon Default
Config Default
Description
Assembly
PhotonHostRuntime, Culture=neutral
–
The Photon Runtime assembly to use. MUST be signed by the Exit Games Photon Runtime key. PublicKeyToken must NOT be specified.
CLRVersion
–
–
By default, the latest .NET runtime is used. Per instance, allows loading a specific version (e.g. "v4.0" or "v2.0").
EnableMDA
–
FALSE
Enables managed debugging assistants. Configure with a PhotonSocketServer.exe.mda.config file.
Type
PhotonHostRuntime.PhotonDomainManager
The type used as the domain manager. MUST derive from IPhotonDomainManager.