Blacklight9 Posted March 27, 2014 Posted March 27, 2014 (edited) My server program suddenly started giving the warning "Can't keep up! Did the system time change or is the server overloaded?" every few minutes. It never used to do this before and there are only two players on the server (and sometimes this thing is popping up when there's one player on). My computer's specs should more than be able to handle running the server as well. We've just started out and neither of us have actually started really building anything either so the map is maybe a week old so we havn't gotten into any of the continuous running machines and such that I could imagine would generate lag. So I don't know what could be taxing things. I'm not noticing any lag when I'm moving around, but my friend who's logging in is noticing some spurts of lag, especially when he's morphed. Here's the specs of the system I'm running the server on. Processor: Intel Core i7-2600K CPU 3.40ghz 3.40ghz Ram: 16 GB Windows 7 64 Bit I AM logging on with the client on the same computer that the server is on and I have 3 gigs of ram dedicated in the Technic launcher for the client. Am I just overloading the processor with all the fluff that this mod has in it or is there something I'm not doing that's hurting the performance? Edited March 27, 2014 by Blacklight9 Quote
disconsented Posted March 27, 2014 Posted March 27, 2014 Chances are you have to much running in the background/windows is slowing it down/Using 32bit java on the server/Storage solution is unable to keep up/allocated to much memory to the server etc Your best bet is to: Use a profiling tool like warmroast to check what is causing it (proving it is TPS) Find out what your HDD usage is lie Eliminate any unnecessary programs from running Provide more information Quote
Blacklight9 Posted March 27, 2014 Author Posted March 27, 2014 (edited) Even looking at the instructions on the site for this program, I have no idea how to even install or implement this program. How can you change how much memory you have dedicated to the server? I don't even see a setting for that. Forgive me, but I know NOTHING about running servers or programming or anything. My only experience running a server has always been downloading the Minecraft server from the Minecraft site and running that so that my friend and I can build on our map. And that's pretty much what we're doing here, except I grabbed the server straight from here instead (Yeah. I know, most people seem to use Bukkit servers and such, but I don't). Edited March 27, 2014 by Blacklight9 Quote
Blacklight9 Posted March 28, 2014 Author Posted March 28, 2014 (edited) And question: How do I figure out whether I have the 64 bit version of Java or the 32 bit version? I don't see any indication of this anywhere in my Java configuration and how can I set the server to pick what version to use? Please bear with me. I'm somewhat computer literate, but this is ONE area where I'm not literate at all. The thing with this issue, is that I never see the lag on my side. I just see the server warning. My friend is the one who sees the lag. I always see the server warning, even when I'm the only one on. The problem started as soon as we expanded the map after we explored and found our individual build sites. Like I said. I don't physically see any lag, but see lots of those server warnings popping up. I'm pretty sure that the lag my friend is getting is from the server, though because when he gets his, I can see the lag burst on the graphic display (and often time, it will shoot up when we aren't doing anything, just standing around) but it always shows that I have at least 50% free memory underneath. But I'm ALWAYS seeing it spike on the graphic display when he gets hit with the lag spike. And the warnings usually pop in there randomly as well. Would someone be able to talk me though setting up "Warmroast" in simpler terms than what they have on their site so I could get more information for you guys? Edited March 28, 2014 by Blacklight9 Quote
Loader Posted March 28, 2014 Posted March 28, 2014 I can't talk you through warmroast (I use opis and visualVM because I'm lazy and those are what I had at hand rather than me advocating them specifically) but I can help you with your java question. My launch.bat reads; java -Xmx8G -Xms2G -Dcom.sun.management.jmxremote -jar BTeam.jar nogui So it's calling whatever java is in the path by default (could be either 32 or 64 bit), using 8gig ram max (-Xmx8G) starts by allocating a 2 gig segment (-Xms2g) does some stuff to allow visualVM to read from it (ignore the Dcom switch, you don't need it), then opens the b-team server (-jar BTeam.jar) without a gui (nogui extension on BTeam.jar). Obviously all those numbers I'm asking of it are crazy for 32-bit java, so lets check what we're actually running. Open up a command prompt window (in windows I usually just use Windows Key-R to open the run box and type cmd to open the command interpreter), I then type in java -version and it looks like this; Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved. C:UsersLoader>java -version java version "1.7.0_51" Java(TM) SE Runtime Environment (build 1.7.0_51-b13) Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode) C:UsersLoader> Cool, so I'm apparently running Java 1.7, update 51, in 64-bit when I just type java. That's why that request works. If you can make sure that you're running 64-bit java with at least say 4GB ram assigned (-Xmx4G) then that's a good start. If you're still getting warning messages then there's no choice, you'll need to get more detail like disconsented said but we can deal with that when we get to it. I'm not sure if this should be in the tracker or here, as it's kind of not a bug or issue and more optimization, so if a mod sees this and has an opinion either way please let me know. Blacklight9 1 Quote
Blacklight9 Posted March 28, 2014 Author Posted March 28, 2014 (edited) Okay. My Java check read the exact same as what yours did. Now how do I make sure I have at least 4 gigs of ram assigned to it? I want to idiot proof this and make absolute sure I have this set right. And thank you very much for helping me with this. I assume this is the setting under "Java" "View" etc... ? Also, I'm wondering if setting my Technic client to 3 gigs of ram might have something to do with it? Maybe it's too much having that much ram for the client and the server running at the same time? Edited March 28, 2014 by Blacklight9 Quote
Blacklight9 Posted March 28, 2014 Author Posted March 28, 2014 Wow! Running the server from your batch file instead of running it straight from the BTeam jar really seems to have increased the performance! Tomorrow will be the day we really find out though, when my friend logs on. But I can tell, that I'm flying over a mountain region in creative to test things and before, I was getting the warning over and over again and now with the occasional frame skipping, and now, it's as smooth as silk and I haven't had a single warning. Quote
Loader Posted March 28, 2014 Posted March 28, 2014 That's great news As for the amount you've set on the client Minecraft is peculiar in that the more RAM you give it in general the slower it gets (this doesn't apply to the server, just the client) as the client itself tries to do a bunch of calculations on the blocks its currently got loaded - the more RAM that's assigned, the more blocks remain loaded before it cleans up, the more CPU it uses. The goal is usually to find the balance, where it's not so low that it's ever capping out or being limited but not so high that it's doing extra work, 1.5GB - 3.0GB seems to work for most people using the pack so far (resource packs like Sphax PureBDCraft increase the amount you need so I guess they're toward the higher end). Quote
Blacklight9 Posted March 29, 2014 Author Posted March 29, 2014 After further experimentation, I've found that if I run the server with the GUI on, the server runs choppy even when run with your bat file, but when the GUI is off, the server runs like a champ (so far). I've selected a build site to test it in a nice lag inducing area next to an EXTREME mountain biome to fly through to test things. Flying through it with the GUI on causes stutter and with it off, it's as smooth as silk. My client right now is set to 3GB. When I set it lower, I seem to get more choppiness. Quote
Kalbintion Posted March 29, 2014 Posted March 29, 2014 The GUI could cause that particular issue in your testing, quite reasonably, considering the server is now doing additional work of outputting text to the window (which is causing additional updates on the OS and video...to actually be able to visually see the text). Quote
Blacklight9 Posted March 29, 2014 Author Posted March 29, 2014 Well, I'll get to some building and get my friend on when he's not busy and we'll give the thing a proper test with both of us on and I'll report back. Hopefully the news will be good. Thanks for the help! Quote
Kalbintion Posted March 29, 2014 Posted March 29, 2014 If the server continues to stutter you can attempt to edit the server.properties file and lower the max distance (i believe the default value is 10, lowering this to 6 to 8 should help increase performance) Quote
Blacklight9 Posted April 6, 2014 Author Posted April 6, 2014 So I started getting that waring about the server not being able to keep up again a lot again. I have no clue what's causing it. Here's a thought. Would running the server on a separate drive than my C drive improve things? I'm wondering that since Windows is running on this drive, as well as the client I'm playing on, as well as the server, if the disk is doing a lot of writing between the three. I'm wondering if putting the server on a drive that isn't actively being written to all the time would improve things. Quote
Kalbintion Posted April 6, 2014 Posted April 6, 2014 The read/write IO can affect performance but this is usually unnoticeable. You can attempt to put it on another drive, but keep in mind that if you didn't explicitly set this up or know it is set up this way, it is most likely on the same physical drive and moving it won't show any difference if this is indeed the issue. (IE: While C: and D: are different "drives" they're not on different physical drives, but rather on separate partitions of the same physical drive) Quote
Blacklight9 Posted April 6, 2014 Author Posted April 6, 2014 Well, I do actually have three separate physical drives in this computer so I probably have nothing to lose by trying it. Quote
Loader Posted April 6, 2014 Posted April 6, 2014 It tends to speed up chunk loading a little (if you have the world in a RAMdisk or on an SSD or something) but I haven't noticed much difference by just shifting it to another mechanical drive - it may well though given the amount mapwriter puts on the disk if you're not using a SSD. I'd check these two commands first; /forge tps /cofh tps They'll both give you tick and processing information on the currently loaded worlds so you can see if one dimension in particular seems to be soaking up processor time. I'd also run the game with task manager open for a bit so you can check to see if your CPU use it topping out on the performance tab (as an aside you can turn on 'show kernel times' for that graph - it'll give a red line to indicate system processes - if IO is an issue it'll probably show up there as a red spike when the system waits for a response). Quote
Blacklight9 Posted April 6, 2014 Author Posted April 6, 2014 Of course, now that I have the task manager monitors open and I'm watching it, I can't get it to do it again. I'm even flying around over the most extreme and lag inducing terrain on my map (as well as trying to generate some in some of my dark spots). So. Who know what's going on. It didn't look like any of the other worlds were stealing the ram. The world is new and the other worlds aren't even generated yet (I'm gong to be in the Nether by the end of the week if all goes according to plan though! ) The only thing I'm seeing that's coming close to peaking on the monitors is the hard drive writing. There was ONE little blip of lag that showed up as a little spike on the processor and the hard drive monitor, but it was only for a second and it didn't show up with the server warning at all. Game performance is so far fine. I don't understand quite how to read the results of the /forge tps output though. Quote
Loader Posted April 7, 2014 Posted April 7, 2014 The drive monitor will shift its scale around which is a little different from most of them (the network monitor does it too) but that's because it doesn't know what the maximum will be for those things - most hard drives 500GB+ will still achieve speeds of over 50MB/s even if they're in horrible seek conditions on the slow edge of the disk, but unless it's getting up that high at peak I wouldn't worry about it. (if it is you'll need a tool to find what the maximum speeds of your particular drive is). The TPS commands should let you know how many ticks each world is achieving and how long they're taking to complete - 20 ticks a second is normal which is equal to 50ms per tick. If a world is taking longer than 50ms to calculate a tick then it'll have to do less ticks in a second, and then you'll get server lag (most noticeable with block breaking or placing taking a second or so as the client tries to sync up even if it's actually still doing 19 ticks in a second on the server). If they're all reading 20TPS, that's perfect, it's more used to check that none of the worlds are malfunctioning. Glad it's sorted Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.