Lag from PacketPlayInLook, other issues

Discussion in 'Performance Tweaking' started by ceruleanReverie, May 18, 2018 at 5:34 AM.

  1. Hey, my server's been getting random dips in performance recently, and every time I check timings it seems to be tied to "PacketPlayInLook" or something similar. It happens even with just a couple of people online, when ordinarily we shouldn't be getting any lag. My timings are here (x).

    I have a little over 50 plugins on my server, and, admittedly I'm running an outdated jar but I'm not sure that is the issue (i'll get around to updating it eventually..)

    The lags seem to happen when people are exploring on my server, ie. flying around with elytra or travelling quickly in a boat or on a horse or something similar. I have a suspicion that the anti-xray which I have enabled on my server is causing performance issues with people exploring many chunks quickly, as it probably takes a toll on the server having to sanitize the chunks before sending the information to the player, however "PacketPlayInLook" seems to be an inbound packet from when I looked it up, so it doesn't seem to add up.

    In addition to this issue, I've had a lot of problems getting minecraft's vanilla "functions" to work well on my server. I get immense lag whenever I add a function into /gamerule gameLoopFunction. I have yet to test the function on a vanilla server or anything like that, but it can be difficult to gauge performance in vanilla of course. I just keep the functions disabled for now until I can figure out why they are causing so much lag. (I got the function files from Xisumavoid's website, the video said they were optimized as well as they could be- is it something within spigot/my plugins causing issue, or is the function just laggy on its own?...)

    Sorry for clumping two separate issues into one post, just thought it'd be better than posting two separate threads at once. Any help is appreciated :)
     
  2. electronicboy

    IRC Staff

    Those packets are all focused around player movement in general, it would stand to reason that the players are potentially moving too fast and causing large collision lookups.

    as for functions, they should work as expected, no idea how they interact with plugin commands however; Somebody saying that they're "as optimized as well as they could be" is generally never a good sign as for something being super performant...
     
  3. How can I optimize players' movement?... like, it's not even chunks being loaded causing issue? :/
    It's not like people are flying around with creative fly or anything, just using elytra/boats/horses etc...

    Also, I've checked timings whenever I have the vanilla functions enabled... "Minecraft:command functions" shows up really high. I took a timings report just now while I'm the only one online, sitting still in my base: (x) (check the "all" view, it's taking 45% of ticking time.. also there's a NaN there, huh?)

    I guess I'll have to do more testing in vanilla or something to figure out if it's some issue with my plugins setup or something (maybe code gets triggered on an on command event)... The function calls 101 commands, every 20 ticks... obviously a lot of commands to run so much. Not sure how it could be optimized beyond calling it once every second instead, but even then I worry it'll lag. if it's not an issue with plugins/the server I'll just have to look to the mc forums for help aha.
     
  4. Player movement is going to be a heavy task to process no matter what. You could upgrade your processor, or look further into your issue to see if it's something else. Any anti-cheat is going to increase the load by x2-4 on your player movement since they have to perform many functions to make sure the player isn't making illegal movements

    Edit: You could use Clearlag's movement limiter to prevent players from flying super fast through chunks.
     
  5. Upgrading processor is kind of a possibility... the lag isn't huge enough that I'm super concerned about it, it's just really annoying, could pose a serious problem if tons of people were exploring though.

    I have a rather small server with a dedicated staff so we don't need/use anticheat, just the vanilla checks on flying. (we've had maybe one or two problems with people hacking so, no, we don't really need the anticheat).

    Clearlag doesn't seem terribly necessary for my server... I've used it in the past and it never really helped that much, I wasn't aware it had anything like a movement limiter tho. still, it'd be more of a nuisance to players than anything, myself included tbh.

    I've been wanting an upgrade for a while, so I guess I'll consider my options... thank you :)
     

Share This Page