Local

..:: Home
..:: Legal
..:: Contact
..:: About
..:: RSS
..:: Log in

Links

..:: Fake Bill Gates
..:: Tap the Hive

A Random Quote

"Do or do not. There is no try." -- Yoda

5-9s Explained

October 3rd, 2008

In talking about server uptime the discussion has come up as to what it means to say “5-9s” or “6-9s”.  Each has a VERY specific meaning in regards to the average percentage uptime in any given 365 day period.  5-9s means a 99.999% uptime (there’s 5 9s).  That’s 364.99635 days, or better put only 5 minutes and roughly 15 seconds of downtime in the aggregate over 365 days.

If you’ve ever had a webserver that got hit by the slashdot/digg/fark/reddit effect, then you’d know that your host probably hates you for destroying their 5-9 uptime.  On one of my other sites, I had an article that was frontpaged on reddit for a few hours and linked to a good number of popular news sites.  In 48 hours, I recorded over 150,000 unique visits, and all three of my tracking mechanisms were down for an extensive period.  The traffic brought down the entire server for about 2 hours, and that was after the page was changed to static HTML and I dumped a ton of the markup on it to remove linked js libraries and images.  My host moved me to a much less used and tragically faster server as a result, and the hosting packages is now one of the best around for non-colo.  In the end, I learned a lot about servers under high load.

Now, here’s a table to help understand exactly how much downtime is allowed before the threshold is breached.

short name uptime percentage/100 minimum uptime max downtime downtime unit
0.75 273.75 91.25 days
0.76 277.4 87.6 days
0.77 281.05 83.95 days
0.78 284.7 80.3 days
0.79 288.35 76.65 days
0.8 292 73 days
0.81 295.65 69.35 days
0.82 299.3 65.7 days
0.83 302.95 62.05 days
0.84 306.6 58.4 days
0.85 310.25 54.75 days
0.86 313.9 51.1 days
0.87 317.55 47.45 days
0.88 321.2 43.8 days
0.89 324.85 40.15 days
0.9 328.5 36.5 days
2-9s 0.99 361.35 3.65 days
3-9s 0.999 364.635 8.76 hrs
4-9s 0.9999 364.9635 52.56 min
5-9s 0.99999 364.99635 5.256 min
6-9s 0.999999 364.999635 31.536 sec
7-9s 0.9999999 364.9999635 3.1536 sec
8-9s 0.99999999 364.9999964 0.31536 sec
10-9s 0.999999999 364.9999996 0.031536 sec

Note that the units on the far right column change.  For a day unit, the max downtime decimal is base 24 in hours.  So for instance, 75% uptime is 91.25 days, but .25 days is 6 hours, so it’s 91 days and 6 hours.  At 3-9s and below, the decimal is base 60, so the max downtime is 8 hours 45 minutes and 36 seconds for 3-9s.

If you’re really a stickler, you have to pay attention to how the service provider phrases the uptime claim.  If they say “we provide better than 99.999% uptime” (as opposed to “we provide 99.999% uptime or better”), that means there’s LESS than but not equal to 5.256 minutes of downtime in a 365 day period.  It’s really just an inclusive/exclusive question on the range of  numbers.

As for choosing the right level of service for your site, it really comes down to number crunching and how much your site actually brings in.  Take, for example, the blog BoingBoingFederated Media sells out a 125×125 ad spot on the site for $7.00 CPM.  With 7.83 million monthly page views, that means the site gets a steady 3 hits per second.  Even if we say that the site only has a single 125px square for ad revenue on each page to generate revenue (though it has more), the site brings in AT ABSOLUTE VERY LEAST 2.1 cents per second on average.  The difference between 6-9s and 7-9s is about 28 seconds, so you can see that at only 2.1 cents per second, that extra 9 only brings in another 60 cents.  Now because we can only compare the bottom end of the income (as opposed to the top end of the income) to the service costs we can only say what might be a good deal - not what would be a bad deal (with more data on actual income per second, we could determine to the second how much guaranteed uptime they should buy).  The difference between 6-9s and 7-9s is only about 28 seconds.  So if upgrading from 6-9s to 7-9s costs 60 cents or less (incredibly unrealistic), we can safely say that’s a good deal.  But we’re not sure 6-9s is even worth it, so lets go a little farther down the uptime list to 1-9 vs 2-9s.  At 1-9, that’s 36.5 days of downtime.  In 36.5 days downtime at 2.1 cents per second, the site misses out on at least $66,225.60.  At 2-9s, the site misses out on $6,622.56.  Pragmatically, if the cost between going from 1-9 to 2-9s is less than the difference ($59,604.04), then it’s definitely worth it for the company to upgrade service from 1-9 to 2-9s.

For companies that use their site solely for referrals that convert into a sale or service contract, 4-9 or 5-9 service levels (which are rather common) are typically more than enough.  But, in very high end enterprise systems like investment companies, stock exchanges, and multi-billion record inventory databases where the income per second is measured in the hundreds or thousands or even millions of dollars, even 15-9s uptime might be worth the fees.

Composite Managers: Open Source Compiz Fusion vs Microsoft’s Aero

July 13th, 2007

Composite managers are another software layer that sits between the user interface and the software model, and are basically used to bring 3d processing to the user interface.  Where there used to be a single plane node and sprites would be drawn on it, the computer with a composite manager will first draw 3d nodes and then put the sprites on those nodes.  The result is tons of beautiful effects.

For example, the desktop can be drawn as a cube and sub-nodes placed on it, and the computer only zooms out when changing the face of the cube.  The result is the desktop cube.

..:: Now for the Videos

The first minute and a half is Vista’s Aero. When you get to the 3:00 remaining, the rest is all CF. If you’re wondering why CF got more screen time, it’s because, well, CF’s feature list dwarfs Aero’s.

..:: Beryl + Compiz = Compiz Fusion

Note that Beryl is still being extended and was a fork of the Compiz project. The two have re-merged and are now under the name of CF. Check out a few of the preliminary videos. This video has a working version in Ubuntu Feisty which came out mid-2007.

Joost Beta Reviewed

April 5th, 2007

Today, my Joost Beta application was accepted. So, I went over to their installation page from the link in the email, with an open mind. I was excited. On paper, Joost looks like it may revolutionize the way we view media content. It’s essentially a bittorrent client on a closed bittorrent network with a video player and interface built on top. Before I start, note that I am completely unaffiliated with Joost. I am just a regular computer geek exploring some cutting edge media software. None of this review is endorsed by Joost or any Joost affiliates. These are my opinions. Overall, I’m fairly impressed, but as of now, there are some fundamental flaws preventing this from replacing your cable or satellite provider.

..:: Installation

I arrive at the download page through the link in the email (it has some encoded string in it, so don’t bother guessing it). I look at the download options, and they have a client for … Windows … and OSX only. No support for Linux. This means I have to reboot into WinXP. I reboot and download. It’s a 10.5 mb file so it only took a few minutes (8mbps cable for the win; I know, the Asians and Euros are laughing). The minimum requirements list off:

  • 500 mHz processor
  • 512 mb ram
  • 48 mb video ram
  • WinXP
  • directx 9.0c

Strangely, the installer detects that I only have 480 mb ram, but I definitely have 512 mb ram. It does detect my video ram (or lack thereof) correctly, and I only have 32 mb. I suspect that this is because my boards video ram is not dedicated, so it just takes the 32 out of the 512 mainboard ram. The client still recommends that I should install despite possible slowdown.

Then comes the EULA acceptance, and the EULA is in a 1″x1″ (roughly) frame. As a law student (particularly in contracts and intellectual property), I actually look through it (skip to first impressions if you don’t care about legal commentary). Ctrl-A is disabled in the frame, so I have to shift-click the top to bottom. Then I Ctrl-C copy it out into notepad to look through it for any crazy terms. I find a few notable terms, but nothing that makes my skin crawl:

2.1.1 Joost and the Joost™ Software will, and will permit third parties to, display advertising and other information within the interface of the Joost™ Software and/or in connection with the display of content and programming, in all cases without compensation to you. Joost or the Joost™ Software serves, and permits third parties to serve, advertisements within or adjacent to the content and programming delivered to you by the Joost™ Software.

So there are ads, but it doesn’t seem to be adware.

2.1.2. The Joost™ Software will utilize the processor, bandwidth and hard drive (or other memory or storage hardware) and/or cache of your computer (or other applicable device) for the limited purpose of facilitating the communication between, and the transmittal of data, content, programming, services or features to, you and other Joost™ Software users, and to facilitate the operation of the network of computers running instances of the Joost™ Software.

In other words, Joost will use my bandwidth, most likely on the bittorrent protocol.

2.1.3. The Joost™ Software will take organizational and technical measures intended to protect the privacy and integrity of the computer resources (or other applicable device) you are utilizing, however, you acknowledge and agree that this is not a representation or warranty of Joost.

Joost cares about my privacy, but makes no guarantees of anything. These kinds of clauses are a joke and mean nothing.

The next section (3.2) of the EULA is rather long and explains all the stuff you cannot do, particularly making hacks for the client, packet sniffing, and stack watching.

4.1. You hereby acknowledge and agree that the Joost™ Software may be incorporated into, and may incorporate itself, software and other technology owned and controlled by third parties. Any such third party software or technology that is incorporated in the Joost™ Software falls under the scope of this Agreement. Any and all other third party software or technology that may be distributed together with the Joost™ Software will be subject to you explicitly accepting a license agreement with that third party. You acknowledge and agree that you will not enter into a contractual relationship with Joost or its affiliates regarding such third party software or technology and you will look solely to the applicable third party and not to Joost or its affiliates to enforce any of your rights.
. . .
4.2.3. When installed on your computer, the Joost™ Software may periodically communicate with Joost servers and/or Joost™ Software installed by other users. Additionally, third party software installed on Your computer may periodically communicate with third party servers for the purposes described in the license agreement or privacy policy between you and that third party.

Third-party software? That may be ad-ware, spyware, or even malware.

5.1. You acknowledge and agree that any and all Intellectual Property Rights to or arising from the Joost™ Software are and shall remain the exclusive property of Joost and/or its licensors. Nothing in this Agreement intends to transfer any such Intellectual Property Rights to, or to vest any such Intellectual Property Rights in, you. You are only entitled to the limited use of the Intellectual Property Rights granted to you in this Agreement.

This is the same nasty that is in the WoW EULA. I can see this in Joost because watching content is a unilateral process. In WoW, one does a ton of work to build up a character, and then Blizzard will eventually yank it from you for whatever reason claiming that it’s not yours and you only have a license to it. Kaplan took a similar stance when I tried to sell my LSAT hard-copy study guides on ebay. They told me I had a license to use these paperback books but not to sell them, and my auction was yanked. This kind of treatment really rubs me the wrong way.

For the most part, the rest is just the typical indemnification, waiver of liability, etc, that you only find in the software industry. Besides the possibility of adware and the grossly limited license to use, this doesn’t seem too wretched. As it’s currently free, I accept because my WinXP installation is sandboxed, and if the Joost client wrecks anything, I’ll just reload my image.

The actual installer takes a few seconds to run and Joost loads up.

..:: Registration

You have to enter your email address that team Joost or your inviter sent the invite to. Then pick a username of 6+ characters and a password of 6+ characters. So far, the process has been seamless. The player pops up showing some intro content.

..:: First Impressions

There are some entire shows from Viacom networks (MTV, Comedy Central, VH1 just to name a few). Unfortunately, the choices of actual shows are limited. When you choose a channel, the player starts the default show if you click the play button, but if you click the list icon (which looks unlike any list icon I’ve ever seen), it shows you everything on that channel. The interface is incredibly simplistic and definitely looks to be modeled for an IR remote control. The content quality is surprisingly good at 1024×768. It’s better than the youtube videos, but it’s clearly not HD. A quick switch to windowed mode (out of the default fullscreen) and it loads up at 800×600. Even still, some of the content shows clear upsampling at 800×600. All the content seems to be at least standard definition, so if you ran this on a second monitor output to a larger television, it might look alright. Since everything is downloaded in real time from gardened bittorrent networks, some of the content comes in a little choppy at first, and may get a little choppy here and there.

Immediately, there is a notice up top about a 16+ age limit, so this content probably isn’t for your toddler. However, there is a Saturday Morning Cartoons channel.

..:: Content

Looking through the channels, the content selection is fairly limited but respectable for this startup. Notably, there are:

  • MTV: Laguna Beach, Two-a-Days
  • Comedy Central: Stella, Freak Show, Dog Bites Man
  • National Geographic: some 15-20 documentaries that are 50 to 90 minutes long.
  • Warner Brothers Records: about 15-20 “Making of…” videos. The actual music videos don’t appear to be there.
  • VH1: Hogan Knows Best, Sonotorious
  • IndieFlix Premier Hits: various videos that appear to be from indy studios.

The shows that are from Viacom are typically 22 minutes because they’re aired on regular television in 30 minute blocks. There are also more shows from channels I’ve never heard of, and a total of 27 channels as of this writing.

..:: Interface

Unfortunately, this interface and system completely fail to lend themselves to quick browsing of content. If you don’t already know what you’re looking for, it will take forever because there is no channel surfing of any kind. There should be some “current media preview” that essentially plays 10 second intervals of currently available content.

However, if you do know what you’re looking for, the system is just as simple as any DVR, whether it be mythtv, tivo, or winmce.

While some of the icons are unintuitive (or just irregular), getting hang of the UI takes only a minute or two. After 2 minutes or so, I was blazing around the menus checking out content.

..:: Upsides

The UI is very simple. If you were running this with a keyboard on a TV, a child could probably operate the system. If you have any experience with any popular DVR, you’ll learn to navigate Joost in a matter of minutes.

There is a My Joost section so you can add your favorite channels into one section.

The entire system transparently manages downloads and playback, as opposed to using azureus to download and then a media player for playback.

Checking my process list didn’t seem to show any spyware, but as Joost can run in the background, there’s no telling what’s going on while it’s running. The project seems reputable enough with their involvement in tons of FOSS, but this isn’t a guarantee.

There are live chat-room overlays, user ratings so users can rate various shows, and various other widgets available.

..:: Downsides

There is an incredible lack of content. The last review of Joost that I read only listed off some of the National Geographic documentaries, and the Indy films, and that was only earlier this week. Therefore, it appears that Joost is laying on the content, but it’s not currently there yet.

There’s also a lack of servers. Thus initial playback takes a while on some programs, and if you’re not watching the most popular section, there just aren’t enough seeds to get the content fast enough. Sometimes, the playback stops altogether and the client tells you to bug off.

Unfortunately, the user ratings are nowhere to be found. They don’t show up in the channel and show listings.

I checked to see how many invites came with my beta application acceptance, and I have 0. So, please do not ask me for an invite.

There is no “seek” or channel surf option, and the only popularity system seems to be the “Most Popular” channel. This will be a HUGE part of these next-gen content delivery systems. With the barrage of content, there will be a need to skim off the chaff. Because there is such little known branding, there needs to be a better method of finding content.

There are advertisements, but they appeared only in the downtime between content sections, not actually intersparsed into the content like regular commercials.

This system will eventually have to make money somehow, and advertisements seem to pave the way. However, because most DVR users are the people who will most likely pave the way to widespread net-tv usage, DVR users probably won’t give up their advertisement free systems for on-demand net-tv.

..:: Overall

It’s still in beta, so there’s obviously going to be some issues. However, at the moment, the content playback is just a little too choppy, and the amount of content available is currently just too small to use this regularly.

The shows my girlfriend and I watch are Daily Show, Colbert Report, South Park, SG1, Good Eats, Mythbusters, Scrubs, Black Donnellys, Heroes, Greys Anatomy, Laguna Beach, The Hills, House, ER, Buffy, and Gilmore Girls. Of all this, only Laguna Beach is on Joost, which means Joost is a long way from replacing my mythtv.

Once again, this is still in beta so I’m not being my usual harsh and cynical self. I foresee that when this goes into open production, this will be incredibly awesome. If there are tons of users viewing content, they’ll be seeding content too, and hopefully this becomes a respectable enough portal that more providers will actually post material. At this instant, though, it’s still merely something to play around with. I can legitimately say that this could replace my cable provider within 5 or 10 years, but I’m not calling up to cancel just yet. There’s still some polishing to do.

Supercooled Liquids

February 9th, 2007

Want a new party trick?

And now done with water…

This is called supercooling. When water is pure enough, there’s nothing that the H2O can bind to in order to start the phase change, as the H2O liquid can’t form a crystalline form against other H2O liquid.  A simple gaseous bubble of air is enough though to start the freezing process.

With the beer, when you open the bottle, the concentration of dissolved CO2 changes because the bottle has been opened/depressurized. The loss of pressure causes CO2 that has been forced into the solution to escape (usually forming bubbles along the side of the glass), lowering the concentration and raising the freezing point. The temperature is still low, but the freezing point is much higher, so the liquid.

There are many more videos of supercooled liquids on youtube.

And just because you can get water to stay in liquid form after it’s passed the freezing point doesn’t mean you can’t do the same with the boiling point. You can also superheat water — heat it past the boiling point.

In this vid, the temperature of the water passes the boiling point of water, but there aren’t enough impurities to allow bubbles to form (so the water doesn’t boil). A little agitation lets the bubbles form, and the water violently turns to steam (which carries way more energy than water).

Wikihow has a decent writeup of some methods on how to to supercool water.  Remember kids, always practice safe chemistry standards and only perform experiments under adult supervision.

Bash Script to Randomly Change Gnome Background

January 14th, 2007

This code uses a backgrounds folder, set as $bg_path at the beginning of the script. Just drop it in your cron.hourly folder and let it run. It will change your background on all desktops every hour (or whatever you set in cron). The script supports PNG, JPG, and GIF images, and you can add more by just changing the extensions variable at the top.

The Script

#!/bin/bash
# script: change_backgrounds.sh - bash version
# version 2007.3.7
# description: randomly replace gnome background with one from a directory
# credits: David Loschiavo [http://www.djlosch.com], Steven Van Ingelgem
# license: GPL

bg_path=/mnt/archive/media/pics/backgrounds
extensions=”jpg png gif jpeg JPG GIF PNG”
temp_bg_list=/tmp/bg_change_list

rm -f $temp_bg_list

for extension in $extensions
do
	find $bg_path -iregex “.*.$extension” >> “$temp_bg_list”
done

cnt=`wc -l “$temp_bg_list” | cut -f1 -d” “`
all_bgs=`echo `expr $RANDOM % $cnt + 1“

selected_bg=`head -n$all_bgs “$temp_bg_list” | tail -n1`

logger “Changed desktop to: $selected_bg”

gconftool-2 -t string -s /desktop/gnome/background/picture_filename “$selected_bg”
exit 0

The previous version (2007.1.14) did not account for spaces in filenames. Steven Van Ingelgem made the necessary changes, and I have put them up here. Thanks Steven!

..:: Installation

There are multiple ways to set this to run. The first is to just drop it in your cron.hourly folder and set the permissions.

sudo wget http://www.djlosch.com/scripts/change-background.sh -O /etc/cron.hourly/change-backgrounds.sh

Then change the permissions to allow it to run.

sudo chmod 700 /etc/cron.hourly/change-background.sh

Now edit the file and set bg_path to wherever your backgrounds are stored. DO NOT leave any spaces outside the double quotes.

Acceptable: bg_path=”/home/your_username/backgrounds”
Not Acceptable: bg_path = “/home/your_username/backgrounds”

Finally, to make sure the backgrounds don’t appear funny, right click on the desktop and go to “Change Background”. Then make these setting changes:

Style: Scaled
Desktop Colors: Solid Color
{Color Palette->Color Name}: #333333

The rest of the settings you can leave unchanged. You can customize the <Color Name> to something other than a gun metal color, but that’s what I prefer.

If you want the background to change at a different interval, check one of the many crontab tutorials out on the web.