gardenboy
Posts: 1
Joined: Tue Jan 29, 2013 7:54 am

Re: Minecraft server - How To

Tue Jan 29, 2013 8:00 am

FYI point (11) unable to download Java Jdk using wget you could try this on the terminal.

Code: Select all

wget --no-cookies --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com" "http://www.java.net/download/JavaFXarm/jdk-8-ea-b36e-linux-arm-hflt-29_nov_2012.tar.gz"

feerlessleedr
Posts: 1
Joined: Tue Jan 29, 2013 5:40 pm

Re: Minecraft server - How To

Tue Jan 29, 2013 5:49 pm

Would a cluster of Pi's support a server well? Would it do any better than an individual pi? I have two coming in the mail and I want to get into clustering. I know that clusters don't help graphics performance, but as far as I know the server side doesn't actually do any graphics stuff, just numbers.

I'm new to this thing, so if somebody has specific instructions that differ from most of the guides out there on clustering sharing that would be RAD.

Thanks,
TRH

Yamahanytro
Posts: 13
Joined: Wed Jan 02, 2013 10:22 pm

Re: Minecraft server - How To

Thu Jan 31, 2013 4:52 am

Thanks for the TUT! I finally got this working and its great! I also created a bash script to run the server and to update with a input prompt if I want to start the server after updating! I think this will get much use!

deadninja13
Posts: 3
Joined: Sat Feb 02, 2013 12:41 am

Re: Minecraft server - How To

Sat Feb 02, 2013 12:49 am

I got the server up and running but it is extremely laggy i cant break blocks or any thing. Can anyone help .
( i tried moving it to a usb drive and that did not help much)

randrade
Posts: 79
Joined: Thu Dec 27, 2012 8:42 pm
Contact: Website

Re: Minecraft server - How To

Sat Feb 02, 2013 12:39 pm

deadninja13 wrote:I got the server up and running but it is extremely laggy i cant break blocks or any thing. Can anyone help .
( i tried moving it to a usb drive and that did not help much)
What Raspberry Pi do you have? What distro? Are you running in desktop mode?

randrade
Posts: 79
Joined: Thu Dec 27, 2012 8:42 pm
Contact: Website

Re: Minecraft server - How To

Sat Feb 02, 2013 12:52 pm

feerlessleedr wrote:Would a cluster of Pi's support a server well? Would it do any better than an individual pi? I have two coming in the mail and I want to get into clustering. I know that clusters don't help graphics performance, but as far as I know the server side doesn't actually do any graphics stuff, just numbers.

I'm new to this thing, so if somebody has specific instructions that differ from most of the guides out there on clustering sharing that would be RAD.

Thanks,
TRH
I have no idea :D I don't know how clustered Pis work.

deadninja13
Posts: 3
Joined: Sat Feb 02, 2013 12:41 am

Re: Minecraft server - How To

Sat Feb 02, 2013 6:58 pm

randrade wrote:
deadninja13 wrote:I got the server up and running but it is extremely laggy i cant break blocks or any thing. Can anyone help .
( i tried moving it to a usb drive and that did not help much)
What Raspberry Pi do you have? What distro? Are you running in desktop mode?

i have the 512mb version and no im not running in desktop mode.

Yamahanytro
Posts: 13
Joined: Wed Jan 02, 2013 10:22 pm

Re: Minecraft server - How To

Sun Feb 03, 2013 8:44 pm

deadninja13 wrote:
randrade wrote:
deadninja13 wrote:I got the server up and running but it is extremely laggy i cant break blocks or any thing. Can anyone help .
( i tried moving it to a usb drive and that did not help much)
What Raspberry Pi do you have? What distro? Are you running in desktop mode?

i have the 512mb version and no im not running in desktop mode.
Did you make sure to set the memsplit? Also are you trying to break blocks in spawn?

deadninja13
Posts: 3
Joined: Sat Feb 02, 2013 12:41 am

Re: Minecraft server - How To

Sun Feb 03, 2013 10:23 pm

i have the 512mb version and no im not running in desktop mode.[/quote]
Did you make sure to set the memsplit? Also are you trying to break blocks in spawn?[/quote]

yes i set memsplit and im away from spawn and animals and mobs dont move and any entity besides the player does not move.

Yamahanytro
Posts: 13
Joined: Wed Jan 02, 2013 10:22 pm

Re: Minecraft server - How To

Mon Feb 04, 2013 12:48 am

deadninja13 wrote:i have the 512mb version and no im not running in desktop mode.
Did you make sure to set the memsplit? Also are you trying to break blocks in spawn?[/quote]

yes i set memsplit and im away from spawn and animals and mobs dont move and any entity besides the player does not move.[/quote]
I would suggest to go into server.properties and change the render distance so its about 4-6 and turn off hostile mobs, and the nether.

r00x
Posts: 41
Joined: Mon Feb 04, 2013 11:05 am

Re: Minecraft server - How To

Mon Feb 04, 2013 10:25 pm

Thanks for this guide, OP. I got it fired up over the weekend, and began performance optimisations. Loving my little Minecraft server :D

Currently it runs WITHOUT LAG (unless generating new chunks), though I'm still investigating what affects performance most dramatically.


My settings include setting the Pi to Turbo mode (1GHz) but also I'm launching the server with these memory settings, which made a huge difference to lag (note: Model B Pi only):

Code: Select all

-Xms384M -Xmx408M
There were some fairly heavy optimisations in the server.properties too:

- Disable nether
- Disable monsters (animals and NPCs active though - haven't tried monsters enabled yet)
- render distance reduced massively (to 3), doesn't seem to negatively impact play at all though
- build height reduced (not sure if necessary)

My server.properties:

Code: Select all

#Minecraft server properties
#Sun Feb 03 22:47:21 GMT 2013
server-port=25565
view-distance=3
motd=r00x's Raspberry Pi Server\!
enable-rcon=false
server-ip=
gamemode=0
hardcore=false
texture-pack=
enable-query=false
spawn-protection=16
online-mode=true
max-build-height=100
generate-structures=true
level-name=world
snooper-enabled=false
level-seed=
generator-settings=
level-type=DEFAULT
spawn-animals=true
difficulty=0
allow-flight=false
pvp=true
max-players=5
spawn-monsters=false
spawn-npcs=true
allow-nether=false
white-list=false

Interestingly, firing up top via SSH when logged into the server reveals the CPU is not maxing out. I'm not sure 1GHz is necessary for "full-speed" operation using the above settings. I haven't tried reducing it yet as Minecraft happens to be a fun way to test stability when overclocked. I think, if anything, the RAM and GPU 'core' (L2 cache) frequency might have more to do with any improvement than the 1GHz ARM core OC. Again, pure speculation. :) If I discover anything interesting I will post it here.

r00x
Posts: 41
Joined: Mon Feb 04, 2013 11:05 am

Re: Minecraft server - How To

Mon Feb 04, 2013 10:42 pm

Ok, tentatively tried a few minutes (minutes, mind you) at stock 700MHz with the above settings.

It takes longer to boot, and longer to start up the server, and longer to log in via a Minecraft client...

...but it seriously seems to run near perfectly, at least in terms of block placement/destruction/collecting item drops, which all respond instantly (again, when in an already extant chunk).

Top reveals CPU utilisation at stock is more like 90% when moving around (presumably causing the client to request world data) but about 50% when Steve is just stood still in Minecraft. So it's taking a noticably larger chunk of CPU time at stock clocks but still not smacking the ceiling for the most part.

As I haven't enabled hostile mobs I have no idea how responsive it is for that. I have murdered a few squid which seemed to work as expected. :D

Have yet to try sprinting my way across a biome - though I imagine new chunk generation will certainly induce lag as it would still do that somewhat on 1GHz.

What do you think, chaps and chapettes? Anyone else able to try a server with the above settings and confirm or deny my results?

randrade
Posts: 79
Joined: Thu Dec 27, 2012 8:42 pm
Contact: Website

Re: Minecraft server - How To

Mon Feb 04, 2013 10:45 pm

r00x wrote:Ok, tentatively tried a few minutes (minutes, mind you) at stock 700MHz with the above settings.

It takes longer to boot, and longer to start up the server, and longer to log in via a Minecraft client...

...but it seriously seems to run near perfectly, at least in terms of block placement/destruction/collecting item drops, which all respond instantly (again, when in an already extant chunk).

Top reveals CPU utilisation at stock is more like 90% when moving around (presumably causing the client to request world data) but about 50% when Steve is just stood still in Minecraft. So it's taking a noticably larger chunk of CPU time at stock clocks but still not smacking the ceiling for the most part.

As I haven't enabled hostile mobs I have no idea how responsive it is for that. I have murdered a few squid which seemed to work as expected. :D

Have yet to try sprinting my way across a biome - though I imagine new chunk generation will certainly induce lag as it would still do that somewhat on 1GHz.

What do you think, chaps and chapettes? Anyone else able to try a server with the above settings and confirm or deny my results?
Your memory settings improved my server a noticeable bit!

Not sure how chunk generation works under 1GHz, my Pi is at 800MHz.

qwerty95
Posts: 3
Joined: Tue Feb 05, 2013 5:52 am

Re: Minecraft server - How To

Tue Feb 05, 2013 5:56 am

When you says "your routers ip" is it the external ip address or internal? Thanks

8) After nano comes up on your screen, change "iface eth0 inet dhcp" to:

Code: Select all

iface eth0 inet static
address (any free network ip, for example 192.168.1.4 - you'll have to check what IPs your router assigns to network devices)
netmask 255.255.255.0
gateway (your router's ip)
nameserver (your router's ip)

r00x
Posts: 41
Joined: Mon Feb 04, 2013 11:05 am

Re: Minecraft server - How To

Tue Feb 05, 2013 9:40 am

qwerty95 wrote:When you says "your routers ip" is it the external ip address or internal? Thanks

8) After nano comes up on your screen, change "iface eth0 inet dhcp" to:

Code: Select all

iface eth0 inet static
address (any free network ip, for example 192.168.1.4 - you'll have to check what IPs your router assigns to network devices)
netmask 255.255.255.0
gateway (your router's ip)
nameserver (your router's ip)
I believe that would be the internal IP for the router as opposed to external, typical example 192.168.1.1 or 192.168.1.254.

teozfrank
Posts: 1
Joined: Tue Feb 05, 2013 11:55 am

Re: Minecraft server - How To

Tue Feb 05, 2013 11:58 am

must try this sometime looks good! also i seen your server.properties config try lowering the view distance down from 10 down to around 2-5 it will help!

r00x
Posts: 41
Joined: Mon Feb 04, 2013 11:05 am

Re: Minecraft server - How To

Tue Feb 05, 2013 8:34 pm

teozfrank wrote:must try this sometime looks good! also i seen your server.properties config try lowering the view distance down from 10 down to around 2-5 it will help!
Anything less than 3 is invalid I believe! It will complain when you try to launch the server.

But reducing it certainly helps! I think it helps keep the Pi's attention on a very small area of land around the player.

Of course when I say small, I mean in terms of the large size of the previous viewing distance radii :D

qwerty95
Posts: 3
Joined: Tue Feb 05, 2013 5:52 am

Re: Minecraft server - How To

Wed Feb 06, 2013 4:24 am

r00x wrote:
qwerty95 wrote:When you says "your routers ip" is it the external ip address or internal? Thanks

8) After nano comes up on your screen, change "iface eth0 inet dhcp" to:

Code: Select all

iface eth0 inet static
address (any free network ip, for example 192.168.1.4 - you'll have to check what IPs your router assigns to network devices)
netmask 255.255.255.0
gateway (your router's ip)
nameserver (your router's ip)
I believe that would be the internal IP for the router as opposed to external, typical example 192.168.1.1 or 192.168.1.254.
Thanks! :D

jamesmd95
Posts: 77
Joined: Sun Sep 16, 2012 7:47 pm
Location: Newcastle Upon Tyne
Contact: Website

Re: Minecraft server - How To

Wed Feb 06, 2013 11:14 pm

Thanks for sharing! I have set this up with craftbukkit and nospawn chunks. Makes it much less laggy! have a go :) picraft.zapto.org

I put a link to this post on my forum as it helped me set this up. BTW im no noob when it comes to minecraft hosting! http://kraftyhosting.eu
rapidwhois.uk | jmdawson.co.uk

crystalclaw
Posts: 9
Joined: Thu Feb 07, 2013 2:52 pm

Re: Minecraft server - How To

Thu Feb 07, 2013 3:06 pm

I have a 512MB model B, with the memory split you suggested. I installed java using the second part of this guide: http://www.savagehomeautomation.com/pro ... t-jre.html
it is much easier to just be able to type java <command> than /opt/java/jdk1.8.0/bin/ <command>.
This setup works so well, i can run the Direwolf20 server on normal settings, which has 60 mods. i do not get the "system time changed" error. I have not connected via a client yet, because i have some inconsistant mods, but i will try tonight.

r00x
Posts: 41
Joined: Mon Feb 04, 2013 11:05 am

Re: Minecraft server - How To

Thu Feb 07, 2013 3:32 pm

Interesting - what settings are you using (Xms, Xmx, Pi clockspeeds, SD card make & model?)

I found out jamesmd95 is running his Minecraft server on a 256MB model A, and it runs great thanks to overclocking, tweaked settings, and a fast SD card. This is amazing considering the bump to 512MB of RAM made such a large difference in performance for the Model B in Minecraft :D

crystalclaw
Posts: 9
Joined: Thu Feb 07, 2013 2:52 pm

Re: Minecraft server - How To

Thu Feb 07, 2013 4:26 pm

r00x wrote:Interesting - what settings are you using (Xms, Xmx, Pi clockspeeds, SD card make & model?)

I found out jamesmd95 is running his Minecraft server on a 256MB model A, and it runs great thanks to overclocking, tweaked settings, and a fast SD card. This is amazing considering the bump to 512MB of RAM made such a large difference in performance for the Model B in Minecraft :D
My specs:
clock speed: 1Ghz.
SD: Transcend SDHC 8GB type 4 card.
memsplit: 16MB to video card
ServerStart.sh:

Code: Select all

java -Xms128M -Xmx256M -jar ~/Server/ftbserver.jar nogui
had no idea this would run this well. thought it would be a fun experiment before i wiped my sd and tried for a media center. now, i might just keep it.
minecraft settings:

Code: Select all

#Minecraft server properties
#Thu Feb 07 10:23:26 CST 2013
generator-settings=
level-name=world
enable-query=false
allow-flight=true
server-port=25565
level-type=DEFAULT
enable-rcon=false
level-seed=
server-ip=
max-build-height=256
spawn-npcs=true
white-list=true
spawn-animals=true
hardcore=false
texture-pack=
online-mode=false
pvp=true
difficulty=1
gamemode=0
max-players=20
spawn-monsters=true
generate-structures=true
view-distance=10
motd=A Minecraft Server

r00x
Posts: 41
Joined: Mon Feb 04, 2013 11:05 am

Re: Minecraft server - How To

Thu Feb 07, 2013 4:45 pm

Nice! Try this in your ServerStart.sh (assuming you're just at the terminal when launching, otherwise don't do this!):

Code: Select all

java -Xms128M -Xmx408M -jar ~/Server/ftbserver.jar nogui
This will make use of the remaining RAM in your Pi and might make things a little faster still! :)

crystalclaw
Posts: 9
Joined: Thu Feb 07, 2013 2:52 pm

Re: Minecraft server - How To

Thu Feb 07, 2013 5:37 pm

r00x wrote:Nice! Try this in your ServerStart.sh (assuming you're just at the terminal when launching, otherwise don't do this!):

Code: Select all

java -Xms128M -Xmx408M -jar ~/Server/ftbserver.jar nogui
This will make use of the remaining RAM in your Pi and might make things a little faster still! :)
Thanks! I will try it when I get home tonight. I am not using desktop mode, I just start it using ./ServerStart.sh after I log in.

I will post the results and how it performs when a client is connected.

jamesmd95
Posts: 77
Joined: Sun Sep 16, 2012 7:47 pm
Location: Newcastle Upon Tyne
Contact: Website

Re: Minecraft server - How To

Thu Feb 07, 2013 5:53 pm

Decided to leave the pi hosted server up 24/7 if anyone is interested skype me: jamesdawson69, post on my forum http://computerpartsforsale.co.uk or email me :) james@jmdawson.co.uk
Last edited by jamesmd95 on Mon Oct 20, 2014 7:37 pm, edited 1 time in total.
rapidwhois.uk | jmdawson.co.uk

Return to “Networking and servers”