I apologize if this is the wrong section to be posting this in, but my server seems to be hitting lag spikes as of late. It feels like it's probably the garbage collection, but I can't be sure.
The server is a 16GB, Core i7 2.8Ghz server with 12GB dedicated to the server itself, and the other 4GB dedicated to the backend workings. We use a plugin called LagMemMonitor (I think it's called) which allows us to check our TPS (Ticks Per Second) and RAM in-game with a command ( /lagmem ).
Our RAM never really dips below 70%, sometimes it does but it kicks itself and returns to about 85%~ and slowly dips to 70% again. It's a never-ending cycle where we get kind of low on RAM (say, around 40%) and it somehow "fixes" itself automagically. I'm not sure how this works exactly.
Either way, we've done no special Java voodoo to make the process any smoother and I think we're really starting to be punished for that. These spikes occur seemingly at random, but it seems to be anywhere from 15 minutes to an hour in variation. When the spike hits, it lasts for a good 3-5 seconds. It's nothing major, but it's enough to have half my population saying "LAG" when it happens. I dislike!
Notable intensive plugins:
LogBlock,
Heroes,
WorldGuard,
FalseBook,
Multiverse (but only 1 world, we just use the portals),
Spout,
Towny,
Essentials.
When you say your other 4gb is dedicated to back end workings? Did you use a program to dedicate it or just left it free for the OS to manage between processes? Also you can set the initial heap size to a min value like 4gb and a max heap of 12gb which might help with the garbage collection a bit.
The OP is probably the worst post in the history of java-tweaking, but on the second page (the one thats linked here) by 'will d' and follow up posts really help you get a good feel of what you can do with java-arguments to tweak, what you should tweak, and what you should leave alone.
The person that handles all of our Java stuff (DarkSerapheim) is going to reply shortly about the information you guys need to help out. I appreciate it.
Also, would our server having a port of 100MBp/s affect it? I know a lot of servers use the 1GBp/s.
Our server got about 56 people online at peak today, it seemed like as soon as it went above 40, everything became pretty choppy. 35 and below and we seem to be pretty good as far as general smoothness goes.
Minecraft is only going to use one of those cores at a time, no matter what until Notch finally realizes that people aren't just requesting he make the server software multithreaded because we think it would be worth the lulz.
When you say your other 4gb is dedicated to back end workings? Did you use a program to dedicate it or just left it free for the OS to manage between processes? Also you can set the initial heap size to a min value like 4gb and a max heap of 12gb which might help with the garbage collection a bit.
Just as a friendly correction: setting the initial heap size to a value that is NOT equal to the max value actually would hurt GC quite a bit.
As taken directly from my provided link...
The reason that one would [make the max heap size the same as the min heap size] is: if your server will eventually end up using it, then in the meantime, the JVM will not have to waste overhead on increasing the size by 20% each time the young generation memory space maxes out; each max-out of the young generation space incurs a young-generation garbage collection and then the reallocation. If you insist on keeping the two values separate (xmx and xms), at least tweak -XX:YoungGenerationSizeIncrement otherwise a server that is on its way from 512MB to 2048MB will incur 8 or more garbage collections you didn't need to have in order to get to the max heap size you already are willing to give to the app.
TL DR: garbage collections cause spikes in CPU usage far more often when you don't set the heap sizes (initial and max) to be the same.
To OP: There's actually like 5 pages worth of incredibly enlightening information by those posts from 'will d' about how you can handle/learn/understand/tweak java, but actually have to read it; if you want somebody to just 'have an answer' for you to change up your java command line, I personally assure you you're not going to see any improvements; there's just too many things to factor in....
I apologize if this is the wrong section to be posting this in, but my server seems to be hitting lag spikes as of late. It feels like it's probably the garbage collection, but I can't be sure.
The server is a 16GB, Core i7 2.8Ghz server with 12GB dedicated to the server itself, and the other 4GB dedicated to the backend workings. We use a plugin called LagMemMonitor (I think it's called) which allows us to check our TPS (Ticks Per Second) and RAM in-game with a command ( /lagmem ).
Our RAM never really dips below 70%, sometimes it does but it kicks itself and returns to about 85%~ and slowly dips to 70% again. It's a never-ending cycle where we get kind of low on RAM (say, around 40%) and it somehow "fixes" itself automagically. I'm not sure how this works exactly.
Either way, we've done no special Java voodoo to make the process any smoother and I think we're really starting to be punished for that. These spikes occur seemingly at random, but it seems to be anywhere from 15 minutes to an hour in variation. When the spike hits, it lasts for a good 3-5 seconds. It's nothing major, but it's enough to have half my population saying "LAG" when it happens. I dislike!
Notable intensive plugins:
LogBlock,
Heroes,
WorldGuard,
FalseBook,
Multiverse (but only 1 world, we just use the portals),
Spout,
Towny,
Essentials.
Any ideas?
P.S: Server averages about 20~40 online.
New to Linux?
http://forums.bukkit.org/threads/optimize-java-for-minecraft-in-a-extreme-way-p-need-feedback-thx-i-am-back.25994/page-2#post-487416
The OP is probably the worst post in the history of java-tweaking, but on the second page (the one thats linked here) by 'will d' and follow up posts really help you get a good feel of what you can do with java-arguments to tweak, what you should tweak, and what you should leave alone.
Also, would our server having a port of 100MBp/s affect it? I know a lot of servers use the 1GBp/s.
Our server got about 56 people online at peak today, it seemed like as soon as it went above 40, everything became pretty choppy. 35 and below and we seem to be pretty good as far as general smoothness goes.
Just as a friendly correction: setting the initial heap size to a value that is NOT equal to the max value actually would hurt GC quite a bit.
As taken directly from my provided link...
TL DR: garbage collections cause spikes in CPU usage far more often when you don't set the heap sizes (initial and max) to be the same.
To OP: There's actually like 5 pages worth of incredibly enlightening information by those posts from 'will d' about how you can handle/learn/understand/tweak java, but actually have to read it; if you want somebody to just 'have an answer' for you to change up your java command line, I personally assure you you're not going to see any improvements; there's just too many things to factor in....