Jump to content

Question about a server warning.


Blacklight9

Recommended Posts

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 by Blacklight9
Link to comment
Share on other sites

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:

  1. Use a profiling tool like warmroast to check what is causing it (proving it is TPS)
  2. Find out what your HDD usage is lie
  3. Eliminate any unnecessary programs from running
  4. Provide more information
Link to comment
Share on other sites

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 by Blacklight9
Link to comment
Share on other sites

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 by Blacklight9
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 by Blacklight9
Link to comment
Share on other sites

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. 

Link to comment
Share on other sites

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).

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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).

Link to comment
Share on other sites

  • 2 weeks later...

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.

Link to comment
Share on other sites

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)

Link to comment
Share on other sites

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).

Link to comment
Share on other sites

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. :)

Link to comment
Share on other sites

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 :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...