Get Thin and make the World a better place

Posted by Roel Gloudemans on 26 January 2009 | 3 Comments

Tags:

I'm evaluating Suns SunRay technology for several customers at the moment. The SunRay is a very dumb graphical terminal requiring only between 3 and 4 watts of power. The desktop environment is running on a central computer. This can either be a virtual machine per user (VDI) or a multi-user operating system like Linux. (suggested reading before this blog)

Sun delivered a terminal to me for demonstration purposes at the client location. After a successful demo I didn't have to return the unit.I thought it was cool to have in the home, but didn't really have a purpose for it. I have a server, more like a desktop with some extra memory added, which is on 24x7 and is located in a spot where I don't hear the noise. The server however was not sized with remote desktops in mind. The specs were dimensioned for a mail and web server.

After some thinking I realized that I could use the living room TV also as a monitor. The SunRay has a DVI connector and DVI to HDMI cables are readily available. Since it would be connected to the TV, I would also need a wireless keyboard with integrated trackball, with sufficient range.

These are hard to come by, especially if you want one that works with a SunRay. The software is more aimed at a Sun specific keyboard than supporting the variety type of keyboard available at the local electronics store (most of these things are aimed solely at Windows users, even a modern Linux variant already has problems with most of them). Eventually I found one, which is not too expensive. The only downside is that it does not have a third mouse button.

In Linux/Unix the 3rd button is used for pasting copied text, I use is quite often. For the rest this keyboard worked out of the box.

The next problem was the network connection.I still had some ports available on the switch near to the server, but the problem was getting the cable from the SunRay to the switch. I was thinking about using the duct also used for cable TV. Not the most pretty solution since that would mean a network connector box on the wall. The amplifier is just below the TV an to it is connected a Squeezebox by Logitech. This streaming media player is using the wireless network, but can also be connected to a wired network. What's more, the Ethernet port can be bridged to the wireless network. I could just plug the SunRay into the Squeezebox!

The last step was creating a virtual machine to run the SunRay and desktop software in. In the beginning, performance was horribly slow. But after adding some memory to the server, performance was fine.

The SunRay only gives you near-desktop performance, so no advanced window switching effects etc., but for reading mail and browsing this is just fine.

Initially I had some problems with the Sun software (SRSS 4.1). After a couple of days I couldn't login anymore and sound didn't work. The first problem was easily solved. The SRSS software creates some directory and files in the /tmp filesystem. RedHat Linux has a cron job cleaning up /tmp daily. After a few days some of the files from SRSS were removed, causing the problem. This can be solved by adding "-x /tmp/SUNWut" to /etc/cron.daily/tmpwatch

Sound was harder to resolve. Sound is realized using a kernel module, as is remote storage (you can connect external storage to a SunRay station). The first problem is that the kernel modules need to be recompiled each time the kernel is patched. I've created a script to do this. The second problem is that the sound module is an OSS module. All modern Linuxes use ALSA. This is why the sound daemon crashes on startup. To resolve this, the sound daemon has to be recompiled without ALSA support. You can download the resulting RPM for 64bit RHEL5 here and the adapted source RPM here.

The last problem to get sound working is in /tmp again. A /tmp/.esd directory is needed. This needs to be created at boot time. It also needs to be excluded in the tmpwatch script.

Now sound works. For some reason the gnome sound configuration dialog does not work on my desktop, but you can enable desktop sounds with gconf-editor as well (/desktop/gnome/sound).

At that point I got my second SunRay station. Not really knowing what to do with it, I connected it to the second input of my desktop monitor, thinking it would be easy if I wanted to quickly check my mail. The SunRay is almost instant on. To my suprise haven't been using my desktop computer at all since that time. I'm one of those persons who spends some time tweaking the spiffy desktop effects each time I install my PC, but for some reason the instant on (and off) capability, combined with the absolute silence of the SunRay has won me over. Additional advantage is that I am using the same desktop when I'm using the SunRay in the living room.

So lets get back to the title. The most power hungry system is the house is the desktop system. It probably uses 150W when not doing much. Before the SunRays that system was on at least 3 hours per day year round. With the SunRay I'm only using the desktop for 30 minutes per day (gaming and processing digital images). 150W for 3 hours per day is about 165kWh per year. 30 minutes is 28kWh. So I'm saving 137kWh per year. This equals to 34 euros, but more importantly to 62kg (450grams per kWh) of CO2. In most companies where desktops are using 100W year round, this could be as much as 200 euros per desktop or about 390kg of CO2. This comparison is not really true, because my server only uses a bit more power when using the SunRay, but a company has to run extra servers. But no more that half of those savings need to be invested in servers.

Another thing to mention is that I only use Solar, Wind and Water power to power the computer systems, so I'm almost producing no CO2, but I am saving 35 euros per year.