A quick page on some settings that can affect nwserver performance.

Example: You run NWN as a server, with NWNX, on a machine with 4 cores, and 16GB RAM.

Relevant game options:

        2da-engine-cache-size = 1000
        2da-user-cache-size = 1000
        game-object-cache-size = 20
        threaded-timers-resolution = 1
        use-threaded-timers = true
            clients-required-to-disable = 1
            max-memory-usage = 0.5000000000000000

This essentially will maximise the RAM usage for:

  • 2da caching - the lines 2da-engine-cache-size and 2da-user-cache-size - this should mean any Get2DAString or extensive otherwise uncached base 2das are cached when read once
  • Object caching - the game-object-cache-size is at the maximum of 20 which can store up to 1048576 entries
  • Resman caching - the max-memory-usage is set to 0.5 or 50% of total physical RAM, in this example case 8GB will be assigned. Resman controls which general data files (eg creature and item blueprints, player BICs, or area files, or whatever) are loaded into memory.

It also utilises the most CPU possible:

  • Threads - The only real major use of another thread you can control, use-threaded-timers is enabled and threaded-timers-resolution is set to 1 - for the most performant timer reads. NWN will use a bit of a second thread. Your other cores can be used for the OS and other tasks (eg backups).
  • Power saving disabled - clients-required-to-disable should always be left at 1 and will make the game run continually and never run sleep() commands, meaning 100% CPU usage on one core will occur which can help stop hiccups. You should even on a low spec server never set this above 1.

You will have to monitor performance of the system especially RAM usage under this config. The max-memory-usage may need to be tweaked downwards if the OS and game uses more RAM than expected.


A note that there are a variety of additional log options in nwserver and these should be enabled on a case by case basis, but usually only a test server.

Proper server logging should utilise the NWNX available options.

  • No labels