Tune JIT

Tunes LuaJIT parameters to improve server performance by preventing constant GC

Server Moderation and Tools

Download (120 KB)

How do I install this?

Wait, what does it exactly do?

At a base level, this mod implements the same thing as VoxeLibre >0.88.1 and Mineclonia but for other Luanti games, with more configurability for the server operator.

The jit.opt.* API is leveraged in order to modify JIT compiler optimization parameters on server startup. This won't work with LuaJIT 1.x, but if you have a LuaJIT that ancient, most of your server-side performance issues should go away after you upgrade it. The coolest thing is that this mod doesn't have to be in the secure.trusted_mods list in order to apply the parameters.

In @repetitivestrain's words:

Large minetest servers on stock luajit spend most of their globalsteps recording and jit compiling traces that are evicted for exceeding one of the minuscule limits on trace count or mcode size defined by default

The specific parameters that are modified are maxtrace, maxrecord, minstitch and maxmcode. Please refer to this mod's settingtypes.txt and LuaJIT documentation for details.

Will it help with client-side lag?

Unless it was the server's fault, no.

For singleplayer, remember that Luanti just starts up a server under the hood and connects you to it, with the same server/client communication rules and specifics. The only difference is that both server and client are now ran on the same machine, though most likely in different threads.

Mobs freezing and map generation suddenly stopping might get removed, but this won't have any effect on rendering or audio playback.

License

The source code is licensed under 0BSD ("public domain"). See LICENSE file for details.

Reviews

Review

Do you recommend this mod?

  • No reviews, yet.