The Source for Java Technology Collaboration
User: Password:



John D. Mitchell's Blog

April 2005 Archives


What does 99.999% reliability really mean?

Posted by johnm on April 24, 2005 at 11:46 AM | Permalink | Comments (6)

Michael Levin posted a Java coding challenge this morning to write a Java program to show what terms like e.g., 99.999% reliability actually means.

Here's my quick and dirty take (written while watching F1 :-):

/*
 * What does X nines reliability really mean?
 */

import java.io.*;

public class Nines
{
    private static int SPM = 60;
    private static int SPH = SPM * 60;
    private static int SPD = SPH * 24;
    private static int SPY = SPD * 365;

    public static void main (String[] args)
	{
	spit ("Nines of Reliability: (Hours / Minutes / Seconds)\n");
	spit (2, SPY / 100.0);
	spit (3, SPY / 1000.0);
	spit (4, SPY / 10000.0);
	spit (5, SPY / 100000.0);
	spit (6, SPY / 1000000.0);
	spit (7, SPY / 10000000.0);
	}
	
    private static void spit (int numNines, double seconds)
	{
	spit (numNines + " 9's (");
	for (int i = 0; i < numNines; i++)
	    {
	    if (2 == i)
		spit (".");
	    spit ("9");
	    }
	spit ("%) = up to ");
	spit ((seconds / SPH) + "h / ");
	spit ((seconds / SPM) + "m / ");
	spit (seconds + " seconds of downtime per year.\n");
	}
	
    private static void spit (String str)
	{
	System.out.print (str);
	}
}

Which tells us:

Nines of Reliability: (Hours / Minutes / Seconds)
2 9's (99%) = up to 87.6h / 5256.0m / 315360.0 seconds of downtime per year.
3 9's (99.9%) = up to 8.76h / 525.6m / 31536.0 seconds of downtime per year.
4 9's (99.99%) = up to 0.876h / 52.559999999999995m / 3153.6 seconds of downtime per year.
5 9's (99.999%) = up to 0.0876h / 5.256m / 315.36 seconds of downtime per year.
6 9's (99.9999%) = up to 0.00876h / 0.5256000000000001m / 31.536 seconds of downtime per year.
7 9's (99.99999%) = up to 8.76E-4h / 0.05256m / 3.1536 seconds of downtime per year.

So, 5 9's means less than 5 1/2 minutes of downtime per year. Hmm... Now, how long does it take your server just to boot once?



GCC turns 4.0

Posted by johnm on April 22, 2005 at 10:08 AM | Permalink | Comments (0)

The GNU folks have released version 4.0 of the venerable GCC compiler with built-in support for the C, C++, Objective-C, Ada, Fortran, and Java programming languages.

The biggest general change is the completely new intermediate language representation based on tree SSA. SSA (Static, Single Assignment) is a modern approach to the intermediate representation of the parsed programs which allows for a much more sane and aggressive approach to optimization.

On the Java front, the GCJ sub-project has made major improvements including better support of AWT and Swing and a lot more of the other Java libraries such as java.util.regex. If you didn't know, GCC can generate native (machine-specific) binaries directly from Java code.

Check out the ChangeLog for more details.





Powered by
Movable Type 3.01D
 Feed java.net RSS Feeds