Server Help : Apache 2 and MySQL
I am very new to Linux.
I was planning on installing a Game Server (Minecraft Server). I would like to know if i install a Apache Web Server with MYSQL for my WordPress and MyBB Forum. Will the game server lag? I heard that it wouldn't lag if you install it properly. But how do i know that i installed it properly? Do you recommenced me installing the web server?
7 Replies
How much memory are you going to sink into this thing?
If I remember correctly, the footprint of a Minecraft server is humongous!
im currently using linode 1 GB plan
Well, as long as you ensure that the Minecraft server isn't set to consume all the memory, you should be fine.
Let's say you limit it to 60-80% memory consumption, and tweak the apache/mysql config to utilize the rest.
You can probably find a bunch of info on this in the Linode Library
I'm guessing all of these applications will largely be memory bound, so you should just make sure that you're not constantly swapping.
@seaarmy:
well that was useful, but how do we set up the memory?
When it comes to Minecraft, you should probably look into something like this
The webserver part can be a bit complex, so I really recommend you read the article for the proper distro in the linode library.
@seaarmy:
as read in some forum and Linode Support. They said you will have to install it properly in order to make it run well. or eat less ram. is that true? how do i know it installed properly?
If you don't have at least 1GB free to assign to the Java interpreter it runs under (which means a Linode larger than 1024), you can restrict Minecraft's java environment memory options (e.g., lower the -Xmx maximum memory option). You'll definitely want to ensure that the minimum memory (-Xms) leaves enough room for everything else on the box. The server will warn if the maximum is configured less than 1GB, but in my experience it doesn't absolutely need all of it. Though making that too small risks a catastrophic failure if the interpreter runs out, while having it higher than your Linode can provide risks swapping and performance of the entire machine tanking. Pick your poison :-)
The actual installation is pretty trivial, but also very manual. Stick the jar somewhere and run it, plus any config tweaks like white-listing your players. All configuration is through text files you edit. If you're on a Debian-based distribution, there's a useful init.d module on the Wiki (http://www.minecraftwiki.net/wiki/Serverstartupscript
I'm actually running a Minecraft server on a Linode 512 (just for a nephew and a handful of friends, no more than 3 simultaneous sessions) and it does work, but the machine is doing virtually nothing else, and requires babysitting since sometimes the memory spikes and I need to restart it - the Minecraft server, not the machine - to bring it back under control. In my case I've left the Java memory size at 1GB and just monitor actual usage. Typical memory usage is probably in the 300-400MB range for a decently complex world. Looking at the clients, I think the memory spikes seem related to buffering requirements going up heavily when you have long latency or lossy client sessions. It doesn't really seem to be dependent on world size. I only have 3 simultaneous clients, so expect it might be worse with more. I've read some comments about the protocol in use being, shall we say, somewhat flawed and simplistic.
So definitely don't take the memory requirements lightly, especially if you want to do anything else on the same box. Since you want some other big users (blog/forum/database) on the same node I wouldn't even think of anything less than a Linode 1024 and that's probably not big enough if you want this to be "set it and forget it." If you were able, you could monitor for a while to decide. But if you're looking for more certainty, go bigger. Or perhaps better, put the Minecraft server on a separate Linode so even if it burps or spikes memory usage, it won't run into your other services.
– David