well, that’s good to know… tho i could see it being done (just running the OnTickEvent handler in a loop… ** shudder **)
the question here is… if i had 100,000 furnaces or fish traps or grinders or etc… (tick-able objects) and no one was logged in, the server should see very little cpu/gpu activity. also, if a single player where to log into an area way up north with no tickables within 5 grid squares… the server should, likewise, be mostly inactive. if that player started walking towards tickables… at some point he’d come in range of something to turn them on. it could be animal life, tho i’d hope this would have very little impact, or a single fish trap. at that point, having been off for 2 weeks, things would get interesting…
the fish trap, being serviced by one of the threads in a pool of nCore-2 threads, would need to catch up (it had an 3-week supply of bait, let’s say). as it catches up… how many database updates would be needed? i would hope the object would tick on the server which might set a flag for dumping it’s updated list of traits to a database in 1-N seconds. Additional updates to the trait list would just replace the one in the list to be cached out. similarly, the list the object is being held in should be a map keyed by the object-id, which i would hope is an integer and not a string. all this comes together to allow the tickable to tick and have its state saved to the database then passed around to everyone within a grid square. how it’d be passed around would be via a queue of msgs sorted by priority to be sent to the various players in that area… and a few times a second the top packets would be sent over the socket (i’d prefer udp if i were writing it) on a multi-threaded handler in such a way that all packets for the same client would always be handled by the same thread. the number of threads servicing the communications would be 1 or 2 less than the number of cores on the box. done this way, there would be no slow down in processing ticks and the loads on the server would be manageable until a few tens of thousands of tickable objects are present.
of course, we don’t have that today on conan. a mere handful of players with 20-50 benches will drop a server to its knees. as a server dev, that would be embarassing. in a world where a normal desktop and push 1m+ pkts per second and has 8+ cores for processing… 50,000 tickable objects in a single grid square with 1 player logged into that gridsquare should have zero issues. yet, i log into servers where i am alone and everything is dead slow.
WHY is the question.
anyone that’s logged into a modded server with any substantial population for a few months since last wipe has felt it. what’s going on? what’s slowing things down?
i guess one question would be… does the core have a thread pool to run the various objects spread across the world. after that, does it bundle database updates inorder to minimized database updates? are the db queues backlogged? since it seems to slow down over time… could it be related to the event list that just keeps growing?
thoughts?
(sorry about the block of text… the caffeine kicked in)