Archive for the 'Hosting' Category

Startup Script Created

Thursday, November 19th, 2009

For the past few days, the test version of the MUD has only been up when I was actively running it from my Linux shell account.

I’ve created a startup/restart script so it should be running all the time now, barring any catastrophic crash-explosions.

Telnet basternae.org port 4502 to connect.

Resource Usage For Basternae 3

Wednesday, July 1st, 2009

Here’s the resource usage for Basternae running on Mono on Ubuntu with 1 active user and 6 zones loaded:

USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root     24624  0.2  6.9  39284 25548 pts/0    SNl  21:40   0:08 mono Basternae.exe

I have to imagine with a full complement of zones and a few active players that the memory usage will reach 64MB VSZ and 48MB RSS with probably about 1.2% CPU usage.  This would be well within the abilities of the current hosting and would use about 15% of the overall available resources.

What I am a little afraid of is memory leakage.  Contrary to popular folklore, running C# does not completely eliminate memory leakage, it just makes it easier to avoid.  The nice thing is that I’ve designed all of the game objects with instance counters, so at any time I can get a count of how many rooms, objects, mobiles, etc. exist in memory at any given time, whether they’re actually active in the game or not.  This will make it easier to track down leaks if any happen.

Worst case is if resource usage expands drastically we may have to upgrade from the Linode 360 to the Linode 540.  In that case, running Basternae would cost a total of $120 per year.  I’ve been spending that much on lunch every two weeks (I really need to cut down, but I work next to all of the best restaurants in my city), so it’s not exactly a huge number in the grand scheme of things.

It should also be mentioned that on Windows, memory usage is only 14MB.  Running on Linux/Mono requires a lot more resources.  Part of this is because some of the things used by .NET are automatically loaded by the Windows OS so they don’t contribute to memory size, and part of it is because in a way Mono is actually a “Windows software emulator” and is less optimal than something like a C executable compiled to run natively.

22 Hours Uptime

Monday, May 11th, 2009

Mind you, only about 5 players have logged into the Magma 3.04 demo site, but it’s been up 22 hours so far.

I remember back when Magma was first being developed. An hour of uptime was considered a good thing.

Funny how things progress. I remember my first MUD in 1999, Illustrium Arcana, running on a Cyrix 6×86-PR200 on a 32MB machine co-located on a friend’s ISP (stax.net, apparently shut down around the end of 2006). Having T1 access was so amazing ten years ago. Now I’d be angry if my cable modem slowed down to 1.5 MBPS.

The original Cyrix machine ran at about 200 BogoMIPS, which was screaming fast. Right now I have what is effectively 1/10 of a Xeon 2.5 GHz processor. That gives me 500 BogoMIPS and 320 MB of RAM. That’s more than enough to run a MUD and a few websites.

Moved To A New Host

Sunday, May 10th, 2009

Basternae.org has moved to a new host.  We are no longer on Hostmonster and are now on Linode.

Why Move?

Hostmonster is a great host and you get a *LOT* for the money considering that it’s less than $10 per month if you prepay. I’ve just simply outgrown it. I how have ~30 domains, ~30 databases, 6GB of data, and run all manner of things — Wordpress, Drupal, Django, and custom Python and PHP scripts.

Hostmonster can almost support all of that. If I had 20 domains or less I *almost* wouldn’t have any trouble. However, here are the limitations that I’ve outgrown:

1. 32MB PHP memory limit. This is a wall that larger Drupal sites will hit regularly.
2. If you’re doing something they don’t like, your account can be suspended instantly. This happened to me once when some Chinese bot was spamming a database script and was performing what they called “long-running queries”. A call to tech support straightened it out (I had to delete a few files, but wasn’t using them anyway).
3. Support for Python and Django is pretty sparse. Since I’ve consumed the Python kool-aid, this has suddenly become important.
4. Lack of customization ability. Since it’s shared hosting, they don’t want me possibly screwing it up for other people.
5. No support for long-running processes. I couldn’t run a MUD on it.

These are things that most mere mortals wouldn’t run into, and if you’re just starting off with web design/development, I do recommend starting with Hostmonster. Everyone eventually outgrows shared hosting. It took me three years.

The New Host

Why would I choose Linode? I’ve mentioned in previous posts that I like Slicehost, and Linode is almost exactly the same thing — Linux-based Xen VPS (Virtual Private Server) hosting.

What pushed me over the top is that for the basic $20 per month plan I get 320MB of RAM at Linode instead of 256MB I would get at Slicehost *and* Linode allows you to run a 32-bit OS, while Slicehost is 64-bit only. That’s not just 64MB more memory, it’s more like 128MB more according to statistics I’ve seen on memory use for 64-bit Ubuntu.

I am extremely RAM-hungry. I eat it like candy.

Setting Up The New Server

Friday evening I signed up for Linode. I had an Ubuntu 9.04 VPS up and running in 10 minutes. There was nothing to do for basic configuration — network, DNS, ssh, it was all good out of the box. It was a naked server with pretty much nothing on it (not even a web server), but that was exactly what I wanted since I was going to configure the machine from scratch.

Knowing what a memory hog the Apache web server is, I went something faster and more lightweight — nginx (”Engine X”). Nginx isn’t very well-documented if you don’t speak Russian, so I had to spend some time trolling blogs and forums to get the info needed to set up PHP and FastCGI and a few dozen virtual hosts.

This is also the first time I’ve tried using Drupal multi-site. It’s been such a hassle updating Drupal modules on every site each time there’s an update or security fix, so I wanted to use one core codebase. It was far easier to set up than I had ever imagined (just add a separate directory in your sites folder for each domain).

I had to install a boatload of modules, move a ton of content, set up scads of virtual host files, edit piles of configuration files, configure and export/import dozens of databases, and all of that other craziness involved with setting up a web server from scratch. This took part of Friday, all of Saturday, and half of Sunday.

In the process I also upgraded a few Drupal installs from v5 to v6. It’s not a very pretty process if you have complex custom views.

The most annoying part of the update was getting the nginx rewrite rule for Wordpress set up so that the CSS file would actually load. For a few hours this site was just plain text on a white background.

I still have a few sites to move (the *big* ones) and a few kinks to work out, but I’m already pretty happy with the server — it is much more snappy and responsive, and I can edit sites faster thanks to quicker page loads.

If you’ve outgrown shared hosting and know Linux well, I recommend moving to Linode.

Mass Refactoring

Wednesday, April 2nd, 2008

In the interest of making sure the MUD can be modified easily well into the future I’ve broken the heck out of the codebase.

Yep.

I’ve been refactoring, rearranging, renaming, and restructuring things so they make a lot more sense. That has inevitably broken a few things, but it will be far easier to add new types, flags, and enumerations in the future — things like adding a new terrain type without breaking existing terrain types or having to recompile the editor and re-convert all of the zones.

Believe me, we had quite a headache with zone file format changes on Basternae 2 and I don’t want to repeat it.

This means that it’ll take a few days before the codebase will build again and I’ll have some work to do on the converter and the editor, but it’ll be worth it.

I’m still looking at putting up a test server in May and so far Slicehost is the most likely candidate. Feel free to offer suggestions. Since it’s out-of-pocket and non-income-producing, my budget isn’t any more than $20 per month (should I be accepting donations for this?)

Got The .NET

Thursday, February 7th, 2008

Not much to report today, but I picked up the basternae.net domain.  Now the full trilogy points here (.com, .net, and .org).  Yippee!

Got The Dotcom

Tuesday, December 25th, 2007

It seems that the domain Basternae.com recently became available.  I bought it, so both basternae.org and basternae.com point here.  Yippee!

A Likely Host

Wednesday, November 21st, 2007

After spending a while shopping around it looks like I’ve found the place to put a Basternae server when the time comes for on-line testing: Slicehost (http://www.slicehost.com)

Their virtual private server (VPS) hosting starts at $20 a month and is easy to upgrade. I don’t want to spend much since MUDs typically don’t generate any income whatsoever, and Slicehost ought to be a relatively painless way to go.

The head web application programmer here at work uses them and only has good things to say.

Server Options

Friday, June 1st, 2007

I know it’s a little premature at this point, but I’ve started to think a bit about server options. There are a lot of different things I could do, with various cost/reliability/control considerations.

The primary decision is broken into one of four options:

1. Host it from home.
This would require configuring dynamic DNS and would probably be a slow connection. I have 512Kbps upstream, so that wouldn’t be too slow unless a significant number of players connected. What it would save in hosting costs it would certainly eat up in electricity costs. I’m not sure the exact amount, but leaving a computer on 24 hours a day costs me somewhere betwen 25 and 40 dollars per month in electricity. All in all a generally bad idea.

2. Sign up for co-location or a dedicated server.
An expensive route, but there is no shortage of control. At somewhere like aplus.com I could get a nice dedicated server for $99/month and a passable (celeron 1.7GHz w/512MB) server for $49 per month. I would be able to host all of my other domains and webspace all in one place. Other services offer similar packages, but pretty much none start under $50. This would probably be overkill for the web presence I have.

3. Try to get “free” hosting.
I might be able to find someone I know with server space available or find someone willing to host the MUD. This would be a good idea right until the point where whoever was hosting got sick of doing so. Too dangerous considering you get what you pay for.

4. Sign up for shared MUD hosting. This is probably the most sensible route for now. Here’s a comparison of what can be had at the various hosting services for $20 per month:

MudMagic: 300MB disk, 50MB RAM, 4% CPU, unlimited connections.
GenesisMUDs: 400MB disk, 55MB RAM, 15% CPU, unlimited connections. [actually $19.50/month]
Silverden: 100MBdisk, 20MB RAM, (CPU not listed), unlimited connections.
MUDDrake: 500MB disk, 48MB RAM, (CPU not listed), unlimited connections.
Dune Internet: 500MB disk, 60MB RAM, (CPU not listed), unlimited connections. [actually $16.00/month]
InfoLaunch: 600MB disk, 45MB RAM, 10% CPU, unlimited connections.
Mu-Host.com: 500MB disk, 75MB RAM, (CPU not listed), connections not listed.

Silverden is offering the most ridiculous of packages, woefully inadequate to any sort of task, and since they are offering a Pentium 200 dedicated server I’ll have to assume that they’ve gone out of business and just hadn’t bothered to take their site down.

Dune internet and Mu-Host look the best, especially since the major consideration has always been RAM more than processor in any MUD I’ve worked on. Right now, with only a couple zones connected, the server uses 18 megabytes of RAM. This is the debugger-profiler version, so it’s a bit more bloated, but it’s not unrealistic to expect to be using about 40-48 megs when fully assembled.

The irritating thing, though, is that most of the companies that list CPU percentage don’t bother to list the TYPE of CPU you’re getting a percentage of. For all I know MUDMagic could be offering 4% of a Pentium 200 while GenesisMUDs is offering 15% of Pentium Core Duo e6700. All CPUs are not the same.

If I were to pick a service I would probably go with Dune.