April 28, 2024, 07:29:23 am

Author Topic: Server Inner workings and lag  (Read 1315 times)

0 Members and 1 Guest are viewing this topic.

acegdl007

  • Newbie
  • *
  • Posts: 44
    • View Profile
Server Inner workings and lag
« on: May 23, 2012, 04:42:01 pm »
A week or so ago I posted a topic about animals not following when you have wheat in hand.  I was told this is just lag from the server.  Some days I was able to get animals to follow... other days, not so much.

I also have encountered a mob spawner that seems more active at spawning on some days than others.

I'm wondering if things like this are uniform across the map.  Are server RAM and resources directed preferentially more towards the areas at the center of the map as opposed to the outskirts?  Or are they directed preferentially towards areas where there are many players at any given moment in time?

I know a bit on how servers work but not too much on the inner workings of Minecraft servers.

cschurz

  • Hero Member
  • **
  • Posts: 545
    • View Profile
Re: Server Inner workings and lag
« Reply #1 on: May 23, 2012, 07:16:42 pm »
the symptoms you describe come from the servers low "tick rate." a tick is when everything in the game is processed. day and night cycles, in-game time, mob interaction, etc. it's supposed to happen ~25 times per second. sometimes it can be as low as 5 times per second on our server (but keep in mind that it's not perfect on any of the popular servers).

i can tell you now that we've found mobs and entities to be the main cause of a low tickrate. having a large amount of stuff really slows down the server. mob farms, chicken farms, experience orbs, pretty much everything. opti has theorized that the server-side collision detection algorithms may be spazzing out when it comes to lots of mobs in a small area - potentially causing the lag. he'll work something in to throttle the number of mobs that can be in a certain area- maybe it will help out with the lag.

but no, there is no preference as to where server resources are allocated. it tries to do all the work as evenly as possible as far as i'm aware. the single-core nature of the minecraft server is the second biggest bottleneck- only second to minecraft's terrible programming :p. just for some perspective, minecraft is using 100% of a single CPU core pretty much all of the time- while the rest of our processor's cores twiddle their thumbs and sit at 15% workload overall :\

acegdl007

  • Newbie
  • *
  • Posts: 44
    • View Profile
Re: Server Inner workings and lag
« Reply #2 on: May 24, 2012, 11:43:08 am »
OK... that's really interesting.  It makes sense.  Not sure this info will be helpful for playing the game but since I'm kind of an "amateur computer hobbyist"  on the side so I'm always interested in learning how computers/servers/games, etc. work.

Thanks!