How to Make an Efficient Server

GmanNL

New Member
Jul 29, 2019
3
0
0
I guess I found a solution, I've checked the code glass suggested and rechecked it to see that I've missed ":p" and a semicolon. Going between ages is smooth enough, stuttering is very little. Here is the code.

Code:
java -server -Xincgc -Xmx2048M -Xms1024M -Xmn512M -XX:NewRatio=2 -XX:CMSFullGCsBeforeCompaction=1 -XX:SoftRefLRUPolicyMSPerMB=2048 -XX:+CMSParallelRemarkEnabled -XX:+UseParNewGC -XX:+UseAdaptiveSizePolicy -XX:+DisableExplicitGC -Xnoclassgc -oss4M -ss4M -XX:+UseFastAccessorMethods -XX:CMSInitiatingOccupancyFraction=90 -XX:+UseConcMarkSweepGC -XX:UseSSE=4 -XX:+UseCMSCompactAtFullCollection -XX:ParallelGCThreads=4 -XX:+AggressiveOpts -cp "direwolf20.jar" -jar "direwolf20.jar"

Thanks a lot, my server was stressing over the max resulting in annoying lagg. i3 3.3Ghz cpu, HT disabled. 2 cores running on 55% average, meaning that 1 cpu is on 100%.
We had often trouble with the chat and connecting/disconnecting issues.
And returning blocks, very annoying.

I was finding a solution and with your startup the average cpu load is now +-15%, we have no lagg now. I hope the connecting issues are solved too.

In other words: THANKS!
 

Xeonen

New Member
Jul 29, 2019
157
0
0
Thanks a lot, my server was stressing over the max resulting in annoying lagg. i3 3.3Ghz cpu, HT disabled. 2 cores running on 55% average, meaning that 1 cpu is on 100%.
We had often trouble with the chat and connecting/disconnecting issues.
And returning blocks, very annoying.

I was finding a solution and with your startup the average cpu load is now +-15%, we have no lagg now. I hope the connecting issues are solved too.

In other words: THANKS!

I'm glad it worked out, we've also solved the login problem; if your language has different "I" characters like "i, İ, ı, I" and your client OS language is different than server language you will fail to connect. We've found changing OS language helped a lot.
 

systemv

New Member
Jul 29, 2019
94
0
0
$0.02:

Guide on enhancing performance: http://tinyurl.com/cy78num

Once you've done the appropriate switches to the JVM, then...

Often the lag is not the machine, but the network. Esp if you're running at home on a dedicated IP on your DSL/cable modem.
I agree with the other posts that recommend not playing (client) on the same machine as the server.

Good luck,

-SystemV


Extra pocket change:

I've run several servers on different grades of hardware and it seems to boil down to network between the clients and the server. Unless your HW is ancient a 4 core 4Gb RAM should be OK. Check your _upload_ bandwidth.

Clues:

When a player joins the server, is there an excessive amount of lag for them (10-20 seconds?) before any commands they issue are completed?
Do users experience deja-vu? Like, mine a block, then the block re-appears, then disappears? Do they get snapped back to old positions along a path?

Those all point to the possibility of a network bandwidth constraint.

Load averages on Linux / Windows are misleading really.

The real measurement of CPU utilization is done this way:

The way that formula works is by counting ticks in the most idle process when the system is UNloaded (not running MC).
Then counting ticks when the system IS loaded. Then plug the values to the equation.



Some other post mentioned 25% load average. A 25% CPU utilization is still quite high for one process, if you think about it.

But if the only processes are the kernel, MC and a few daemons, then that's not bad. My advice: Run Linux and strip that box down to the bare essentials (I prefer Debian, maybe SuSE, but Debian is easier IMHO to administrate).

There are tons of small lean distributions of Linux that could be a better place to start. Windows does not serve MC well for being a server platform because of the chaos of Windows's own Tasks.

Man, I've rambled on... sorry.