Give us some insight

Do you have an idea on how to improve the server? Or have a brilliant idea for an event? Or any other requests? This is the place to voice them.

Give us some insight

Postby ffMathy » Sun Feb 17, 2013 7:47 pm

Hi Zedwork.

How about sharing some more insight with the players about your server, in a forum or something? As a systems engineer, I would like to know what kind of server is currently hosting Zedwork. That way, I could contribute in figuring out what's causing the lag lately.

By sharing information on what your server specs are, it is going to be easier to figure out what's causing the problem. Is it a dedicated server? Do you have Remote Desktop access? Is it running Linux or Windows?
ffMathy
 


Posts: 11
Joined: Mon Jan 07, 2013 12:13 am
Minecraft IGN: ffMathy

Re: Give us some insight

Postby Zedwick » Mon Feb 18, 2013 8:26 am

Sure. Run a dedicated server (2.8GHz 3MB Intel Dual Core Processor, 4GB RAM) running ubuntu linux. Have remote access to the desktop via KVM, but I only use this to check hardware faults at startup. Use an SSH connection for all my admin need.

Minecraft is not a multi-threaded program, though plugins and my server build do multi-threading - just most of the actions are contained in one thread. MC is basically starved of processing power, Entities (mobs, players, item frames, paintings, minecarts etc.) take up most of the processing time (yesterday entity movements were taking between 70-95%). I've put in a fix to reduce this, will see how it goes over the next few days.

People with large animal farms fighting for space in a confined area contribute a lot to this, as do mob grinders/xp farms. For anyone with large animal farms, spread your animal out into large pens. Preferably keep them in a separate region to the one you're living in (or split them up into two regions). Any animal that is close to a player will be moving, animals which are far from you or not loaded into memory will not move. Animals which move around kill server performance.

Another possible cause would be redstone. Redstone clocks (or any constantly changing redstone circuits) will contribute to lag, though I have no evidence to suggest anyone is running any laggy redstone machines. Just bear it in mind ;)

Our MySQL connection for a couple of plugin DBs has been suffering of late, if this causes lag (and I'm sure it does) it would be short lag spikes, rather than lengthy periods of lag. I'm going to get onto our MySQL host about this once I've sorted out our backup issue (I was cheekily hosting our world backups on a webhosting account. Their TOS do not allow, been sorting out a cheap alternative solution to remote backups using Amazon S3)
"Clothes make the man. Naked people have little or no influence on society." - Mark Twain
Zedwick
Guardian
 


Posts: 1900
Joined: Thu Mar 29, 2012 3:46 pm
Location: England
Minecraft IGN: Zedwick

Re: Give us some insight

Postby AwsomeG2 » Tue Feb 19, 2013 8:53 am

4GB of RAM and your having issues? What is eating up the RAM?
Image
AwsomeG2
Zesty
 


Posts: 206
Joined: Tue Sep 18, 2012 3:54 am
Location: Mexico
Minecraft IGN: AwsomeG2

Re: Give us some insight

Postby Zedwick » Tue Feb 19, 2013 9:00 am

AwsomeG2 wrote:4GB of RAM and your having issues? What is eating up the RAM?


RAM isn't a significant bottleneck for us at the moment.
"Clothes make the man. Naked people have little or no influence on society." - Mark Twain
Zedwick
Guardian
 


Posts: 1900
Joined: Thu Mar 29, 2012 3:46 pm
Location: England
Minecraft IGN: Zedwick

Re: Give us some insight

Postby ffMathy » Sat Feb 23, 2013 4:46 pm

Alright, so I did some research, and a couple of things come to mind.

First of all, everything related to the java parameters is bullshit primarily. Most of what people say about optimization on that area is a lie or not nescessarily boosting the performance. Nevertheless, some optimizations are important to the way Java uses memory.

When launching the server, do it through the following command:

Code: Select all
java -server [b]-Xmx4048M -Xms4048M -XX:+AggressiveOpts -XX:+DisableExplicitGC -XX:+UseG1GC[/b] -jar minecraft_server.jar


The stuff in bold will allow Java to actually use 4096 megabytes (4 gigabytes) of RAM, compared to the 512 megabyte default. Furthermore, it makes the GC (garbage collector) more aggressive. One thing is how much a server consumes, but that's not all that matters. If the memory is fragmented (which often happens when many people are on and more memory is consumed), it also decreases performance.

I also couldn't help but noticing that the view distance of the server is at around 10. This means that X amount of blocks get sent to the client, regardless of their client view distance. The default value is 10, the maximum value is 15 (set in the server.properties file) and the normal value is 8. A value of 8 or 6 should be acceptable among players, and many servers use this.

The last suggestion I have is to make a RAM-disk. I'll now quote a resource I found online:

Lastly, you will probably want to cut down on I/O waits generated from reading/writing chunks a lot. You cannot reduce the number of waits, but you can cut down on the duration of the waits by stuffing the map into a ramdisk using a tmpfs (ramdisk and tmpfs make for good keywords for google if youve never done this before). A regular map on a SMP server is likely to be around 2GB+ in size, but I doubt a UHC map would even come close to reach 512M, but you should have numbers for this from previous UHCs).

For minecraft you would create a ramdisk of the required size and mount it to ~/server-dir/World-dir/:


mount -t tmpfs -o size=1G,nr_inodes=10k,mode=0775,noatime,nodiratime tmpfs /path/to/World-dir/

echo “1″ > /proc/sys/vm/swappiness

the last part helps avoiding swapping

Now RAM is volatile, so you will probably want to set up a cronjob that periodically (incrementally!) rsyncs the map to disk - because doing backups is always a good idea. Every 30 minutes should be fine.


This will gain you huge performance boost.

I hope some of this helps.
ffMathy
 


Posts: 11
Joined: Mon Jan 07, 2013 12:13 am
Minecraft IGN: ffMathy

Re: Give us some insight

Postby AwsomeG2 » Tue Feb 26, 2013 3:47 pm

I would assume the server is hosted by someone other than Zedwick, using a different boot file would most likely not be an option.
Image
AwsomeG2
Zesty
 


Posts: 206
Joined: Tue Sep 18, 2012 3:54 am
Location: Mexico
Minecraft IGN: AwsomeG2

Re: Give us some insight

Postby Zedwick » Wed Feb 27, 2013 6:47 am

I am wary of the extra parameters you have suggested for java. Without knowing what they actually do and how it will affect Minecraft, I wouldn't like to blindly add them in. I will do some research on the ones you've given.

With view distance, I have tried reducing it but came across a bug with doing so. If my view distance were 7, mobs would spawn within that radius and would then wander out beyond the radius and can then be prevented from despawning/being unloaded from memory. Oddly enough, this would end up with thousands of entities loaded in memory with no way to unload them - decreasing the number of mobs in the world whilst also causing lag. It's silly, but I had to go back up to 10 to avoid this.

With the RAMdisk, Zedwork's world is 3.6GB in size. Not really feasible on our current hardware. Even if it were 2GB as suggested in the text, this would mean less RAM available for the server to use as memory. We currently spike up to around 3GB of RAM at peak times. Having a RAMdisk will be essential with more players, though. So I will likely attempt this after our next upgrade.
"Clothes make the man. Naked people have little or no influence on society." - Mark Twain
Zedwick
Guardian
 


Posts: 1900
Joined: Thu Mar 29, 2012 3:46 pm
Location: England
Minecraft IGN: Zedwick


Return to Suggestions/Requests

Who is online

Users browsing this forum: No registered users and 12 guests

cron