Server has lag spikes

for the past few weeks I have been getting lag spikes on server, seems to be happening more often now. I’m running Craftbukkit 1.8.7, MineOS turnkey, Minecraft is using 6GB of 8GB DDR2-800 ram total. running the AMD Phenom Quad Core Processor 9650 (2.3GHz) AM2+. I did have a Cable modem replaced when it died last week thinking that would fix my lag but it got worse. My question is there anything on the server I can do to maybe bring back my speed or do I need faster hardware?

Depends where the lag is occurring really, do you lag playing locally or is it only lagging for remote clients?
If it is occurring locally it may be related to people exploring new areas and chunks needing to generate. Of course, it could be hardware, but I wouldn’t go chucking money at it straight away.

it might be chunk lag, but I only get 5 players at avg on server and they don’t travel much in new areas

As @ElPres says, you’d need to find out what sort of lag it is. If you look at the server logs and find lots of Can't keep up! Did the system time change, or is the server overloaded? Running 6295ms behind, skipping 125 tick(s) then the work you’re doing on the server exceeds the capacity of your hardware. If you look at the utility top (check google, type it into command line), you’ll see about load averages. This will indicate whether you’re CPU-limited, because it’s unlikely you’re RAM limited with only 5 players @ 6GB.

If you don’t see these warning messages and the load average seems reasonable, then the problem you’re having is connection lag. First, make sure your server isn’t on wireless. Second, test if the lag persists if your clients are not wireless. If either of these make the lag go away, you know the problem.

Test both of these while local to the server if possible, because if you’re hosting remotely–to a server somewhere located physically on a different network, then it could just be bandwidth limited, with poor upload speeds to feed your simultaneous 5 clients.

I have a vague recollection there’s debug info you can see on the Minecraft client itself, so you may also want to explore that if these other ideas don’t make it clear what’s bogging your performance down.

Ok I got 19 server overloaded in the past 18 hours, also a slow permissions system response message from PermissionsEx. I also got 22 more in 4 hours during my busy time on the server. To wrap it up in a 22 hour span I got 41 of the server is overloaded messages.

My load avg via the web interface is .7 for 15, .4 for 5, and the last one ranges fro .2 to .4 not sure what this graph indicates. I know before I re-installed my OS after a HDD upgrade the graph was not so high and the 15 or blue would not hit the top and flat line.

I was checking to see if there was a newer version of MineOS and I guess Turnkey is the latest version and I was wondering if the download I have from 12/2013 is the same as the latest downloads?

With some updates to the server I was able to improve the warnings from 41 to 16 in same time frame. Looking into fixing my map lighting issue, since I’m running a map that has been upgraded from 1.6.2 and slowly up to 1.8.7 over the past year or so.

Sometimes redstone circuits can caus that. Especially if they’re big and ticking.

with some updates to Craftbukkit, and some minor adjustments to the game I was able to get the, “Can’t keep up! Did the system time change, or is the server overloaded? Running 6295ms behind, skipping 125 tick(s)” to stop. Now that 1.8.8 was released I got a lag crash with only three players, seen info on a command that might help with this issue just not sure where to change the startup line. …minecraft_server.jar nogui got this on http://minecraft.gamepedia.com/Tutorials/Setting_up_a_server#Starting_from_the_command_line