Librenix
Headlines | Linux | Apps | Coding | BSD | Admin | News
Information for Linux System Administration 

VPS: Xen vs. OpenVZ

Up
vote
Down

This is a short overview of the key differences between OpenVZ and Xen that you might consider when choosing a VPS. Note that this article is based on my opinions and that you must do your own research to determine which, if either, technology is best for you and your application.

First, some terminology. OpenVZ isn't fully virtualized and could be more properly referred to as a 'container', not a VPS. That shouldn't affect your choice. It's the technical differences that matter.

Cheap VPS offers are everywhere lately, it seems. However, upon closer inspection I saw that almost all of the low-priced offers were for OpenVZ. While both Xen and OpenVZ offer their advantages, I chose Xen. So, there's my first bias, right up front. :)

OpenVZ advantages:

  • Efficient (fast)
OpenVZ disadvantages:
  • Shared kernel (no custom kernel)
  • Shared memory with other users
  • Vendor can easily oversell, killing performance
Xen advantages:
  • Dedicated memory
  • fully virtualized (can run other kernels or even OS's)
  • vendor more limited in overselling
Xen disadvantages
  • Less efficient (more overhead due to a kernel-per-VPS)

You'll notice I left price out of the above comparison. In theory, there should be a small price advantage for OpenVZ. I don't know how big it should be but it pertains to two things: 1) Xen uses more memory due to each VPS having its own kernel, and 2) Xen uses more CPU, also due to the additional software layer required to virtualize the kernel.

In practice, however, the price gap appears larger than the above technical differences suggest it should be. I think the remainder of OpenVZ's price advantage is based on 1) the ability for a vendor to easily oversell OpenVZ, and 2) The price competition that results from some vendors overselling OpenVZ.

OpenVZ doesn't encapsulate its containers into a fixed amount of memory, so it runs processes in the host environment to monitor memory usage and kill processes as a container allocates more than its assigned amount.

As a result of this difference, loading down an OpenVZ container is problematic. To partially offset this disadvantage, most OpenVZ vendors offer 'burst' memory in addition to 'dedicated' memory. That is, the monitor process is set to allow the container to use more than its allocated memory -- for a short period of time. This messy situation results in a potentially unreliable environment as some of your processes may be arbitrarily killed -- at the busiest times.

Xen, on the other hand, allows the use of a swap space and excess memory allocation results in (hopefully) idle segments being rolled out to the swap area. While this is good for the memory-hungry VPS user, it can consume significant I/O capacity when memory is overallocated to the point of busy segments getting swapped out. This is bad for everyone sharing the underlying hardware.

I see Xen as clearly the superior technology. A Xen VPS feels and behaves more like a dedicated server. However, I still would have purchased OpenVZ at some price difference. After a bit of research, however, I located Xen VPS's at practically the same price as the cheapest OpenVZ containers. That made my decision easy.

With that said, keep in mind that a bad hosting vendor can ruin either technology through various means. Both technologies share the disk drives and I/O paths as well as the processor cores. Hardware can be poorly configured and managed in any case. A reputable vendor is probably the single most important consideration in choosing a virtual server.

Lastly, carefully check the 'allowed use' policy. Make sure your application is allowed on the server you intend to purchase. Note that due to their different characteristics, the allowed use policy may differ between OpenVZ and Xen for the same host. Also, it's good to understand the memory usage characteristics of your applications. If you know how much memory/swap they require on a physical system, it'll probably work with that same amount of memory/swap on Xen.

[I'll post a review shortly of my current VPS vendor and I will then add a link to that article here.]

mail this link | permapage | score:9648 | -Ray, June 13, 2011

Currency Traders on Raspberry Pi

Up
vote
Down

You can now run Currency Traders on your Raspberry Pi. It is extremely efficient and takes only about 2.2% of the memory of a 512MB RPi and less than 0.5% of the CPU. More CPU will be consumed when players are online, of course, but it should support up to a hundred or so concurrent players on a normally clocked Pi.

The installation is four quick steps, described in the readme.txt file. The entire system is a single binary, available either dynamically linked or statically linked. The static version should work on most any Pi running most any Linux. The dynamically-linked version was compiled and tested on Raspbian Wheezy and may work without library fiddling on other Pi Linuxes.

Scroll to the bottom of the TEOTWAWKIgames.com page for the Raspberry Pi download links.
read more...
mail this link | permapage | score:9520 | -Ray, March 3, 2013

Linux dominates Windows

Up
vote
Down

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:
  • 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)
Check my math on the top 500 systems here.

*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:9473 | -Ray, June 2, 2010

Apple DIY Repair

Up
vote
Down

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:9428 | -Ray, January 25, 2011

Currency Traders Telnet Game

Up
vote
Down

A new, large Currency Traders game is up. To connect enter the following command from an xterm, konsole, or other terminal/command line window:

telnet teotwawkigames.com

It runs on port 23, just like traditional telnet. It's free to play and no software is required to play. All you need is an internet connection.

This is an old-school, no-graphics strategy game. All you need is a telnet client to play -- and every modern operating system comes with one. It's free and you can play anonymously. Just choose a name and a password and log in. If you don't know what to do, just press your H key for a Hint and a context-sensitive Tip.

This game is played in a persistent world where whatever you build, buy, or otherwise 'acquire' in the game will still be there tomorrow. Unless you make an enemy of another player, that is. PVP (player-versus-player) is always enabled here so other players can attack your deployed fortifications -- or even, heaven forbid, you.

This is a turn-based game that can be played any time of the day, night, or week. Each player is issued a certain amount of energy (turns) per day that is used to travel, trade, or play at the arcade in the several Malls. If you don't use your turns, they accumulate for as much as several months -- so there's no disadvantage to skipping a day or even a few weeks.

A slightly longer description of Currency Traders is here.
mail this link | permapage | score:9414 | -Ray, January 23, 2013

xmldiff: Create XML patch files

Up
vote
Down

If you support a lot of XML this tool may be for you...
Xmldiff is a tool that can show you the differences between two XML files, taking into account changes that are purely syntax or are not significant according to the XML specification. One of the patch formats that Xmldiff can generate is an XUpdate XML document that succinctly describes the changes between two XML files.

In this article, I'll use xmldiff to generate an XUpdate patch, and the Perl module XML::XUpdate::LibXML to apply this patch to an XML file.
read more...
mail this link | permapage | score:9414 | -Ray, June 5, 2008

Expect Script Examples

Up
vote
Down

Expressions, if statements, for loops, and while loops examples are covered in this mini-tutorial:
This article explains the following in the expect scripting language.
  • Expressions – arithmetic operation
  • if construct in expect
  • looping constructs
read more...
permapage | score:9400 | -Ray, January 21, 2011

Linux network tools: iptstate and pkstat

Up
vote
Down

Two small Linux tools for network stats...
iptstate displays information held in the IP Tables state table in real-time in a top-like format. Output can be sorted by any field, or any field reversed. Users can choose to have the output only print once and exit, rather than the top-like system.

Refresh rate is configurable, IPs can be resolved to names, output can be formatted, the display can be filtered, and color coding are among some of the many features.
(here are some red prints) read more...
mail this link | permapage | score:9389 | -Ray, March 4, 2011 (Updated: April 24, 2012)

MultiSystem: Live USB MultiBoot

Up
vote
Down

Put more than one bootable Linux distribution on that big USB flash drive...
Installation instructions can be found at http://liveusb.info/dotclear/index.php?pages/install, where several install methods are available. After installing MultiSystem, open it, and follow the steps. I received an error message in French saying that Multiboot does not like spaces in the USB Stick's name. I renamed the stick and then logged out and back in to make it work. Below are screenshots of the whole process.
read more...
mail this link | permapage | score:9389 | -Ray, April 19, 2011

Arch Linux VirtualBox Installation

Up
vote
Down

A step-by-step guide to installing Arch Linux with screenshots along the way...
The first step is to start up VirtualBox. Once the program has started you want to click on New to create a new virtual machine. After this, follow through the wizard; just accepting the default values is fine. However, make sure that you tell VirtualBox that it is an Arch install by selecting Linux as your operating system and Arch as your version. When you have finished the wizard, you should see your Arch Virtual Machine in the VirtualBox interface. You can double click on it to start it.
read more...
mail this link | permapage | score:9367 | -Ray, January 18, 2011

Librenix T-Shirts and Coffee Mugs!

Up
vote
Down

For today's example of my (semi)elite C programming skilz, I submit for your inspection the Librenix T-Shirts! Yes, I created the images on these shirts and coffee mugs entirely with C code. While the code isn't up to the standards *cough* of my open source Space Tyrant project, at least the output is colorful and not entirely textual!


click either image to see the T-Shirts, Coffee Mugs, etc.

(If you like the images but don't care for 'librenix' on your shirt, these same styles are available for all 50 US state names as well as with the signs of the zodiac here)

(and here are some modern prints)
mail this link | permapage | score:9367 | -Ray, June 6, 2010 (Updated: April 24, 2012)

USB Boot disk creator

Up
vote
Down

This USB dual/triple/multi-boot script supports most any Linux distribution.
This tool seems to be the holy grail of multiboot live USB creation. You can read more about it in the original article and on the project's website (in French, but can be translated via Google Translate), but this tool seems to support almost every distribution listed on DistroWatch (currently running at around 650 distributions listed) and then some (e.g. Fuduntu). Plus, it doesn't seem to have any of the caveats of other tools, like not being able to multiboot Ubuntu and Linux Mint at the same time (as Linux Mint is too similar to Ubuntu). It even allows for testing the final multiboot system in a virtual machine. I'm not going to fully review the application, as that's in the original PCPlus article, but I will share a couple experiences I had with it.
read more...
mail this link | permapage | score:9315 | -Ray, January 17, 2011

Bootable rescue tools

Up
vote
Down

Save your system with these bootable Linux rescue tools...
As often as not these rescue disks will boot a version of Linux. For instance, the Kaspersky Labs rescue disk runs a version of Gentoo, Panda Security's SafeDisk is based on Debian GNU/Linux, and BitDefender and F-Secure are based on Knoppix; and these are not the only examples.
read more...
permapage | score:9286 | -Ray, February 17, 2011

Dual boot guide

Up
vote
Down

Tips and methods for various dual-boot scenarios...
When dual-booting, you may choose to install both operating systems on the same hard drive, or on separate hard drives – if your computer has more than one. Unless you have installed an extra hard drive on your computer, you are most likely going to be installing the second operating system on the same drive as the first one.

So here are a few things to keep in mine when you are attempting to set up a dual boot configuration:
read more...
mail this link | permapage | score:9278 | -Ray, June 22, 2010

PCLinuxOS 2011 KDE Review

Up
vote
Down

Looking for a replacement for Ubuntu, he finds PCLinuxOS...
After a bit of research, I decided to try PCLinuxOS (version 2010.2). Many individuals had good experiences with the distro, and I liked some of the edgier things it had to offer (BFS instead of CFS, for example). I also liked that there was no server remix – this was a desktop-only distro, which is exactly what I needed
read more...
permapage | score:9276 | -Ray, February 18, 2011

Install Liferay 6.0.5, Tomcat on Ubuntu 10.04

Up
vote
Down

Liferay Portal is an enterprise web platform for building business solutions that deliver immediate results and long-term value. Get the benefits of packaged applications and an enterprise application framework in a single solution. read more...
permapage | score:9256 | -falko, September 7, 2010

Light Linux Distros

Up
vote
Down

A comparison of several lightweight Linux distributions...
Because I liked Ubuntu so much, I decided to install it on my laptop too and also this worked very good. However, these days Ubuntu is way to heavy to run on my laptop. Because I wanted to have a fast system I tried to install Gentoo Linux; the installation took 3 days but I ended up with a very fast and responsible system. However, every time I had to install a program it took ages to compile the software. So then I started searching to a nice and user-friendly lightweight distribution.

It wasn't as easy as I thought, so I decided to write my experiences down in this review. The following distributions were tested:
  • Arch 2007.08-2
  • Damn Small Linux 4.2.5
  • Puppy 4.0
  • TinyMe Test7-KD
  • Xubuntu 8.04
  • Zenwalk 5.0
read more...
mail this link | permapage | score:9256 | -Ray, May 27, 2008

System monitoring: Icinga, Nagios, and Opsview

Up
vote
Down

Three open-source system monitoring software packages, two of which are derived from Nagios...
If in your work you are responsible for just one server, you will surely wonder: What is the best way to get the situation under control?

In the world there are good open source software that allow you to monitor the status of servers, services and programs.

In this article we’ll see an overview some of the softwares in this category, and in particular some related to Nagios...
read more...
mail this link | permapage | score:9237 | -Ray, March 24, 2011

How to install Ubuntu Linux on the decTOP SFF computer

Up
vote
Down

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.

  1. 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.

  2. 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
  3. 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.
    fdisk /dev/sda
  4. Make the FAT-16 partition the active partition. I used the fdisk 'a' command.

  5. Install a master boot record on the USB drive.
    install-mbr /dev/sda
  6. Install syslinux on the USB drive. Note that the USB drive should not be mounted when you do this.
    syslinux -s /dev/sda1
  7. Create a mountpoint and mount the ubuntu ISO image using the loopback device.
    mkdir /iso
    mount -o loop -t iso9660 ubuntu.iso /iso
  8. Create a mountpoint and mount the USB flash drive.
    mkdir /usb
    mount /dev/sda1 /usb
  9. Copy the contents of the ISO image to the USB drive. This will take some time.
    cd /iso
    cp -r . /usb/
  10. Copy the /usb/dists/dapper directory into a new /usb/dists/stable directory.
    cd /usb/dists/
    cp -r dapper/* stable
  11. 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/
  12. Install the following text into a file named syslinux.cfg in the /usb root directory.
    default vmlinuz
    append initrd=initrd.gz ramdisk_size=24000 root=/dev/ram rw
  13. 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.
    sync;sync
    umount /usb
  14. Connect the ethernet adapter to the decTOP and connect it to your network to allow automatic configuration of the network interface.

  15. 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.

  16. Answer only the first two questions concerning language selection and go to the next step, below.

  17. 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.

  18. Create a /cdrom and a /dev/cdroms directory in the installation ramdisk
    mkdir /cdrom /dev/cdroms
  19. 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.
    cd /dev/cdroms
    ln -s ../sda1/cdrom0
  20. While still in the shell, mount the USB drive to mimic an installation CD-ROM.
    mount -t vfat /dev/cdroms/cdrom0 /cdrom
  21. 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:9226 | -Ray, August 16, 2007 (Updated: April 26, 2011)

Tutorial: Linux game programming with Ogre 3D

Up
vote
Down

This tutorial starts at the beginning with opening a window...
This tutorial series steps you through the process of creating a 3D shoot'em'up game using the popular and powerful Ogre 3D engine. The tutorials compile on both Windows and Linux.
read more...
permapage | score:9222 | -Ray, January 1, 2010
More articles...
Buy Digital Art on Acrylic

Selected articles

Download: Linux 3D Client for Starship Traders

How to install Ubuntu Linux on the decTOP SFF computer

Librenix T-Shirts and Coffee Mugs!

Tutorial: Introduction to Linux files

Graffiti Server Download Page

Microsoft to push unlicensed users to Linux

Programming Language Tradeoffs: 3GL vs 4GL

Apple to Intel move no threat to Linux

Why software sucks

Beneficial Computer Viruses

Hacker Haiku

Space Tyrant: Multithreading lessons learned on SMP hardware

The short life and hard times of a Linux virus

Closed Source Linux Distribution Launched

Shadow.sh: A simple directory shadowing script for Linux

The Real Microsoft Monopoly

Space Tyrant: A threaded game server project in C

Missing the point of the Mac Mini

Scripting: A parallel Linux backup script

Currency Traders Telnet Game

Apple DIY Repair

Linux dominates Windows

Space Tyrant: A multiplayer network game for Linux

Mono-culture and the .NETwork effect

Linux vs. Windows: Why Linux will win

No, RMS, Linux is not GNU/Linux

The Network Computer: An opportunity for Linux

MiniLesson: An introduction to Linux in ten commands

Space Tyrant: A threaded C game project: First Code

VPS: Xen vs. OpenVZ

Why Programmers are not Software Engineers

The life cycle of a programmer

The Supreme Court is wrong on Copyright Case

 

Firefox sidebar

Site map

Site info

News feed

Features

Login
(to post)

Search

 
Articles are owned by their authors.   © 2000-2012 Ray Yeargin