[Server thread/WARN]: Can't keep up!

Discussion in 'Server Tech Support' started by TechieAndroid, Nov 10, 2017.

  1. [21:08:11] [Server thread/WARN]: TechieAndroid moved too quickly! 3.6137865857920133,3.788724590614379,9.613765250026859

    [21:08:32] [Server thread/WARN]: Can't keep up! Did the system time change, or is the server overloaded? Running 11475ms behind, skip
    ping 229 tick(s)


    That's the message that plagues my terminal and the lag in MC renders the client side unplayable.


    FTB 1.4.15
    Infinity Lite 1.8

    I run a server and client on my PC (mainly a home LAN world (2 players), occasionally I'll have friends join 1-5 over the internet, I open the port on those occasions).


    My PC specs:


    i5-6402p (4 cores like 3.2Ghz)

    16 GB of RAM

    Nvidia Geforce 1050

    3 TB HDD SATA lll 6 Gb/s 64 MB Cache

    Running Linux x64 Kubuntu 16.04 LTS


    Server Java Flags:


    export JAVACMD="java"
    export MIN_RAM="5G" # -Xms
    export MAX_RAM="5G" # -Xmx
    export JAVA_PARAMETERS="
    -XX:+UseG1GC
    -XX:+UnlockExperimentalVMOptions
    -XX:MaxGCPauseMillis=100
    -XX:+DisableExplicitGC
    -XX:TargetSurvivorRatio=90
    -XX:G1NewSizePercent=50
    -XX:G1MaxNewSizePercent=80
    -XX:InitiatingHeapOccupancyPercent=10
    -XX:G1MixedGCLiveThresholdPercent=50
    -XX:+AggressiveOpts
    -XX:+AlwaysPreTouch
    -XX:G1ReservePercent=20
    -XX:G1HeapRegionSize=32M
    -Dsun.rmi.dgc.server.gcInterval=2147483646"
     
  2. grandrolf

    grandrolf Popular Member Trusted User

    My guess is that it's due to the weaker CPU and that it's running from HDD - or do you have a SSD as well?

    Also, could you try and remove every argument added about GC and just let it run on default values - or use the settings from the server-zip file - and see it that makes any difference?

    If you still have issues, post full logs using paste.feed-the-beast.com and share the link.
     
  3. I really doubt my hardware is the bottleneck, since it's never using all of my resources (CPU/RAM), there's always some free and the system runs fine. My HDD has never bottlenecked me.

    While idling with both client and the server loaded and running my CPU hovers between 15%-30%.

    My RAM seems to be doing very well with, a little over 11 GB in use (server, client and system using it) and 4 GB free, it's also not having to use any swap space on the HDD.

    I've been doing some process of elimination of my Java flags, here's what I've come up with.

    JAVA_PARAMETERS="-XX:+UnlockExperimentalVMOptions -XX:TargetSurvivorRatio=90 -XX:MaxGCPauseMillis=100 -XX:+DisableExplicitGC -XX:InitiatingHeapOccupancyPercent=10 -Dsun.rmi.dgc.server.gcInterval=2147483646"

    Seems to be lagging less out of all the tests I've done so far.

    -XX:+AlwaysPreTouch -XX:+AggressiveOpts

    Seems to cause a boat load of "can't keep up" lag.

    BTW I'm using

    openjdk version "1.8.0_151"
    OpenJDK Runtime Environment (build 1.8.0_151-8u151-b12-0ubuntu0.16.04.2-b12)
    OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)

    Here's the old flags, I haven't tried using them because I think they're outdated.

    "-XX:+UseParNewGC -XX:+CMSIncrementalPacing -XX:+CMSClassUnloadingEnabled -XX:parallelGCThreads=2 -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=10"

    Also I have OptiFine 1.10.2 HD U E3.

    I use the lagometer and debug to monitor things in-game.

    With FPS on 120 I have some stuttering and the percentage it takes up on the debug is ~25% but it variates and can spike, however with fps set to unlimited it takes almost no percentage of the debug up leaving most of it to the game renderer (which I assume is good?) but I've also heard that, set to unlimited, the CPU wastes a lot on fps in-game when really I only need 60 because my monitor is 60. I want to balance this because I'd rather the server have more CPU usage than the client.
     
  4. grandrolf

    grandrolf Popular Member Trusted User

    Minecraft is not hyper-threaded so you need to check on that for your CPU (and it's a i5 - skylake, right) - not check overall as it has more than 1 core (4 virtual - right?), and HDD has limits with read/write - so those are bottlenecks.

    Yea, boats are murder to servers.
     
    Ommina likes this.
  5. Yeah I know. My CPU specs were in the OP it's an i5-6402p which is non-ht and quad core.

    https://ark.intel.com/products/93277/Intel-Core-i5-6402P-Processor-6M-Cache-up-to-3_40-GHz
    "Performance
    • # of Cores 4
    • # of Threads 4
    • Processor Base Frequency 2.80 GHz
    • Max Turbo Frequency 3.40 GHz
    • Cache 6 MB
    • Bus Speed 8 GT/s DMI3
    • TDP 65 W"
    My HDD is not a bottleneck to MC, let me elaborate, a SSD also has R/W speed limits, my HDD is SATA 3 which is 6 Gb/s and has a 64 MB Cache (well enough for an AAA game to run without the HDD being a issue) hence if I was to upgrade to a SSD I'd likely see little to no performance change whatsoever, I know this because I am an IT (and PC enthusiast), I have a SSD in another PC and I know the performance differences between the two.

    Boats?... I didn't mention... Oh "boat load" is a figure of speech. I don't have any problems with boats in MC.
     
  6. I would have thought that this would be a simple issue to resolve. Is there a better place I can go to figure this problem out?
     
  7. grandrolf

    grandrolf Popular Member Trusted User

    If you don't like the answers you get you can always wait for someone else to answer.

    About the CPU - it doesn't matter how many cores it has, the thing that matters is how it handles single thread - what's the performance there on that CPU?
    (I couldn't find any benchmark numbers on that one - and I know that it's in the original post).

    About the HDD, let's say you have 150-200mb/s read/write and it's a mechanical disk - there's going to be performance issues if there's a lot of reading and writing. It's not 6gb/s - that's the interface 6Gbps
    A SSD would give you better read/write speeds and not the latency of a mechanical disk.

    About the boats - yea, sorry I missunderstood you there. But if you don't have issues with boats, try it out and look at the skipping of ticks.

    Then you should do some reading, because you're missinformed.

    Do some benchmarking on your hardware if you can't take the suggestions, then base it on facts and numbers.
     
  8. I'm aware that that is the interface speed, I never claimed that my HDD R/W that fast, you just misunderstood.
    I have no plans of upgrading my CPU or anything else because I have enough power already to be able to run this. A long while back before I built this PC, I had a laptop (much weaker hardware), I was able to run this server with even more people and way less lag.
    Like I said I have a SSD and have benchmarked the performance in MC and it's negligible. Do you have a SSD and some kind of special thing happen when you play MC on it?

    I'd really like to get back on subject and stop talking about hardware.
     
  9. grandrolf

    grandrolf Popular Member Trusted User

    Yes there are noticeable benefits using SSD and perhaps NVME (ofc if you use a crapy ssd you'll get crapy result on that as well).

    Can you explain what benchmarks you did and show numbers if you got any? What read / write did you have - and what IOPS, and perhaps what hardware you compared between.

    This is very much on subject - you're having issues on your Minecraft server and I'm suggesting it's because of your hardware.

    There's no magic settings that can be made if the hardware can't deliver the performance.

    My guess would be that if you should invest in a proper SSD there would be less load on cpu/ram and then you might be able to keep running on that CPU a while longer.

    You come here asking for help but you're not willing to take suggestions.

    I'm not making these statements up in any way or form.

    This is the last answer I'm going to give in this thread, as you clearly want some "magic" solution and don't want to hear that you have limitations on your hardware.
     
  10. Well like I said, I had a older weaker laptop that ran this server before just fine so it's not a hardware problem.

    As far as benchmarks, I'll get them and post them.

    So let me ask you this, without any java flags, there should be no can't keep up messages (assuming the hardware is not an issue of course) right? Are the default flags in the server (without changing anything) the best to use for Java 8 these days?
     
  11. Well... I guess I'll go look at the Java documentation then.
     
  12. Foxhunter824

    Foxhunter824 Guest


    Let me start with, It is your hardware. Minecraft is a very read/write heavy game. You are asking your system to be a server and a client at the same time. On a mechanical drive at that. I am sure you would be getting the same with a ssd. I run a I-7 with 16 gig of ram on windows server 2008 and 2 minecraft FTB servers on it. Each Minecraft server has its own SSD, and I still get the non keep ups from time to time. Mostly when the guys are exploring heavy and opening up map.

    So here is a lesson, don't spout I am an IT guy, because there are people out there that have been doing this for longer than you most likely have been out of diapers. They were pointing you at the issue and asking you to run a benchmark.

    Here is a benchmark on all the drives in the same system. This is a I-7-6700K with 32 gig of ram water cooled. running a simple 4.0G

    Mechanical drive. Seagate Barricuda, getting a bit old and it shows 6Gig interface.
    Read 24MBS, 423 IOPS, Write 115MBS, 251 IOPS

    SSD, Samsung EVO 850
    Read 550MBS, 94017 IOPS, Write 524MBS, 85686 IOPS

    NVME, Samsung 950 Pro
    Read 2599MBS, 307363 IOPS, Write 1479MBS, 84988 IOPS

    Same Drive interface on the Mechanical and ssd, huge difference in throughput. This is why the man asked you to run a simple benchmark test. To see what your drive was doing.
    As far as SSD's. you get what you pay for. Cheap one may only read well, say 480 MBS, but write like crap at 220MBS. Good quality one will read and write real close to the 555mbs that is cap on sata 3.

    As far as old laptops, got a real nice I-5 with 8 gig of ram, and a 128 gig nvme in it. Runs a wicked Minecraft server. chokes out if I try and run a client on it at the same time.
    Guess what I am saying, is shutup and run the dang benchmark, and stop asking your machine to pull double duty and wonder why its hanging up.
    If your going to ask for help, then actually listen. Nobody said your gear was chit, they said it was having a throughput issue.

    What I didn't see in the post was , How many mods are running, What mods, as not all mods are made equal. The server I run , 1 instance has 181 mods, the other has 170 mods. The heavier one is the one I see the cant keep ups on the most. Same system, same amount of ram, same type of ssd's. Just more mods. So that can be a center of heartaches as well.

    As for your hardware, I-5 and 16 gig ram, fine for either server or client. And would say even running both. But both on a mechanical drive, you have a bottleneck then. One or the other, most likely be ok. Server might even still see some cant keep ups , due to the mechanical drive. But without drive benchmarks, hard to say.

    Aloha
     
  13. You couldn't be more wrong.

    I fixed this problem myself. You clearly haven't looked at the Java documentation, because if you had you wouldn't've made yourself look so silly with those comments.

    I have optimized the Java flags and I don't get any lag on the server whatsoever. I have 10-20 people on the server at a time and run my client on it (my PC) as well.

    My CPU (which is quad core) is never maxed out.

    I don't use all of my 16GB of RAM.

    My HDD is not overwhelmed and has been reading and writing in the hundreds of MB (which is more than enough of what MC needs).
     
    Last edited: Jun 8, 2018
  14. I also fixed the problems in the FTB scripts.
     
    Elixiredits likes this.
  15. MTXRooster

    MTXRooster Guest

    As an excellent reference point and great general knowledge, I as well as the community would love to know (I'm sure?) what java flags you optimized to clear up your performance issue (I do see you listed your original java flags). What fixed the problem??
     
  16. Gerald Huppertz

    Gerald Huppertz New Member

    I would also like to know what new Java settings you used.

    From the Server Tech Support MUST READ notice:
     
  17. Okay so the problem with this forum is that there are people such as grandrolf who think they know everything, but just ruin it for everyone.

    I suppose most forums are this way but I've seen good ones too (one's that are moderated well and also helpful).

    With that being said I have valid reason for not posting my solution. I simply want to avoid the bias haters that would no doubt clog up this thread with meaningless replies on what they think are "better" Java flags.

    There are of course no perfect set Java flags out there, there's just what works best for you, therefore my solution would not be a one size fits all.

    After extensive testing and letting many people try them and report back their results, these are what I would recommend trying just as a generic better than default set of Java flags.

    I'll post my setup on my Tumblr page since I'd rather not use this forum anymore.

    -link broken-

    I would appreciate it if this thread was locked from further commenting since I see no point in continuing to beat a dead horse.
     
    Last edited: Aug 3, 2018
  18. Gerald Huppertz

    Gerald Huppertz New Member

    I appreciate the reply and also the time you have spent going over Oracles documentation. My Java args are very similar to your original ones so will try these tweaks and see if there is any performance increase. Thank you!
     
  19. aurianna

    aurianna Guest

    Well the link to your tumblr page is broken & goes to a porn site - so thanks for nothing with assisting others with this same problem - next time how about following the forum rules completely
     
  20. SnowzSan

    SnowzSan Guest

    My God you're pretentious.

    I'm not going to jump on the bangwagon about how your hardware is severely lacking (which it is) but to argue that an SSD has no performance gains for a server when compared to an HDD is PURE stupidity.

    If you're an "IT Guy" I feel sorry for your clientele. You show zero understanding of how anything actually works but to counter that you offer the stupidest counter points.

    "I decided to read the oracle documentation" why wouldn't you do that from the start? That offers a more complete answer than a forum poster ever will. The reason you didn't do that from the start is because you don't understand the material and you didn't actually do it. On top of that, you did "fix" your server lag with any special JVM arguments because you don't know what you're talking about. What probably happened is you copy and pasted an argument from someone else's post and used it as your own thinking "Wow! This fixed it!"

    You're an idiot, and good riddens.

    Also... "I usually host up to two players" "I run servers with 20 PLAYERS!" that number literally multiplied by 10. Does this somehow make you feel like your opinion is more valid because more people joined your server? What kind of stupid argument is that? Just felt the need to point out that utter stupidity.
     

Share This Page