Virtualization @Home

By Blue2k on Monday 4 February 2013 04:46 - Comments (11)
Category: -, Views: 6.143

Being exposed to cloud-based web application development and server virtualization on a daily basis at work, it made me think about virtualization at home. Even though my spell-check has never heard of virtualization, it's becoming the standard approach to providing IT services within businesses. The idea that you can utilize idling hardware more efficiently by provisioning it with multiple services (or virtual servers) is so straightforward that it's surprising it hasn't caught on earlier.

I've been running some network services on an old Dell XPS M1710 for a while after the graphics card died in it. While it's more than capable of running Gentoo with Apache and some other services, running a virtual stack on it seemed like a bridge too far for the 5 or 6 year old machine. Instead, I decided it was time to upgrade a number of things in our home network, including the 5 port gigabit switch and old WRT54g router. The ultimate goal was to create a home network solution that would allow for a more serious server setup with a full set of virtual servers.

For the network I ended up with this configuration:
  • Netgear WNDR N7500 Router
  • TRENDnet 24-Port Gigabit GREENnet Switch
  • TRENDnet 5-Port Gigabit GREENnet Switc
The 24-port switch is a rack-mountable switch that would fit very well into the cabinet I bought that would house the server:
  • Tripp Lite SRW9U 9U Wall Mount Rack Enclosure Cabinet
  • Cyberpower CPS-1215RMS Rackmount PDU Power/Surge Strip

Being Dutch and all meant I wanted everything at a reasonable price. I spent a long time making sure the final price tag would be very reasonable (and had me split the order between Newegg and Amazon). Because the cabinet is not a full-depth rack (and only has the front posts) I required a half depth server case that would not be too heavy. Just in case though I applied the age old trick of screwing an upside down shelf inside the rack to support the 1U server. The server contains the following hardware:
  • ASUS RS100-E7/PI2 1U Server Barebone LGA 1155 Intel C204 DDR3 1600/1333/1066
  • Intel Xeon E3-1230 V2 Ivy Bridge 3.3GHz
  • Kingston 16GB (4 x 4GB) 240-Pin DDR3 SDRAM ECC Unbuffered DDR3 1333
  • 2x Seagate Barracuda 7200.14 ST3000DM001 3TB 7200 RPM 64MB Cache SATA 6.0Gb/s

With 16GB of memory and 8 virtual cores available it is capable of hosting 10 virtual servers without issue. The server case only has a couple of low noise fans and is therefore very reasonable in noise production (it actually makes less noise than my desktop machine). Even though the case is half depth it can house 2 3.5 inch hard drives and (the included) DVD-ROM drive. The current setup leaves plenty of room for another server and a 1U or 2U NAS in the future.

I'll discuss my choice of hyper-visor software in a separate post, but suffice it to say that I finally landed on VMWare ESXi. The above setup currently hosts 5 virtual servers, including a Windows 2008 domain controller, an Ubuntu-Server Samba file server, an Ubuntu-Server instance providing VPN and SVN services, an Ubuntu-Server instance for torrent downloads and a Solaris instance for experimentation. Memory usage is at 5GB of the 16GB available and it's generally at consuming about 100 Mhz of the 13Ghz available. In the end the CPU appears to be somewhat overkill for home usage... :)

This whole setup is currently used to backup and store data, stream media to wireless devices and TVs around the house and provide DNS, SVN, VPN and Apache services. In the future I intend to segment the network into multiple vlans to ensure certain services and access can be quarantined.

So, was all the effort worth it? Not only is the new functionality being used on a daily basis, the amount of fun I got from building the server, configuring the instances and experimenting with different hyper-visors was more than worth it. Even though it might be overkill for most people, for anyone interested in learning more about virtualization this is the most fun you can have for a reasonable budget. In total I spent about $1600 for the server, cabinet and networking equipment (including patch cables.)

Here are some photos from the completed cabinet:

Switchblade UI

By Blue2k on Sunday 6 January 2013 21:34 - Comments (2)
Category: -, Views: 5.661

I'm not sure how familiar people are with the company Razer, but I've been a fan of them for quite a while now. I'll spare you the list of mice, keyboards and other peripherals from Razer that I own but it definitely is north of ten. Razer has been expanding into new markets lately with controllers, tablets and even notebooks. One of their technologies called Switchblade UI was of particular interest to me. As a geek and with a career focused on software development, customization is high on my list of desired features.

Switchblade resembles the regular touchpad found on most laptops but takes it to the next level. It basically adds an LCD screen underneath the touchpad and allows you to use that screen as an additional display or auxiliary display. Part of the setup are also 10 keys with small LCD screens inside, allowing for additional customization. The keys are reminiscent of the Optmius Maximus keyboard that almost became vaporware a few years ago. The hardware doesn't only come with the Razer Blade laptop, but is also available on a standalone keyboard Razer sells. The touchpad has the size of a Macbook Pro's trackpad and is very responsive. It's better than any trackpad I've ever used that wasn't a Mac. The Macbook Pro still has an advantage here as OSX allows for very tight integration with the trackpad. That's difficult to achieve for Razer as the best they can do is provide a driver for Windows.

Switchblade UI consists of the hardware and some software that allows you to view things like YouTube videos, Facebook,Ttwitter, email and even a (IE-based) browser on the touchpad screen. It also allows you to transform the touchpad into a numpad or take screenshots in-game and preview / organize them. These are the default basic capabilities. Razer also provides an SDK that allows you to create additional apps for the whole setup (touchpad screen and 10 LCD keys).

The SDK provides you with some examples and a DLL that you can include in C++ projects (or communicate to from managed .NET code). The exposed API is pretty clean and allows you to send messages or data to the display's framebuffer or to the individual keys. It also allows you to subscribe to events from the touchpad and keys. The API exposes enough to be able to develop a wide variety of software for Switchblade UI. On the development forums I've seen someone working on a pretty extensive video-player that allows you to browse your video collection on the touchpad screen and watch videos.

Even though the SDK hasn't been around very long it's clear that Razer needs to spend time on pushing this technology a bit more. With only one keyboard and two versions of the Razer laptop sporting the technology there aren't many people in possession of it. Getting interest from developers will require a wider audience and more ways for people to get their hands on it. The keyboard isn't cheap and the laptop is definitely a luxury item for the price (but definitely worth the price-tag). Even more unfortunate is that currently the SDK doesn't work with Windows 8, so after I upgraded my Blade to Windows 8 I lost the option to explore the SDK... Here's hoping that Razer gets a bit more traction with this, because it's an interesting technology and actually works well.

P.S for Linux: The touchpad uses Synaptics technology and thus works out of the box on Linux with the Synaptics driver for Xorg. The ten LCD keys behave as configurable keys. Unfortunately, the display shows whatever was on it when you left Windows. I believe it's hooked up to the USB bus, so either the windows driver needs to be reverse engineered or perhaps Wine could run some of the Switchblade UI software components.


By Blue2k on Wednesday 2 January 2013 01:28 - Comments (6)
Category: -, Views: 4.864

Having never owned an original Playstation (PSX) and being absolutely fascinated with the Gran Turismo series exposed me to Bleem! initially and PCSX eventually. Both are Sony PlayStation emulators, allowing you to play games intended for the PlayStation on a regular PC. I've played Gran Turismo (GT) 1 and especially GT 2 for countless of hours on emulators.

In the early days of PSX emulation the goal was to achieve compatibility with as many games as possible, and maintain stable frame-rates. As emulators and PC hardware improved there was an opportunity to improve the visuals and leverage hardware accelerated rendering. The end result is a fully playable PSX game that handles and looks better than when it was running on the PSX hardware.

Even though the PSX's CPU architecture (RISC) uses a different set of instructions than that of a regular PC, the 33Mhz CPU was 'slow' enough to be emulated reasonably well. PCSX recompiles the RISC instructions on the fly to CISC based ones and emulates other calls to components in the PSX hardware. The result is that a PC will have to work harder than the original hardware, but can eventually produce the same results (a playable game).

At the time of the introduction of the Playstation 2 (PS2) the emulator scene (mainly the users) became very excited at the prospect of emulating the new version of the PlayStation. The developers quickly realized that is was going to be a monumental effort to accomplish as the PS2 has several chips working in very close collaboration. Even though the clockspeed of the main CPU (Emotion Engine) was only 300Mhz, the GPU and supporting co-processors made for a very complex system. All components are required to be very tightly synchronized and two-way communication between components happens often enough to cause problems.

Work started anyway on PCSX2, and while progress was very slow, a few simple games were 'loading' within a couple of years. It eventually took 5 years of development (and PC hardware improvements) to get some games into a playable state. To stress the complexity of the PS2's internals: multithread-support was introduced more than 10 years after the start of the project because of its inherent complexity.

Anyway, so how did this train of thought start? On a rainy day last week (there are plenty of them here in Seattle) I decided to install the PCSX2 again. I had tried it 5 or 6 years ago and forgot about it. Last time I had tried it, games didn't run at full speed and the games I was interested in (Gran Turismo) weren't even close to working. Without much hope I gave it a try on my laptop and launched GT4. After enjoying the brilliant intro to the game (at 60fps) and working my way through smooth menu transitions I was able to race around Laguna Seca at a steady 60fps!

Imagine my surprise when I noticed in the log that NVidia Optimus had selected the wrong GPU! It was running on the integrated Intel 4000 chipset. Forcing it to use the dedicated 660m GPU it was capable of maintaining 60 fps in races with 5 other cars. The only place where it dropped to the high 40 and low 50 fps was on the Stage 5 night track. Apparently PCSX2 still has some issues with high numbers of light sources. Nevertheless, having PCSX2 render at 3 times the native PS2 resolution and enabling FSAA yields a picture quality that could fool people into thinking it was a PS3 game... Maybe.

Have a look at the developer blogs and prepare to be amazed about what makes PCSX2 such an incredible achievement. Besides it being a great emulator, it also shows what open-source projects can achieve.

Nvidia Optimus

By Blue2k on Friday 28 December 2012 23:16 - Comments (5)
Category: -, Views: 3.023

One of the first things I do when I buy a new computer? Get Gentoo installed on it. I find it's the best way to get familiar with the new hardware and somehow feel like I'm in control over this new piece of machinery. Sure, getting it installed on the MacBook Pro that I bought a couple of years ago was no small feat. It took me about a month to get it all working natively (EFI) and supporting switching between the integrated Intel GPU and the dedicated ATI GPU... But boy, did I learn a lot about EFI and grub2 in the process.

I just bought the new Razer Blade, which comes with an NVidia 660m GTX and an integrated Intel HD 4000 chipset (Ivy Bridge). Assuming it followed the same pattern as the MacBook Pro that I own, I tried getting the dedicated NVidia chip set up to run Xorg on. I'd then worry about getting the Intel chip enabled later. Ironically, the only chip I could get recognized was the Intel chip... The NVidia kernel module could not find any NVidia hardware.

Enter Optimus... I was somewhat puzzled by my Gentoo experience on this laptop and started looking around on the internet. I had read about this laptop featuring 'Optimus' but I somewhat wrote it off as a buzzword. The Wikipedia page however started to change my perception a little. It appears that the two GPUs have a symbiotic relationship, as opposed to the 'friendly' relationship they had in older laptops. The dedicated GPU can not function without the integrated GPU! The dedicated GPU renders into the integrated GPU's frame-buffer when active. This allows for a combined final result where only part of the screen is rendered by a dedicated GPU.

As I looked back at the somewhat confused output from the NVidia kernel module I wondered how many properties I would have to add to my xconfig file to get this all to work. Only to then realize that all the configuration in the world wouldn't help with my kernel module. I headed back to Google and ended up at the Bumblebee project. It's an opensource attempt to get the Optimus technology to function on Linux. Reading a bit more on the forums there I learned that NVidia has no intention to support Optimus with the proprietary NVidia Linux drivers... It managed to get them the finger from Linus.

So, the approach to getting a laptop with Optimus technology to run Xorg is to configure Xorg with the Intel GPU and then use Bumblebee to get the dedicated GPU activated. The only way to leverage the dedicated GPU at that point is to launch applications with Bumblebee's 'optirun' executable which will then render the application's graphical output into the integrated GPU's frame-buffer. While I applaud the technology in principle, I'm very disappointed with the total lack of support from a Linux perspective.

My love for... Psion - Part 2

By Blue2k on Tuesday 5 April 2011 18:08 - Comments (2)
Category: -, Views: 3.196

Psion had already introduced their most successful PDAs when I acquired my 5mx: the Series 3 range, the Series 5 and then the Series 5mx. I believe their Series 5 range is considered to be their Swan Song, but the netBook was a great device too in my opinion (I'm writing this on a Psion netBook). The devices were far ahead of their time in interesting ways. They weren't particularly flashy or extremely fast, but instead, excelled at battery life and user experience. The Series 5 keyboard is still considered to be one of the best keyboards for mobile devices ever made. Their battery life is still unrivaled, the netBook I have here in front of me will last me for more than 11 hours on a single charge, and with the additional batteries I have it'll last me for about 48 hours! All their devices are instant on (and off), and losing data is very, very rare when the batteries do give out. I've never lost a single bit of data from the Psions I owned.

Psion 5mx

There is a fine line between nostalgia and making a point I've found. This netBook is definitely behind the times in certain aspects: no USB, limited internet capabilities and no compatibility with the latest Windows, OSX or Linux software for example. But there are still a few aspects that even the latest devices can barely match. The instant-on nature of the Psion devices in general make them extremely handy for work on-the-go or work that gets interrupted a lot. The focus on battery life is not only apparent in hardware, but even the software is aggressively tuned for power conservation. The usability provided by the excellent keyboards on both the Series 5 range and netBook, coupled with the portability, is something that very few (or no) devices currently on the market can deliver.