TsgcWebSocketServer_HTTPAPIProperties › ThreadPoolSize

ThreadPoolSize Property

Number of worker threads serving the http.sys request queue through IOCP.

Syntax

public int ThreadPoolSize { get; set; }

Default Value

32

Remarks

Sets the size of the IOCP worker pool that dequeues requests from the http.sys kernel queue and dispatches them. The default of 32 is a good match for most workloads; 64 is the recommended upper bound — larger pools rarely help because http.sys itself scales with CPU count. When FineTune.OperatingMode is ompHighPerf, the total concurrent pre-posted receives equals ThreadPoolSize x FineTune.HighPerfAcceptsPerWorker. Must be set before activating the server.

Example


oServer = new TsgcWebSocketServer_HTTPAPI();
oServer.Host = "127.0.0.1";
oServer.Port = 80;
oServer.ThreadPoolSize = 64;
oServer.Active = true;

Back to Properties