Page 1 of 1

Reducing Server lag

PostPosted: Wed Mar 05, 2014 16:31
by CraigyDavi
Has anyone got any more ideas for reducing server lag?
This is what I have tried already:
- /clearobjects
- Server performance settings
- Choosing lag-free mods
I have also tried a few other smaller things such as limiting amount of players who can join.

The server used to have very little lag but now it has increased a lot, recently and without any new mods being installed.
I have noticed a much larger map file (2GB) and quite a lot more player files which could be increasing the lag.
It is main things like chunks taking ages to load and chat commands taking a lot time to carry out.

I would be much appreciative if anyone could help with a few more ideas :)

PostPosted: Wed Mar 05, 2014 16:45
by Amaz
I remember reading on the topic of the 0gb.us server that 0gb.us managed to reduce the lag by deleting the player files.
https://forum.minetest.net/viewtopic.php?pid=112645#p112645 Actually, I'm not sure that is still applicable...

PostPosted: Wed Mar 05, 2014 16:52
by CraigyDavi
Hybrid Dog wrote:you could use leveldb for the map file, I think


What benifits does leveldb have over sqlite?

Amaz wrote:I remember reading on the topic of the 0gb.us server that 0gb.us managed to reduce the lag by deleting the player files.
https://forum.minetest.net/viewtopic.php?pid=112645#p112645 Actually, I'm not sure that is still applicable...

Maybe that is why...we have 12,000 player files D:
I suppose I could delete ones which are nearly empty.
Thanks for this :)

PostPosted: Wed Mar 05, 2014 17:24
by rubenwardy
Freeminer has better server capacity, providing that you disable weather and other laggy crap like finite liquids.

PostPosted: Wed Mar 05, 2014 17:41
by CraigyDavi
Hybrid Dog wrote:http://en.wikipedia.org/wiki/LevelDB
I think someone already wrote a script to delete empty player files automatically.

Ok. And that would be awesome. Anyone known where I could find it?
rubenwardy wrote:Freeminer has better server capacity, providing that you disable weather and other laggy crap like finite liquids.

Hmmm, porting to freeminer might be quite a challenge and I don't really like some of the other features which cannot be disabled.

PostPosted: Wed Mar 05, 2014 18:23
by CraigyDavi
Clearing player files seems to have done the trick, thanks a lot Amaz.

PostPosted: Wed Mar 05, 2014 18:36
by Amaz
No Problem I'm Glad I could help!

PostPosted: Wed Mar 05, 2014 19:42
by Krock
My server settings (cause total ~3s lag with 12 players):
- edited MoreTrees leafdecay, reduced to 2 abm's (instead of [insert diffrent leaves count here])
- edited liquid updating to 3s, instead of 1
- using LevelDB
- mapgen limits to: x, z from -2000 to 2000, y from -6000 to 300

minetest.conf wrote:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
max_block_generate_distance = 3
max_block_send_distance = 2
max_simultaneous_block_sends_per_client = 5
max_simultaneous_block_sends_server_total = 25

active_block_range = 2
active_object_send_range_blocks = 2
client_unload_unused_data_timeout = 300
server_unload_unused_data_timeout = 28
server_map_save_interval = 90

PostPosted: Wed Mar 05, 2014 20:05
by Krock
Hybrid Dog wrote:
Krock wrote:- mapgen limits to: x, z from -2000 to 2000, y from -6000 to 300
how?

register_on_global_step()
use a loop for ever player and check if that player walked over the limits.

or

register_on_gererated()
and use there a loop

..and teleport them back to 0, 0, 0

PostPosted: Wed Mar 05, 2014 21:23
by CraigyDavi
Thanks Krock! With your settings and the deletion of inactive player files the server now gets less than a second lad even with around 15 players.

PostPosted: Wed Mar 05, 2014 23:12
by proller
freeminer have lag less 1s even with 50 players with default settings...

PostPosted: Thu Mar 06, 2014 19:30
by BrandonReese
proller wrote:freeminer have lag less 1s even with 50 players with default settings...


Default settings and no mods? I switched my server setup over to freeminer for testing and 1 person, max_lag is around 12. That's about the same performance as my minetestserver setup. As I'm typing this freeminerserver is at max_lag 15 with one person online, finite liquids and weather off. minetestserver is at max_lag 13 with 7 people online. So it would seem both servers loaded with mods have similar performance.

PostPosted: Thu Mar 06, 2014 20:41
by rubenwardy
There was over 30 seconds of lag on a server with default mods etc. When I tried a Freeminer server, with 30 people on it.

So: citation needed.

PostPosted: Sat Mar 08, 2014 19:37
by proller
max lag can be big from map save, saving one block on big map can took 5-10s.
Look on average lag and responce time (build-dig, inventory items move)

Re: Reducing Server lag

PostPosted: Wed Apr 27, 2016 21:11
by Milan*
Hi there - i got strange lags with just a few players and a not very loaded server.
How can i remove the playerfiles with just the initial stuff in it?
There are playerfiles from "real" players but they can be over a year old :o

Re: Reducing Server lag

PostPosted: Wed Apr 27, 2016 21:28
by KCoombes
Milan* wrote:(snip)
There are playerfiles from "real" players but they can be over a year old :o


A player that hasn't visited in over a year isn't much of a player - delete them!

Re: Reducing Server lag

PostPosted: Wed Apr 27, 2016 21:36
by Milan*
There are people i personally like(d). I have fear to dont remember names (to safe before delete).
It is possible to check the filecontent but i dont have enough experience with code :(

Re: Reducing Server lag

PostPosted: Fri May 20, 2016 13:33
by Sokomine
KCoombes wrote:A player that hasn't visited in over a year isn't much of a player - delete them!

There are quite a lot of servers I havn't visited for a year, but which I still value highly and where I even have larger buildings standing around.

On servers that use the areas mod, it ought to be easy to figure out who actually protected something instead of merely beeing a tourist and doing some sightseeing. With other protection mods it might be more tricky.

Re:

PostPosted: Fri May 20, 2016 23:39
by Fixerol
BrandonReese wrote:
proller wrote:freeminer have lag less 1s even with 50 players with default settings...


Default settings and no mods? I switched my server setup over to freeminer for testing and 1 person, max_lag is around 12. That's about the same performance as my minetestserver setup. As I'm typing this freeminerserver is at max_lag 15 with one person online, finite liquids and weather off. minetestserver is at max_lag 13 with 7 people online. So it would seem both servers loaded with mods have similar performance.


LoL, max_lag 12? Maybe 1.2 or even 0.12? That is insane :/

Re:

PostPosted: Mon May 23, 2016 00:37
by Tmanyo
rubenwardy wrote:Freeminer has better server capacity, providing that you disable weather and other laggy crap like finite liquids.

Freeminer has a nice more modern Menu. It seems to have speedier performance but it is not that popular. There are only around like 2-4 servers last time I checked.

Re: Reducing Server lag

PostPosted: Mon May 23, 2016 15:17
by snowflake
Minetest 0.4.14 has lot of lag space , that should improve it