• Examples (iOS)
• Examples (Java/Android)
• Examples (C++)
Server API Documentation

 

» SFS2X Core Settings

In this article we take a look at a number of low level settings that aren't accessible via the AdminTool and can be used to tweak the SmartFoxServer's engine. These parameters can affect the server's behavior drastically and should be changed only when absolutely necessary.

» Core settings list

The settings are located under the SFS2X/config/ folder in the core.xml file. In the table below we document some (but not all) of the values that can be tweaked. The settings omitted from this list are meant to be left alone.

Param NameDefault valueDescription
maxIncomingRequestSize 500000 (500KB) The max. size of an incoming request expressed in bytes.
sessionPacketQueueSize 150 The max amount of packets that can be buffered for a client. These packets are queued until the client is finally able to read them. When the queue is exceeded packets are dropped.
disconnectOnFullQueue false When set to true the server will disconnect sessions whose packet queue exceeds its capacity. See value above for reference (requires SFS2X 2.20 or higher).
socketWriterThreadPoolSize 3 Can be set to higher values on powerful servers with many cpu/cores (16+ cores), with very high TCP traffic
udpSocketWriterThreadPoolSize 3 Same as above for UDP traffic (requires SFS2X 2.14 or higher)
tcpNoDelay false Reduces the number of small packets by aggregating them but can add latency with a high volume of fast paced packets. In fast realtime games it can be set to true

To activate changes made to core.xml the server must be restarted.