Latency

(To the tune of Yesterday, With apologies to all four Beatles and most sys admins)

Latency
It’s the signature of HPC
that is why it’s running endlessly
your process gates on Latency

This one, well
is embarrassingly parallel
that is why its running fast as hell
the render farm works just as well

Why’s it running slow
don’t you know the bottleneck
demands for some commands
will dictate your architect ect ecture

Here’s the scoop
This one’s nothing more than data soup
that you’re running through an endless loop
You probably should try Hadoop

(This might be the only one I tag as both Lyrics and Networking)

mac2addr reposted

I’ve posted this before, buyt now that I have better source code formatting, I’ll repost. This converts a mac address to a link only IPv6 address.

mac2ipv6addr.c


#include 
#include 
#include 
#include 

int main(int argc, char** argv){

  int addrlen = strlen("0000:0000:0000:0000:0000:0000:0000:");
  char* out = malloc(addrlen);
  char * outorig = out;

  memset(out, 0, addrlen);

  char* addr =    "00:0c:29:20:4e:e3";

  if (argc > 1){
    addr = argv[1];
  }else{
    fprintf(stderr,"usage %s macaddr\n",argv[0]);
    exit(-1);
  }

  int len = strlen(addr);

  if (len > 18){
    printf ("String too long\n");
    exit(-1);
  }

  /*We know we have the right length.  Main processing follows */

  int i ;
  int col_count = 0;
  unsigned char current = 0;
  for (i = 0; i < len; ++i){
    char c = addr[i];

    if (0 == c){
      break;
    }else if (':' == c){
      switch( col_count ){
      case 0:{
        sprintf(out,"fe80::");
        out += strlen(out);

        /*Toggle the '2' bit*/
        unsigned short c2 = ( current | 0x02 );
        if (c2 == current){
          c2 = current & 0xcf;
        }

        sprintf(out,"%02x",c2);
        out += strlen(out);
      }
        break;
 case 2:{
        /*The magic number goes halfway through the mac address*/
        sprintf(out,"%02xff:fe",current);
        out += strlen(out);
      }
        break;
      default:
        sprintf(out,"%02x",current);
        out += strlen(out);

        if (col_count % 2){
          sprintf(out,":");
          out += strlen(out);
        }
      }
      ++col_count;
      current = 0;
    }else if ((c >= 'a') && (c <= 'f')){
      current *=16;
      current += ( 10 + c - 'a');
    }else if ((c >= 'A') && (c <= 'F')){
      current *=16;
      current += ( 10 + c - 'a');
    }else if ((c >= '0') && (c <= '9')){
      current *=16;
      current += ( c - '0');
    }
  }

  sprintf(out,"%x",current);
  out += strlen(out);
  printf(outorig);
  return 0;

}

Ignore that last line. Not sure why the formatting code is closing my open tags insde a pre tag...

RFI: SPEGNO multiple requests

From what we are seeing and what I’ve read, the browser seems yo send a JSON request with no Auth info, and then the whole SPEGNO handshake takes place, turning what should be a single request response into (at a minimum) two.  It seems to me that we should be able to avoid that after the initial auth has taken place.

Is there any way to cache SPEGNO information such that successive JSON RPC calls provide the needed information automatically, instead of requiring multiple round trips per request?

Any Fedora people worked with this stuff and know how to optimize it?  Do I need to revert to a Cookie based approach?

eth0 not present after libvirt clone

With the release of Fedora 13, I have a new target OS for software. In order to deal with the vagaries of installs, I have come to the pattern of creating one VM per target OS, which I get to the starting point, and then clone that for any actual work.

I recently created a minimal F13 VM.  I booted it, and then brought up the network.

This is a minimal install, as I said, which means that it does not have an X install, nor any of the Graphic utilities. In Fedora systems, networking is performed via Network Manager, a User level graphical tool. In order to bring up the network, I was using the “Old School” command

ifup eth0

When I cloned it, and then tried to bring up eth0 from the command line, I got the error message “eth0 does not seem to be present”.

On  Red Hat style systems like RHEL and Fedora, ifup eth0 gets its config info from

/etc/sysconfig/network-scripts/ifcfg-eth0

However, there is a new twist: dev – dynamic device management.  The udev subsystem, when I first booted the “clean” or prototype F13 installed VM, recorded the mac address in:

/etc/udev/rules.d/70-persistent-net.rules

Specifically, the line looks something like this:

# Networking Interface (rule written by anaconda)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:aa:bb:00:dd:01", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

When I cloned the machine, the clone got a new mac address for the network interface.  Looking in dmesg, I saw a message that eth0 has been renamed to eth1.  When I looked into the rules file above, I saw a second line, with NAME=”eth1″.

When I cloned the machine, the clone process did not know about the subsystem in /etc/sysconfig/network-scripts, so there was not ifcfg-eth1 file created, and thus no networking for the clone.

The solution was to delete the first line, and to change the second line to NAME=”eth0″ and then reboot the machine.  In order to make sure that it has network enabled, I also ran

chkconfig network on

Which should re-enable the old style networking on reboot.

Update:
If you have done old style networking already, make sure you commend out the mac address in

/etc/sysconfing/network-script/ifup-eth0

Or change it to the new one, or the init.d script will not bring up the interface.