Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (108)
games submitted by our members
Games in WIP (536)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Using VPS For Game Servers  (Read 5975 times)
0 Members and 1 Guest are viewing this topic.
Offline Nate

JGO Kernel


Medals: 145
Projects: 4
Exp: 14 years


Esoteric Software


« Posted 2010-09-30 12:11:10 »

Hey, slicehost looks cool. How do you like it? I think I might sign up. I've been freeloading my host on a friends server for nearly 10 years. Smiley PM me your email address and I will enter it in the sign up form. After 3 months you'll get a credit that is 25% of whatever slice I buy.

Well, before I fully commit to slicehost, does anyone else have an opinion?

FWIW, I want to host a server for my Android game. It is too early to do load testing, but it isn't CPU, memory, or bandwidth intensive per game. I can say bandwidth is about 35 bytes per second per game. I guess the most important thing for me is I want players to have low ping. Slicehost is in Missouri, nearly the center of the US. Do you think this will sufficiently serve the US? Will other countries get total crap pings? My game is not super sensitive to latency, but it is more pleasant to have low ping. I need more testing, but I'd guess <250ms would be acceptable.

Edit: Chatted with Slicehost. They claim 60-120 ms from Europe, and generally much lower in the US. Of course lots of factors are involved.

Offline Eli Delventhal

JGO Kernel


Medals: 42
Projects: 11
Exp: 10 years


Game Engineer


« Reply #1 - Posted 2010-09-30 19:56:50 »

Yeah, this looks quite cool for hosting game servers and lobbies. I don't quite understand, though - do you need to send them your own box and then they plug it in? Or is the usual deal where you just buy one from them?

See my work:
OTC Software
Offline SimonH
« Reply #2 - Posted 2010-09-30 20:11:33 »

Are you sure that it means the CPU is running at 100% usage, or is it that out of your allocated resources (time, CPU, disc, DB &c) 100% is spent on the CPU?.

EDIT: Lol! Missed solution post!

People make games and games make people
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline neoskunk

Junior Member





« Reply #3 - Posted 2010-09-30 20:12:38 »

@Nate my email is g.scov@hotmail.com.  I like it alot so far.  I have never run a server before or even used linux but i was able to get my server program up and running in less than a day.  Everything is done through SSH, which was something new to me.

@Eli you just buy one from them.  but it is virtual private hosting, meaning you share the box with other people but you have full root access.

on a side note, do either of you know much about linux?  the server i have is running ubuntu 10.04.  i need to run my java application and leave it running.  so far the only way i have been able to run my program is through SSH.  How do you start a java program and leave it running even when i am not connected through ssh?  i talked to some admin at slicehost and they mentioned a linux startup script or something like that?
Offline irreversible_kev

Junior Member





« Reply #4 - Posted 2010-09-30 20:27:49 »

A great index of cheap VPS hosting is available through http://www.lowendbox.com/

I bought a VPS for £5.82 per month to try out some java Socket stuff...

I installed VNC & Gnome so that I could remote desktop to it.
Offline teletubo
« League of Dukes »

JGO Ninja


Medals: 48
Projects: 4
Exp: 8 years



« Reply #5 - Posted 2010-09-30 20:50:57 »

Nate,
I use  VPSlink link 2  ) for my games high scores (pomplets and hellevators) .
When I was writing Pomplets high score server, I was thinking in someday implementing a real-time online game, so  I've written a small ping test for each client which connected to check/submit high scores .  For each client, it logs the date, IP and latency of a simple ping-pong .  If you're interested in the raw data I can send it to you .

Offline teletubo
« League of Dukes »

JGO Ninja


Medals: 48
Projects: 4
Exp: 8 years



« Reply #6 - Posted 2010-09-30 20:54:47 »

on a side note, do either of you know much about linux?  the server i have is running ubuntu 10.04.  i need to run my java application and leave it running.  so far the only way i have been able to run my program is through SSH.  How do you start a java program and leave it running even when i am not connected through ssh?  i talked to some admin at slicehost and they mentioned a linux startup script or something like that?

you can start you server using nohup .

for example :
1  
nohup java -jar myServer.jar &


the & tell it to run on the background . (That is , the java console will not hijack you shell)

another option is to use screen  , however I think it will be easier to just use nohup .

to check if your process is still running, type
1  
ps -ef | grep java 

Online Riven
« League of Dukes »

JGO Overlord


Medals: 751
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #7 - Posted 2010-09-30 22:06:56 »

How do you start a java program and leave it running even when i am not connected through ssh?  i talked to some admin at slicehost and they mentioned a linux startup script or something like that?

I'd also pick screen as it allows you to watch both STDOUT and STDERR without too much hassle.

To create a new, named console, type:
screen -S MyName

Then launch your application:
java -jar stuff.jar

You can detach from your console using:
CTRL+A+D


To attach to a detached console, use:
screen -r MyName

To forcibly detach a zombie console, use: (this happens if your connection drops while attached)
screen -d MyName
then attach again
screen -r MyName


To launch your application when the server boots:
screen -S MyName -m -d java -jar stuff.jar
Put that line in /etc/rc.local

Note that this will launch the service with root-access, so read up on linux administration to fix that.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline Nate

JGO Kernel


Medals: 145
Projects: 4
Exp: 14 years


Esoteric Software


« Reply #8 - Posted 2010-09-30 22:50:16 »

Yeah, this looks quite cool for hosting game servers and lobbies. I don't quite understand, though - do you need to send them your own box and then they plug it in? Or is the usual deal where you just buy one from them?

They allocate you some portion of a server's CPU/RAM/HDD/bandwidth. The text on their site that talks about "your boxes are our boxes" is just trying to say they really care about customers, blah blah. They use 32gb quad core machines. They don't say how much of one machine goes to a given "slice", only that a 1024 slice has 4x the cycles of a 256 host. They do say that your slice can go over your allocated CPU usage if other slices don't need it.

A great index of cheap VPS hosting is available through http://www.lowendbox.com/

I bought a VPS for £5.82 per month to try out some java Socket stuff...

Wow, I didn't realize you could do it for so cheap. While I don't want to waste money, I also don't require rock bottom pricing. $50USD/month would be fine if the extra is buying me something, with the ability to scale if needed.

Nate,
I use  VPSlink link 2  ) for my games high scores (pomplets and hellevators) .
When I was writing Pomplets high score server, I was thinking in someday implementing a real-time online game, so  I've written a small ping test for each client which connected to check/submit high scores .  For each client, it logs the date, IP and latency of a simple ping-pong .  If you're interested in the raw data I can send it to you .

Do you remember vaguely what the ping times were like? VPSLink looks acceptable. It is slightly cheaper than Slicehost. Slicehost has better marketing toward developers.

Offline neoskunk

Junior Member





« Reply #9 - Posted 2010-10-01 00:37:57 »

thanks riven! screen is awesome! just what i needed.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline DzzD
« Reply #10 - Posted 2010-10-01 00:45:32 »

Quote
How do you start a java program and leave it running even when i am not connected through ssh? i talked to some admin at slicehost and they mentioned a linux startup script or something like that?
you ask some linus admin , do I miss something ? already mentionned but... once again in all linux/unix command line prompt you can run a program in backgroung using "&" at end of line

Quote
prompt >> java -jar program.jar &

can someone point me the interrest of using anything else than "&" ? (that's a real question ...)

Online Riven
« League of Dukes »

JGO Overlord


Medals: 751
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #11 - Posted 2010-10-01 00:51:33 »

can someone point me the interrest of using anything else than "&" ? (that's a real question ...)

You might be interested in stdout/stderr for simple logging / dumping / debugging.

Sure, you can dump those streams to a file, but then you have two files. You can also interleave the two streams, and write it to one file, and you'd have to 'tail -f *.log', but then you wouldn't be able to figure out which line belongs to which stream.

In the end, you (probably) try to reproduce the eclipse console: interleaved stdout/stderr, and that's exactly what you get with 'screen' (without the scrollbar)

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline DzzD
« Reply #12 - Posted 2010-10-01 01:01:35 »

thanks Riven (to be honest, still try to understand everything right but anyway I am sure that if those programs exist they must have an interrest)

as you mention basic 1>stdout.txt 2>stderr.txt and tail -f  have always been fine for me

Online Riven
« League of Dukes »

JGO Overlord


Medals: 751
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #13 - Posted 2010-10-01 01:10:01 »

thanks Riven (to be honest, still try to understand everything right but anyway I am sure that if those programs exist they must have an interrest)

as you mention basic 1>stdout.txt 2>stderr.txt and tail -f  have always been fine for me

Also, you can hit CTRL+C, sending the term-signal to the process.
Further, you have command-history per console, for a quick restart, or for changing the parameters.
IMHO its just easier, no messing with pids, just one console per application.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline Eli Delventhal

JGO Kernel


Medals: 42
Projects: 11
Exp: 10 years


Game Engineer


« Reply #14 - Posted 2010-10-01 01:40:16 »

Wow, this has turned into a wonderfully informative post. I'm keeping this bookmarked so that when I do all this in the near future I have a nice collection of information.

Is there a way to run Ruby on these boxes? And if everyone gets access to root, how do I avoid someone messing with me and deleting my initializer scripts?

See my work:
OTC Software
Online Riven
« League of Dukes »

JGO Overlord


Medals: 751
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #15 - Posted 2010-10-01 01:44:05 »

Is there a way to run Ruby on these boxes? And if everyone gets access to root, how do I avoid someone messing with me and deleting my initializer scripts?

Think of a VPS (virtual private server) as a piece of a harddisk, a piece of ram, a piece of CPU, all isolated from eachother. A (true) server that has X VPS's running, has X operating systems installed and concurrently running. It might even be linux/windows/dos on the same hardware, all thinking they have exclusive access to hardware, while everything is emulated (with marginal overhead).

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline ruben01

Senior Member


Medals: 4
Projects: 3



« Reply #16 - Posted 2010-10-01 03:58:00 »

Hi, I used to have a Slicehost server with 512 MB of ram as a development server, used it for hudson, nexus, svn, trac, and some static content.

The main problem always was the amount of ram, as soon as you start using swap the server just becomes way too slow to be useful.

We eventually changed  from Slicehost to Linode because of the ram issue. Linode offers twice the amount of ram for the same price. If the situation was a temporary thing and there were any plans to improve the price in slicehost we would have stayed, as the service is excellent, but if you read their forums they have said that their focus is on big clients who need the ability to rent a lot of servers in a short time, and stuff like that. We had the server in slicehost for years, and the amount of ram was the same for the price we paid, no improvement in the ram/price.

hope this info helps.

Of course, I have no affiliation whatsoever with slicehost, or linode other than having used their service.

Offline teletubo
« League of Dukes »

JGO Ninja


Medals: 48
Projects: 4
Exp: 8 years



« Reply #17 - Posted 2010-10-01 04:33:07 »

Do you remember vaguely what the ping times were like? VPSLink looks acceptable. It is slightly cheaper than Slicehost. Slicehost has better marketing toward developers.


you can see the latencies I collected here . . I have disable the latency tester after a few days so that's why you just have some days .  The IP is in the format describe here so you can see which country it belongs .

Offline Nate

JGO Kernel


Medals: 145
Projects: 4
Exp: 14 years


Esoteric Software


« Reply #18 - Posted 2010-10-01 06:13:17 »

Thanks teletubo!

And thanks ruben01 for pointing out Linode. They have cheaper bandwidth overages, list how many nodes are on each machine, and best of all, have a datacenter in Europe. Sweet!

Offline markus.borbely

Junior Member





« Reply #19 - Posted 2010-10-01 12:48:25 »

Thanks teletubo!

And thanks ruben01 for pointing out Linode. They have cheaper bandwidth overages, list how many nodes are on each machine, and best of all, have a datacenter in Europe. Sweet!

I had a Linode for a year, very happy with them. The admin gui is very nice.
Offline Nate

JGO Kernel


Medals: 145
Projects: 4
Exp: 14 years


Esoteric Software


« Reply #20 - Posted 2010-10-01 13:50:11 »

Does anyone have recommendations for what distro to use? I don't know what really matters.

Online Riven
« League of Dukes »

JGO Overlord


Medals: 751
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #21 - Posted 2010-10-01 14:22:57 »

It doesn't really matter. Only if you're running critical applications on that server, and you rely on very specific things in the distro, you should worry about which you should install.

I'd advice debian (if you prefer rock-solid-out-dated packages) or CentOS (which is the free/unsupported version of RedHat). With Debian you have to do some extra work (adding a repo) to install the latest software like MySQL 5.2

I think it's much more important whether you use yum or apt to install your packages. All distro's have their own preinstalled package manager, but you can pull one package manage through the other Smiley

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline Nate

JGO Kernel


Medals: 145
Projects: 4
Exp: 14 years


Esoteric Software


« Reply #22 - Posted 2010-10-03 09:25:25 »

Went with a 512mb Linode. I used woogley's referral code I found on the forums. Here is my code if anyone would be so kind... Smiley
96b3cca89283fac6babee9b4de25cdc044a40e14
$17.60/month for 2 years. If I cancel early then I don't get the savings, but still get the remainder of my money back (minuse $5). Used their script to install Debian 5 with LAMP:
http://www.linode.com/stackscripts/view/?StackScriptID=10
That sets up a virtual host, which made it easy to edit and copy for my domains. The Linode Library is very useful. With little more effort I now have everything set up: Java, SVN, etc. Super cool! I'll post a new thread in a while and we'll see what people's ping is like. If my game takes off, I can have a US west coast, east coast, and a London server for ~$53/month, which is fantastic! Assuming 512mb RAM is sufficient of course.

The screen command came in handy, thanks Riven!

Thanks neoskunk for letting me hijack your thread. Smiley

Offline Eli Delventhal

JGO Kernel


Medals: 42
Projects: 11
Exp: 10 years


Game Engineer


« Reply #23 - Posted 2010-12-07 22:20:02 »

I found this:

http://hazenet.co.uk/vps.html

And I was thinking of getting the 2048mb option. I had a question, though - I'm not really good at judging bandwidth usage and connection speed requirements. Is "UNMETERED 7mbit Or 1000GB @ 100mbit" fast enough to serve most multiplayer games comfortably? How much bandwidth does a game typically use up? What usage amounts do you guys see in your games?

See my work:
OTC Software
Online Riven
« League of Dukes »

JGO Overlord


Medals: 751
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #24 - Posted 2010-12-07 22:38:56 »

One warning: don't have lengthy contracts with dirt cheap webhosters. Most are horribly slow, or becomes horribly slow. Pay for a month, see how it goes, and pay for the next.

Regarding bandwidth vs. datatraffic: for a n00b (hosting wise), I'd always advice traffic.

7mbit bandwidth is nothing: it's 700kb/sec, which might sound like a lot, but keep in mind how much I/O you will do when loading a level. Or even worse, let's say you have a few game files to download (jars, textures, audio)... and you don't want to host them on yet another server... One or two players will lag the entire server.

Pick 100mbit, and a fixed amount of datatraffic.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline Nate

JGO Kernel


Medals: 145
Projects: 4
Exp: 14 years


Esoteric Software


« Reply #25 - Posted 2010-12-08 07:27:09 »

I love my Linode. Haven't gotten my game finished, Sad, so I don't know how well it will run under load yet.

That hazenet link seems waaaay cheap. There just has to be a downside.

Online Riven
« League of Dukes »

JGO Overlord


Medals: 751
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #26 - Posted 2010-12-08 11:32:52 »

You can get: cheap, fast, reliable

Pick two.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Online Riven
« League of Dukes »

JGO Overlord


Medals: 751
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #27 - Posted 2010-12-08 11:35:17 »


From the site:
Quote
NEW: Every single client is entered into a monthly prize draw, you could win a Remote Controlled Helicopter, or a flexible indestructible keyboard and loads more prizes, shipped for free worldwide! Click here for more details!

You may be wondering why our prices are so cheap, its because we cut out all the nonsense

persecutioncomplex

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline Mike

JGO Ninja


Medals: 71
Projects: 1
Exp: 5 years


Java guru wanabee


« Reply #28 - Posted 2010-12-08 12:17:17 »

I use a GoDaddy VPS since a couple of weeks and it's running fine. I have it hosted in Amsterdam (a few kilometers from my house) and I have a ping of under 20ms (a friend in Sweden has about 23ms with my server). Download rates according to speedtest.net is at 100mbit and upload is at 65mbit (shouldn't it be the other way around with servers? Ah well...).

2 GB ram, windows 2008 R2 (What can I say, I'm much quicker in doing things in Windows Smiley) for something like 17 euro per month.

Mike

My current game, Minecraft meets Farmville and goes online Smiley
State of Fortune | Discussion thread @ JGO
Offline Eli Delventhal

JGO Kernel


Medals: 42
Projects: 11
Exp: 10 years


Game Engineer


« Reply #29 - Posted 2010-12-09 00:34:48 »

From the site:
persecutioncomplex
Yeah, I ended up going with 123systems.net and it seems good so far. The box was outdated and stuff when I got it, but I've just had to update some things, install others, etc. and now it's fine.

See my work:
OTC Software
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

CogWheelz (18 views)
2014-07-30 21:08:39

Riven (23 views)
2014-07-29 18:09:19

Riven (15 views)
2014-07-29 18:08:52

Dwinin (12 views)
2014-07-29 10:59:34

E.R. Fleming (33 views)
2014-07-29 03:07:13

E.R. Fleming (12 views)
2014-07-29 03:06:25

pw (43 views)
2014-07-24 01:59:36

Riven (43 views)
2014-07-23 21:16:32

Riven (30 views)
2014-07-23 21:07:15

Riven (31 views)
2014-07-23 20:56:16
List of Learning Resources
by SilverTiger
2014-07-31 18:29:50

List of Learning Resources
by SilverTiger
2014-07-31 18:26:06

List of Learning Resources
by SilverTiger
2014-07-31 13:54:12

HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!