Shorting The Circuits

Wednesday Dec 10, 2008

Minimal Metal: OpenSolaris 2008.11 on 512MB RAM systems


Since OpenSolaris 2008.05 came out seven months ago, a common problem heard on the opensolaris-help mailing list was about the lack of support for systems with 512MB of memory; 768 MB was the minimum needed to complete a 2008.05 install

Who cares about 512MB RAM systems, you may ask? About three years ago, 512MB was a standard memory size shipped with many laptops and desktops. For people wanting to experiment with OpenSolaris on real metal, some of these systems are being dusted off to kick the tires with OpenSolaris. Now, as mentioned by Dave Miner, the installation RAM requirement has been reduced to 512MB, and happily, OpenSolaris 2008.11 installed successfully on two 512MB RAM systems that I tried: a 64-bit Opteron desktop, and a 32-bit laptop.

First, the Opteron (good to see the top(1) program integrated into OpenSolaris!)


And for the Acer Aspire 3000 laptop with a 32-bit CPU (AMD Mobile Sempron 3000+), circa 2004:

pschow@moultrie:~$ smbios -t 1
ID SIZE TYPE
1 90 SMB_TYPE_SYSTEM (system information)
Manufacturer: Acer, inc.
Product: Aspire 3000
Version: Not Applicable
Serial Number: LXA554601A28751F4FM00
UUID: 20d91515-2edc-d911-90ab-00c09fb4419d
Wake-Up Event: 0x6 (power switch)
SKU Number:
Family:

pschow@moultrie:~$ smbios -t 4
ID SIZE TYPE
4 66 SMB_TYPE_PROCESSOR (processor)
Manufacturer: AMD
Version: AMD
Location Tag: Socket A
Family: 31 (K6-2+)
CPUID: 0x78bfbff00010fc0
Type: 3 (central processor)
Socket Upgrade: 6 (none)
Socket Status: Populated
Processor Status: 1 (enabled)
Supported Voltages: 1.6V
External Clock Speed: Unknown
Maximum Speed: 1800MHz
Current Speed: 1800MHz
L1 Cache: 8
L2 Cache: 9
L3 Cache: None



By all accounts that I've read, the 2008.11 install should not have even worked on this system because some of the RAM is borrowed by the video hardware, leaving less than 512MB available to the OS. It worked fine for me though, as you can see.

I took a first small step in minimizing these systems by disabling sendmail:

% pfexec svcadm disable sendmail
If you've got other ideas on how to reclaim some RAM and CPU, however small, let me know. I'm sure "Don't run GNOME" would be one of the suggestions, which is actually reasonable if all you want is SSH access into a shell.

How well do these systems work? Don't try to crank up NetBeans or run a production Glassfish server on them, but both systems are fine for exploring the features of OpenSolaris (DTrace, ZFS w/root pools, IPS package management, ZFS Time Slider visualization, etc.) and programming/scripting (C, Java, Ruby, Python, PHP, etc.), especially via the command-line. The 64-bit system is reasonable for casual use of internet apps like web browsing, IM, music playing, etc.

As you get more familiar with OpenSolaris 2008.11, adding more RAM and moving to a 64-bit system would be good advice but 512MB RAM can be your starting point now, if that's what you have.

You can get OpenSolaris 2008.11 here

Friday Jun 27, 2008

xVM VirtualBox is runner-up in 2008 Linux Journal Reader's Choice Awards

As announced in the Linux Journal, June 2008 edition, xVM VirtualBox grabbed the runner-up status in the "Favorite Virtualization Solution" category. VMWare was first at 38% but VirtualBox grabbed second place at 20% with this interesting commentary from LJ's product editor, James Gray:

"Given VMware's meteoric rise during the past few years, it's no surprise to see it win the gold for Favorite Virtualization Solution. More surprising is VirtualBox's showing, the application that a fellow publication called “The best virtualization program you've never heard of” in late 2007. VirtualBox's patron, innotek of Germany, was acquired by Sun Microsystems earlier this year, giving VirtualBox the marketing injection it needed to match its technical prowess. Wine and Xen fared decently in this category too."

Go get it!

Thursday Nov 29, 2007

Ruby integrated into OpenSolaris

As of Nevada build 78, Ruby 1.86 and friends (irb, rdoc, ri,and gem) are first-class citizens of Solaris Nevada, thanks to the PSARC/2007/600 project team. No more needing to go through a lot of this, to get a Solaris Ruby (and Rails) environment up and running. Together with JRuby, NetBeans, and DTrace support for Ruby, the Solaris Ruby infrastructure just got even better.

Although Rails seems to get more than its fair share of the Ruby publicity pie, Ruby itself has all sorts of applications including System Administration, Numerical Analysis, and Desktop programming


The $PATH modification below is a workaround so that your gems can be found after they are installed. Hopefully this step will no longer be needed in a future release.

-bash-3.2$ uname -a
SunOS sopchoppy 5.11 snv_78 sun4u sparc SUNW,Sun-Blade-100
-bash-3.2$ ruby -v
ruby 1.8.6 (2007-09-23 patchlevel 110) [sparc-solaris2.11]
-bash-3.2$ PATH=$PATH:/usr/ruby/1.8/bin

Using gem to install rake:
# gem install rake
Bulk updating Gem source index for: http://gems.rubyforge.org
Successfully installed rake-0.7.3
Installing ri documentation for rake-0.7.3...
Installing RDoc documentation for rake-0.7.3...

Installing rails is one command:
# gem install rails --include-dependencies
Successfully installed rails-1.2.6
Successfully installed activesupport-1.4.4
Successfully installed activerecord-1.15.6
Successfully installed actionpack-1.13.6
Successfully installed actionmailer-1.3.6
Successfully installed actionwebservice-1.2.6
Installing ri documentation for activesupport-1.4.4...
Installing ri documentation for activerecord-1.15.6...
Installing ri documentation for actionpack-1.13.6...
Installing ri documentation for actionmailer-1.3.6...
Installing ri documentation for actionwebservice-1.2.6...
Installing RDoc documentation for activesupport-1.4.4...
Installing RDoc documentation for activerecord-1.15.6...
Installing RDoc documentation for actionpack-1.13.6...
Installing RDoc documentation for actionwebservice-1.2.6...

Now, create a rails app:
-bash-3.2$ rails hello-world
create
create app/controllers
create app/helpers
create app/models
create app/views/layouts
create config/environments
create components
create db
create doc
.
.
.

Tuesday May 08, 2007

Cory Doctorow interviews Hal Stern

Science Fiction author Cory Doctorow interviews Sun VP Hal Stern in the latest ACM Queue magazine, discussing topics like open source, DRM, privacy, and my favorite, the KSR 33 Teletype terminal. The print quality PDF is here.

[Follow on: Looks like this was already posted by Hal but the interview now appears to be online and available to everyone.]

Saturday Dec 16, 2006

OpenSolaris and Municipal Wifi - It's a Snap

A new municipal Wifi mesh network was just lit up in Longmont, Colorado, USA this week. It is being privately operated by Kite Networks, and it took only 3 months to install citywide from scratch. Ten years ago, it look longer than this to provision a T1 line to a single customer! This network, on the other hand, can address tens of thousands subscribers. The picture above shows how it is installed throughout the city - rabbit ears are mounted on selected street light posts. Other cities along Colorado's Front Range are watching the progress here in Longmont, anticipating their own Wifi networks soon.

Access is free for the first three months so I naturally took my laptop running OpenSolaris down to the park. Using the nifty Inetmenu user interface, I instantly connected to the network with no problems. Just as it should be, I didn't have to mess with drivers, installation CDs, or configuration files - it just worked.


Some simple speed tests showed that I was getting about 2.1 Mbits/sec, faster than the T1 circuit that I mentioned above.

I eventually may become a subscriber but only if they agree to include OpenSolaris in the list with the other first-class supported Operating Systems. Based on my flawless connection experience today, why wouldn't they do this? Stay tuned for a progress report.

Wednesday Nov 15, 2006

R.I.P. VHS Video Tape

Variety published an obituary today on the end of VHS (Vertical Helical Scan first, then Video Home System) video tapes in the USA.

2003 was the crossover point at which DVDs outsold VHS tapes.

The format lasted 30 years from its inception, which included the famous Betamax vs. VHS format war. Since the DVD was invented in the early 1990's, can we assume a similiar lifetime for today's DVD media (not Blu-Ray or HD-DVD) format and that "DVD-classics" will continue to be offered until at least the year 2020, with the next crossover point around 2015?

Friday Nov 03, 2006

TV Software Updates, as a Service, continued

Steve Hastings, Engineering VP for Update Logic provided some answers and insight to some of the issues I mentioned about a new service being deployed that updates software on digital TVs. Thanks, Steve!

Isn't blogging great?

A key point that Steve clarifies is that the Update Logic pipe is uni-directional, not bi-directional like I wrote.

About the household appliance software update issue, where I may need the OS in my microwave, Elmo doll, programmable thermostat, and dishwasher to be updated, Steve mentions that these devices can probably participate in the DTV-based update service if they have an embedded digital TV tuner. Since that may take a while, how about some sort of residential gateway device that has a DTV tuner on one side tuned into various update channels, and Wifi on the other for speaking to my Home-Area-Network (HAN) of devices/appliances that will someday be capable of being updated via wireless?


Saturday Oct 28, 2006

Coming Soon: Automatic Software Updates to your TV

Digital TVs are essentially becoming computers - they now run various levels of complex software including operating systems, device drivers, and firmware. Since there will be software bugs and new features introduced among all of those layers, how do you get software updates distributed and applied to potentially tens or hundreds of millions of fielded TV sets? Today these updates may get done by mailing USB drives to customers (US $30) or sending technicians to residences (US $250). Either way, these software update methods are too expensive and don't scale.

Another solution rolling out soon in the USA uses the ATSC A/97 Software Data Download Service (PDF version available here) that provides a bi-directional MPEG-2 transport channel for moving software bits, which works over TV broadcast and cable networks (Sun Microsystems is a member of the ATSC). A software agent (all too familiar with anyone who has done work in the computer systems management arena) lives on the TV set and happily "tunes into" the software update stream periodically to receive new bits, and then proceeds to apply them to the set.

One such software update service provider (SUSP?), Update Logic, will be rolling out their UpdateTV service as early as this December, and will be using PBS spectrum and facilities to carry the update channel. Participating TV set manufacturers that are already signed up with Update Logic evaluation contracts include Sharp, Samsung, Mitsubishi, and Hitachi.

Software update services are common in the computer industry, like the Sun Update Connection or Apple's MacOSX Updater. It will be interesting to see how the TV update services handle the typical computer software update challenges, such as:


  • Privacy
  • Are consumers ready to have a bidirectional management channel coming into their TV set? What bits are coming into my house, and maybe more importantly, what's leaving? If I'm not comfortable with the answers to these questions, can I disable the agent except for when I want updates?
  • Security
  • Just how secure is that software update channel? Is it encrypted and authenticated to protect me from malicious code getting deployed into my TV?
  • Reboot Scheduling
  • If a major software update becomes available that requires my TV to be rebooted, when does the reboot happen? Not during the second overtime of the World Cup Final, I hope.
  • Backout Protection
  • If a particular TV software update does not perform or degrades my experience, how do I back out the change and revert to the previous software bits?
  • Extendability
  • Why limit software updates to just TV's? Other devices in my house, like my washing machine, might want to be updated as well. How can other appliance vendors participate in this software update distribution mechanism?

Software Updates: They're Not Just For Computers Anymore


Monday Oct 16, 2006

Solaris evolution and interface stability - Bob Sproull interviews David Brown

Sun Fellow Bob Sproull interviews David Brown in the latest edition of ACM Queue on the topic of nondisruptive system evolution and innovation (yes, you can have both) in Solaris, and in particular, the reasons why strict Application Binary Interface (ABI) stability is so important to customers, going back to 1994 for some lessons learned during Solaris 2.4 . Included is a good introduction to the the Solaris interface taxonomy, which you may see mentioned at the bottom of Solaris man pages, or in the ARC cases.

A good read for everyone, especially if you are joining the OpenSolaris community.

Wednesday Oct 04, 2006

Remembering the Grace Hopper speaking tours

Reading about Sun presenting at the Grace Hopper conference reminded me of when she was a regular visitor on my college campus, during her peak speaking tour years. Admiral Hopper would always be in her Navy uniform and would pass around a piece of wire, showing what a nanosecond looked like, in terms of the speed of light propagation. She'd also mention the team that found the moth that flew into the room-size computer and caused it to shut down. To fix the computer, they "debugged" it. I remember she was careful about not claiming to invent the term "bug", since it was already in use in the electronics industry.

A visiting female computer science speaker was a rarity back then, and you wonder how many women she inspired to enter or continue in the field, after hearing her talk? Also, in today's world where female enrollment in computer science is declining rapidly, who will be the next Grace Hopper?

Thursday Aug 24, 2006

Ruby on Rails on Solaris 10 Howto

This has been obsoleted by newer instructions

Installing a Ruby on Rails development environment on Solaris 10 just got a lot easier now that that the latest version of Solaris 10 comes with a fully integrated PostgreSQL database including libraries and header files. No more needing to separately install a database system!

Here's the instructions I used to get Rails up and running on Solaris 10, including Ruby and RubyGems. First, some preliminaries:


  • This example only works with the Solaris 10 06/06 and later (it should work
    for Solaris Express, too). Verify by looking at your /etc/release file and ensuring that you see "Solaris 10 6/06" (or later)

  • This describes a quick setup for personal prototyping; you'll want to be a lot more careful, like configuring your PostgreSQL database disk layout, and starting/stopping PostreSQL with the Solaris System Management Facility (smf) if you're doing anything closer to production.

  • The target installation here for everything is /opt/local. Whatever you use, you'll want to add the bin directory to your $PATH, e. g. PATH=$PATH:/opt/local/bin before starting.



Now to get started:

  1. Install GNU readline library (you'll want this for interactive Ruby)


  2. % wget ftp://ftp.cwru.edu/pub/bash/readline-5.2.tar.gz
    % gzcat readline-5.2.tar.gz | tar xf -
    % cd readline-5.2
    % configure --prefix=/opt/local
    % gmake
    % su
    # /usr/sfw/bin/gmake install

  3. Install Ruby and friends (irb, erb, ri, rdoc)


  4. % wget ftp://ftp.ruby-lang.org/pub/ruby/ruby-1.8.5.tar.gz
    % gzcat ruby-1.8.5.tar.gz | tar xf -
    % cd ruby-1.8.5
    % configure --prefix=/opt/local --enable-pthread \
    --with-readline-dir=/opt/local
    % gmake
    % gmake test
    % su
    # /usr/sfw/bin/gmake install
    # /usr/sfw/bin/gmake install-doc

  5. Install RubyGems (the Ruby package manager)


  6. % wget http://rubyforge.org/frs/download.php/11289/rubygems-0.9.0.tgz
    % gzcat rubygems-0.9.0.tgz | tar xf -
    % cd rubygems-0.9.0
    % su
    # /opt/local/bin/ruby setup.rb

  7. Use RubyGems to install Rails and its dependent gems


  8. % su
    # PATH=$PATH:/opt/local/bin
    # export PATH
    # gem install rails --include-dependencies


  9. Install the Ruby PostgreSQL adapter


  10. % wget http://ruby.scripting.ca/postgres/archive/ruby-postgres-0.7.1.tar.gz
    % gzcat ruby-postgres-0.7.1.tar.gz | tar xf -
    % cd ruby-postgres-0.7.1
    % ruby extconf.rb --with-pgsql-include-dir=/usr/include/pgsql
    % gmake
    % su
    # PATH=$PATH:/usr/sbin
    # export PATH
    # gmake install

  11. Configure PostgreSQL for the first time (thanks, Robert Lor, for the help)


  12. # groupadd postgres
    # useradd -c "PostgreSQL User" -d /export/home/postgres \
    -g postgres -m -s /bin/bash postgres
    # chown postgres /var/lib/pgsql/data
    # chmod 700 /var/lib/pgsql/data
    # su postgres
    # initdb -D /var/lib/pgsql/data

  13. Start PostgreSQL and create a role for your username


  14. # su - postgres
    # pg_ctl -D /var/lib/pgsql/data -l logfile start
    # createuser your-login-name # This lets you perform DB operations



You're done! Now following the Agile Web Development With Rails book, try the "Hello World" example:


% mkdir work
% rails demo
{ in another window }
% cd demo
% ruby script/server # Start the built-in WEBrick web server


Now point your browser to: http://localhost:3000 and see if you get the "Welcome Aboard" page:





Of course, to do a real Rails app we need to use the database that we setup earlier. This example shows the setup of the Depot application, discussed in Chapter 6 of the book.


% cd work
% rails depot
% createdb depot_development
% createdb depot_test
% createdb depot_production

Now create a file: work/depot/db/create.sql that looks like this:

create table products (
id SERIAL,
title varchar(100) not null,
description text not null,
image_url varchar(200) not null,
price decimal(10,2) not null,
primary key(id)
);

Note the change from the MySQL auto_increment modifier, given in the book, to the PostgreSQL SERIAL type above.


One more change: Modify the work/depot/config/database.yml file to point to your PostgreSQL database. Ignoring the comments, it should look something like this, if lefty is your login name:


development:
adapter: postgresql
database: depot_development
username: lefty
password:
host: localhost

# Warning: The database defined as 'test' will be erased and
# re-generated from your development database when you run 'rake'.
# Do not set this db to the same as development or production.
test:
adapter: postgresql
database: depot_test
username: lefty
password:
host: localhost

production:
adapter: postgresql
database: depot_production
username: lefty
password:
host: localhost




Import your initial products table definition:

% psql depot_development < db/create.sql

and generate the "scaffold" for your Product catalog, and start the web server again (make sure you stopped the previous one from the earlier test).

% ruby script/generate scaffold Product Admin
% ruby script/server

Pointing your browser to: http://localhost:3000/admin should allow you to verify that you have your complete Rails development system setup correctly and integrated with your PostgreSQL database.


Want to learn more? Check out the Top 30 Rails Tutorials