Testing the Digital Ocean $5 Cloud Servers with an MMORPG
|I've been working on an space-based MMORPG for a while now and I finally reached a point where the server was largely complete and ready for some load testing. I had done quite a bit of testing on my quad-core Xeon development system with great results. Renting a dedicated box like that one, and with a decent Internet connection would not be cheap, however. |
I was curious about Digital Ocean's offerings so I decided to take a couple of their smallest virtual machines for a test run. These 5 dollar/month cloud servers have 512MB of memory, a single virtual CPU, and 20 gigabytes of SSD disk storage. I created the first one, Maelstrom, in one of their New York data centers and the second one, Paradise, in their San Fransico facility. As claimed, each server took just under 60 seconds to deploy.
I made a few customizations to the bare-bones CentOS 6.5 64-bit image that I had selected for both machines. I then ran my personal benchmark package on both. On my 256 megabyte benchmark that emulates a relational database instance, I got about 25% of the performance of one of my Ivy Bridge Xeon cores. This benchmark stresses memory bandwidth, takes advantage of the full range of caches, as well as loading the CPU with integer-only operations.
I consider a fourth of an Ivy Bridge core an excellent result for a $5(US) server! I repeated the tests over the following days and got consistent results varying within a 10 percent range. One thing of note; the SF server consistently performed about 10% faster than the NY server.
Next, I loaded up a million-sector instance of my MMORPG server engine on the NY server and a bundle of testing scripts on the SF machine. The test suite, which emulates 712 concurrent players requires 1424 processes to do that. In retrospect, it wasn't too surprising that I crashed the SF machine as the testing scripts created an urgent demand for far more than 512 MB of memory! My mistake. I suspected that I wasn't going to be able to fully stress the game engine with far fewer emulated players.
But, always the optimist, I set up a gigabyte of swap space on Paradise and tried again. This time the tests ran just fine -- and the SSD-based swap space performed beautifully.
I got an average of 2500 game transactions per second over the duration of the test -- which should be more than enough for my target of 1000 concurrent players per realm. The SF machine used one half of the GB(!) of swap space while running the test scripts and hummed along happily at about 75% busy.
The NY server was fully stressed at about 98% CPU utilization and remained very responsive for the duration of the test.
I'm still running both systems three weeks later and have experienced no reboots or outages so far.
The New York server continues to run my text-based space MMORPG server back-end for game-play testing as the graphical front-end client is developed.
|mail this link | permapage | score:9962 | -Ray, May 13, 2014|
Apple DIY Repair
|I won't be buying any more Apple products. Here's why:|
I'm generally capable of repairing my own equipment and can recognize when self-repair has been deliberately undermined. I recently had to replace a hard drive in an early generation white Intel iMac. Innocently, I believed the interior was accessible and serviceable in the manner of the externally identical white PowerPC iMacs.
No such luck. Not only do you have to remove the LCD to get to the hard drive, but you must also remove shielding around the LCD -- mostly by tearing it to bits. No doubt it is attached this way so that an authorized Apple technician will be able to confidently void your warranty if you've ever worked on the system yourself.
You'll also need a #10 torx magnetic screwdriver. And, no, #10 torx bits just won't do due to the narrow and deeply recessed screw holes. Also, since most torx screwdrivers aren't magnetic, you'll probably need to tape the screws to the screwdriver to reattach the LCD. Good thing there's a hardware store near you.
Oh, and don't forget to pick up some rubber cement to 'properly' reattach the hard drive temperature sensor while you're out looking for magnetic torx screwdrivers.
Considering the logical design of its predecessor and the tamper-evident shielding, I'm certain that this machine has been deliberately designed to prevent the owner from performing DIY upgrades and repairs.
While that is all quite annoying, at least working on the system is possible for someone with experience and determination.
Now, Apple has improved their anti-customer techniques with the 'Pentalobe' screw. It doesn't solve any problem but one: it'll keep customers from even being able to open the case.
If you're curious about Apple's evil new invention, you can read its rap sheet and view its mug shot here.
|mail this link | permapage | score:9642 | -Ray, January 25, 2011|
Linux dominates Windows
|Linux dominates Windows -- and everything else -- on supercomputers in 2010. Microsoft's renowned engineering quality and down-to-earth pricing shows brilliantly in its capturing 1% of the top 500 supercomputer projects. Perhaps next year, utilizing all the organizational pressure they can bring to bear, they can retain 0.8%.|
Formal Unix, now long dead*, controls 4.4%. Meanwhile, Linux is now installed on 91% of the remaining 95% of top systems. Add in the single BSD system and you have Unix-like systems (Unix+Linux+BSD) accounting for 95.6% of the top supercomputer projects. The remaining 3.4% of are 'mixed' systems and may also contain significant percentages of Unix and Linux.
There are many reasons for Linux' success. Among the top factors are surely these four, in no particular order:
Check my math on the top 500 systems here.
- Price (starting at free)
- Quality (excellent code, Unix-based design)
- Hardware Support (most all modern quality gear is supported)
- Open Source (open to tinkering -- and redistributable)
*Of course, counting functional Unix systems while ignoring the trademarked term, Unix is clearly not dead since Linux is one of the truest of the true Unix work-alike systems. Linux is, of course, the reason formal Unix has suffered such a precipitous decline. Many Unix users just switched flavors -- and Linux was a most appealing flavor.
|mail this link | permapage | score:9616 | -Ray, June 2, 2010|
How to install Ubuntu Linux on the decTOP SFF computer
I recently bought a decTOP small form factor (SFF) computer. My goal was to build a cheap, fanless, quiet, and low power consumption Linux server. For $99 plus the cheapest available shipping, $40, my machine arrived 11 days after I placed the order.
This is a tiny computer, about the size of a Mac Mini. But, because it has no fan, it runs a bit quieter and, with the help of a 1-watt, 366 MHz CPU, consumes only 8 watts. For comparison, the G4 Mac Mini consumes about 20-30 watts, depending on load.
The decTOP comes with 128 MB of RAM in its sole SO-DIMM slot and a 10 GB 3.5 inch hard drive. I understand that it's a simple matter to replace the drive and to upgrade the memory to a maximum of 512MB.
It also comes with no operating system and the ability to boot only from a USB drive. This article details the steps I used to build the USB boot/installation drive and install Ubuntu 6.06 on the decTOP.
There is another article -- with additional decTOP links -- here on installing Ubuntu 6.06 on the decTOP with the aid of a Windows system. Fortunately ;), I run Mac OS X and Linux (Ubuntu 7.04), so that article didn't work for me. I did the installation of the Ubuntu 6.06 LTS Server Edition using my Ubuntu Linux box and a 1 GB USB flash drive -- although a 512 MB USB drive should work as well.
- Download the Ubuntu 6.06 server ISO image from the Ubuntu download page. Depending on your plans for the decTOP, you might want to choose the desktop version. Unless you have already upgraded your decTOP's memory, however, you'll want to stick with the 6.06 releases.
- Install the mbr, mtools, and syslinux packages on the Linux system you'll be using to prepare the USB drive. If you run Ubuntu or some other Debian-derived system, the following commands may do the work for you.
apt-get install mbr
apt-get install mtools
apt-get install syslinux
- Partition the USB drive with a single FAT-16 partition. I used the fdisk 'n' command to make the new primary partition 1. The fdisk 't' command can be used to change the partition type to FAT-16. My device name was /dev/sda.
- Make the FAT-16 partition the active partition. I used the fdisk 'a' command.
- Install a master boot record on the USB drive.
- Install syslinux on the USB drive. Note that the USB drive should not be mounted when you do this.
syslinux -s /dev/sda1
- Create a mountpoint and mount the ubuntu ISO image using the loopback device.
mount -o loop -t iso9660 ubuntu.iso /iso
- Create a mountpoint and mount the USB flash drive.
mount /dev/sda1 /usb
- Copy the contents of the ISO image to the USB drive. This will take some time.
cp -r . /usb/
- Copy the /usb/dists/dapper directory into a new /usb/dists/stable directory.
cp -r dapper/* stable
- Copy several files from /usb/install to the /usb root directory.
cp /usb/install/vmlinuz /usb/
cp /usb/install/mt86plus /usb/
cp /usb/install/initrd.gz /usb/
- Install the following text into a file named syslinux.cfg in the /usb root directory.
append initrd=initrd.gz ramdisk_size=24000 root=/dev/ram rw
- Flush all writes, unmount, and remove the USB drive. After the sync step, wait for all of the data to be written to the USB drive.
- Connect the ethernet adapter to the decTOP and connect it to your network to allow automatic configuration of the network interface.
- Insert the USB drive into the decTOP and power it up. The decTOP should automatically boot from the USB drive and start the Ubuntu installation.
- Answer only the first two questions concerning language selection and go to the next step, below.
- Press Alt-F2 (hold down the Alt key and press the F2 function key) to open a shell. Then press enter to start the shell.
- Create a /cdrom and a /dev/cdroms directory in the installation ramdisk
mkdir /cdrom /dev/cdroms
- Go to the /dev/cdroms directory and build a symlink from /dev/sda1 (that is likely the device name of your USB boot partition) to /dev/cdroms/cdrom0.
ln -s ../sda1/cdrom0
- While still in the shell, mount the USB drive to mimic an installation CD-ROM.
mount -t vfat /dev/cdroms/cdrom0 /cdrom
- Return to the installation program with Alt-F1 and continue the installation.
From this point, the process should be identical to a routine CD-ROM installation.
For a grand total of $140 and 8 watts of power consumption, I now have a near-silent Linux server running 24/7. You can telnet to it here and marvel at its blinding speed running a 250,000-sector Space Tyrant game.
|mail this link | permapage | score:9526 | -Ray, August 16, 2007 (Updated: April 26, 2011)||