Completely offload dynmap process?

Smithnc07

New Member
Jul 29, 2019
4
0
0
Background: I run a small server and ever now and then I get reports about slowness/lag/crashes. More often than not, this is traced back to some relation to Dynmap.

I scoured the forums for others having similar problems and found that many of you have also asked similar questions; "How to improve dynmap", "dynmap crashing", "world lags when players explore", etc.
The answer to most of these questions have been:
-pre render the world(s)
-change render settings for quality or timing
-etc

I was hoping to find a way around having to decrease settings/frequency and came across the suggestion for SSHFS and FuseFTP to link two machines by "sharing" a directory. Where as I believe this is the step in the right direction, I hope there is even a further step to completely offload the storage and process for Dynmap to a different machine.

Thoughts: In order to completely offload Dynmap from a machine, one would have to have a copy of the world files on a different machine. For my needs I don't need any of the chat functionality of Dynmap so a one way path is just fine. With that in mind, I would imagine that if I could have sort of method of copying the world data to another machine, that second machine could work on its own and if it did crash or hit a heavy load, the game server would be chugging along just fine. (I happen to have an older server box that currently is just sitting collecting dust. This would be a perfect use for it.)

My first thought was to setup some kinda of rsync, but realized that I wanted something a little more "real time" than having to say set a chron and have rsync run every x minutes.

After searching around I came across lsyncd(https://github.com/axkibe/lsyncd). From my understanding lsyncd watches for changes in a directory and then syncs those up with another system. This sounds like it might just work to setup with the worlds folder and send the data off to my other server box.

I would think that the work load for this would be significantly lower than having Dynmap run(not to mention the storage that Dynmap chews up).

Questions:
- Are any of you familiar with lsyncd?
- Would this be a viable option? Or is there a better option?
- Am I just way off the deep end and being more hopeful than realistic?

Your input and thoughts are much appreciated.
 

DZCreeper

New Member
Jul 29, 2019
1,469
0
1
The basic idea here is that you have a Minecraft server running on both machines. 1 machine would be the server people actually play on. The other would at certain intervals receive a copy of the world, then do a full render on it. This would mean there would be no real time updates, but it would work in theory.
 

Dingham

New Member
Jul 29, 2019
294
0
0
Yeah i though about doing this too, as I miss dynmap. Theory it would work, but it would still tax your server, just less. also would probably increase server wide ping.
 

Haruchai

New Member
Jul 29, 2019
73
0
0
IMO, the first and easiest thing to do is a pre-render. I would use WorldBorder (assuming you're using MCPC+ as your server jar) to set up the size and shape. Then use Dynmap to pre-render. You could probably get away with dynamically updating a 'flat' map (on the other hand, flat maps don't take too long to pre-render, so I'd do both), but a Hi-res 'surface' map takes a bit of time and horse power, so I would definitely pre-render the surface map. (I disable the 'cave' map as it seems to be fairly useless and takes up too much space and too many cycles.) Once complete, use the 'trim' command (WorldBorder and Dynmap world well together in this regard) to get rid of extra stuff. After that, the dynamic rendering isn't too much of a load on the server.

Then there's the Nether and Twilight Forest maps and any mystcraft age....it all adds up. Personally, I block mystcraft ages from being rendered as folks go nuts on creating those things.

I agree with Dingham...your idea would work and it might save a few cycles, but not many. The CPU would still have to ride shotgun over what's being sent to the second box and the HDD would still be spinning to send that data to the second machine. If you set it up that way, let me know how it works as I'm always interested in learning new ways to do things.