(Answering in order)
@NWShacker:
How about letting it run at full throttle while capping the CPU utilization for the process?
That’s brilliant! Thanks!
@EzRemake:
So if most people are used to their servers running at 100% all the time, how would someone performance optimize, and how would you even know when you’re ‘breaking the bank’ CPU wise? You could use nwnx profiling, but even if you shave ms off your worst offenders it won’t result in CPU% reductions. It’s hard to know where you’re really at or how much headroom you have, when you’re running at max out the gate.
Are CPU related issues even a realistic worry when it comes to this game, whether running at 100% or not? I’ve run many other game servers, and prioritizing CPU efficiency has always been of top importance, so I find all of this kind of odd.
You need to think of it in terms similar to clientside. When you play an action game, your CPU is likely always at 100%, regardless of the CPU/GPU. What changes with stronger hardware is how many FPS you get, which controls how fast the game reacts to your inputs. Same logic applies to the server - you’re always at 100%, but the actual performance is measured in FPS (‘ticks per second’ in server parlance), and the more of those you get the better your performance.
If you shave some ms somewhere, it’ll be redistributed across everything else, and your ticks-per-second will go up.
@Shadooow:
Switched to Core i3-8109U 3GHz duo core and now im running at 25-30
i3-8109U is an 2core/4thread CPU, which means that if one thread is maxed out it will report as 25%. nwserver is entirely dominated by one thread, but it actually has other threads too that do stuff like the GUI updates or receiving network packages from the players, etc. I’d guess the extra 5% is from those.
@EzRemake
On 1.69 I managed to get about 5% CPU usage from 10 players having massive fights with AoE spells, summons etc.
Remember that “Clients Required To Disable CPU Sleep” setting? You can think of 1.69 as having that set to infinite. So, 1.69 would always sleep for 10ms after every tick. Which means the highest possible ticks-per-second in 1.69 was 100 (ideal), and any activity from your server would lower it. It also means that even when your server is struggling with only 10 ticks per second, it will still report only 90% CPU utilization (because it sleeps 10x10ms).
So, some servers used NWNX to disable that sleep in order to keep the CPU at 100% to get better performance.
If you want 1.69 behavior, just set the ini value higher than your max players.
It took a long time to get that level of optimization, and was reliant on plugins like nwnx_dynres + nwnx_areas, and hacky things like CutsceneGhostEffect on enemies to minimize pathfinding calcs - but sadly most of this isn’t available in EE.
CutsceneGhostEffect
is a cool trick you can still do. However, unloading empty areas does not help nearly as much as one would expect. Objects (creatures, placeables, etc) in empty areas don’t compete for the same time-resources as those within populated areas. Every tick, 98% of the time is dedicated to things in areas that have players, and 2% to those without players (simplification, but close enough). If you remove empty areas, those 2% will still be spent on other stuff, and not on things with players.
EDIT: To elaborate on this last point, the empty areas themselves come from the 98%, but anything within the area comes from the 2%. So if you have an intensive HB script on the area, it’s worth checking if the area is empty and aborting early if so.
Hope this helps…