Smart chunk management
#11
"The used RAM is static. This means that even when there are few players online, the server would be consuming the same amount of RAM as always." 

I think this isnt bad, because "unused ram is wasted ram" and is only significant if you run multiple servers on one machine and need some kind of load balancer. What do you think about a plugin interface for that? So a plugin can hook in the process of deciding whether to free ran or use more ram and decide eg also based on other data cuberite cannot access (like load on other instances or something, if someone programs that)
Reply
Thanks given by:
#12
This isn't bad at all for dedicated servers. It's bad for a server that is sharing resources with other applications, e.g. a desktop PC.

A plugin interface for changing maxRam would be very easy to implement.
Reply
Thanks given by:
#13
Would a plugin API be useful? When is someone going to run more than one instance of cuberite on the same machine? The only thing which has the information necessary to decide how much RAM we can use is the OS memory allocation subsystem. And that is not exposed at all.
Reply
Thanks given by:
#14
Maybe save the time each chunk was last active. Then the delta (D) between last active time and current time is compared to threshold (T). T should be low (10-30 sec) for chunks not neighboring active chunks and high (120-300 sec) for chunks neighboring active chunk. (it stands to reason chunks neighboring active chunks are more likely to be visited more often.)

When D > T unload, if chunk is "dirty" save and then unload. (so don't distinguish between clean and dirty chunks)

This could ofc be combined with the max ram strategy.
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)