Should anyone ever be “anti”?

Should I ever be anti something? I don’t think I should be, rather than knowing what I am against, I should know what I am for.

Let me expand, am I against required public schooling? Yes, err no, um wha?? I am for choice in schooling, thus vouchers. Because required public schooling, cannot exist with what I am for. Does this make me explicitly against? Should I directly oppose? Should the status quo be my target for destruction? Or should my goal be what I aim for?

If I am for something, wouldn’t my pursuit of it imply the destruction of that cannot coexist? This logically is true, but is one approach more moral?

I am not a philosopher, but yet I require a personal philosophy, thus my logic tells me, that destruction, hate, targets (for destruction) is not by its self constructive. My goals for new creation, should they destroy from their presence (think creative destruction) can produce value to me and mine.

Know what you are for, never be against for the sake of being against. Push for what logic tells you is right. Until proven otherwise I wish to live this way, for creation, not destruction, that leaves only ashes, I make ashes to grow better things, with the plan and focus of better things, not ashes.

Goals for 2009

Just a list of major goals for 2009. One quarter into the year not doing to hot so far….

  • Move MLDS Networks from a DBA to an LLC.
  • Double the amount of time spent at the Lake this year vs 2009.
  • Lift, swim, and bike more regularly.
  • Use a TODO list (iGTD)
  • Track my car with Jeff a least once.
  • Call my Grand-parents regularly and get their history
  • Re-learn welding
  • Write an Joomla! component from scratch
  • Do important things first, not things due first
  • Be active with my friends

    Anything else I should have? Some are very strict, with clear goals, others not so much, and tried to attach a goal to them (not spend more time at lake, double the time, that is measurable).

    I put these out in public, so others see them, helps keep me honest. I would be awesome if I had the will to do things just because I want to, that is I am good enough for me. But I have always had issues with that and goal setting. Being a little public helps me. I encourage others to do the same.

    Brock E. Palen

I did it, 738 in. Sq of screen space

I had been thinking of buying a Matrox Tripple Head 2go for a while now. This little box lets me take one video input (VGA or DVI/HDMI) and split it into 3 DVI outs. Even better it only runs off USB power, I love not having a power cord for it. This box is a great idea if you have a laptop like me, and you only have a single extra monitor hookup. If you work all days on computers. More screen space directly turns into better productivity.

So when I found that the I could get the HP 2408h from www.buy.com for $200 and free shipping, I picked up three of these 24″ monsters. I had to wait two weeks for them to show up, but they arrived and they work great. This gave me a total of 738 Sq Inches of screen space (20.5″*12″*3) not including the built in screen on my laptop. See the picture for reference.

Only problems I have with this setup is I can only run the displays at 3840×800 (3×1280x800). This is a limitation of the th2g supported resolutions. I could run the panels at their native 1920×1200 if I only ran two of them. I would like to use the 5040×1050 (3×1680x1050) resolution, which is only supported under XP and Vista. I hope Matrox fixes this in a future firmware update, or Apple makes a fix in an OS X update. Running at 3840×800 is fine, just things are not as sharp as they could be, and they show up quite large on at 24″ screen at that low of a resolution.

The other issues I have is the panels only support HDMI and VGA in. This was an easy fix because DVI and HDMI use the same signals, sense I had to buy cables anyway, I picked up DVI->HDMI cables for $6 each.

Issues going forward, I was going to replace my laptop with a new unibody MacBookPro, but Apple, in a really dumb move, switched from dual link DVI, to Mini DisplayPort. Short is, the port is not supported by anyone, and not my th2go for sure. You also have to have an adapter to get VGA or DVI out, so it is workable, but to run this amount of screen space, you have to have dual link DVI, like what is in my old MacBookPro, and used by Apples own 30″ display. Well Apple has a part of this for $100 (rip) and it doesn’t work. If you look at the comments on the product page, and online don’t even bother trying till it is fixed by Apple. So I am waiting to upgrade.

GSXR-600 Millage vs. Ford Focus SVT

I have two babies, My car a Ford Focus SVT in red and a Suzuki GSXR-600 sport bike. I am going to look at the millage comparason that I have seen on these. Note the millage I get tends to be better than stated from the factory. I think this is because my fraction of freeway driving is above the expected. Lets just say I enjoy them, and I take care of them also.

First some pictures.


The bike gets 50 MPG the car gets about 30 MPG. Now it was expected for the bike to get more but look at the size and weight:

Weight Power Power/Weight
GSXR-600 359 Lbs 115HP 0.32HP/Lb
SVT Focus 2750 Lbs 170HP 0.061HP/Lb

Now the bike is kicking out a lot more power, but it should not need this, but assume that both the car and bike must run at maximum output (peak power) when driving. What would the expected millage of that bike be? I get the feeling that the bike should be a lot better than it should, here are the numbers.

One gallon of regular 87 gas has 132 Mega Joule/Gallon. For those 1 Joule/Second is 1 Watt, and 1 HP is 745 Watts. Thus the bike is 85,675 Watts and the car is 126,650 Watts. Thus the car is consuming 47% more energy than the bike.

Thus if the car is getting 30 MPG shouldn’t the bike be getting 47% more? This is about right, 140% of 30 is 42 MPG. Thus the bike at 50 MPG is about what should be expected, this is because of less engine loss, aerodynamic losses and all the other bits about the bike (um it is a lot lighter

I am sure I got most of my math wrong here, (is 47% more of 63% more?) but I am in the ballpark on this one. My assumption that the bike should be getting better millage than it is was false. It gets right where it should be with current engine technology (these are 2004’s and 2003’s).

Sources:

Bikez 2003 GSX-R
Edmonds 2004 Focus SVT

Tutorial - Removing Vocals from a Pop Song

I recorded how I removed vocals from a pop song to be sung in wedding. Yes I know the quality of the recording is poor, it was done really fast with no rehearsal.


Streaming OE’s Playoff Games?

Attention Ovid-Elsie Alums.

During the last O-E playoff game WOES ran out of space on their streaming server for people out of town to listen. I (via MLDS) would like to provide WOES with the extra server, software and bandwidth to support an unlimited number of listeners.

What do you think? Please comment, let me know:

  • Did you try to listen but couldn’t connect?
  • Do you want a stream other than Real?
  • Do you know anyone who wanted to listen but didn’t know you could online?
  • If you would listen from my stream!

If you are a O-E staff member, student or parent. Please ask O-E Schools and WOES to accept my offer. Or if you have any ideas please place them in the comments. If you wish to email me directly my email is brockp@mlds-networks.com

Brock Palen, O-E Alum Class 2002

Using Index’s to make Gold Fast

We use Gold an allocation manager built by Cluster Resources to collect data on ran jobs. We don’t currently use it for allocation management.

While Scott Jackson did a great job creating gold, it was not built for speed. He backed Gold’s data store with the PostgresQL (PSQL) database but did not create any indexes on the database. This caused PSQL to run very sub optimally. Once Gold started showing some performance problems back a year or so ago we put some work into speeding up gold. This work was added to Gold 2.1.5.0. This solved our problems for a while, till now.

Gold was running a large number of quires of the form:

SELECT g_reservation_allocation.g_id,g_reservation_allocation.g_amount FROM g_reservation, g_reservation_allocation
WHERE ( g_reservation.g_id=g_reservation_allocation.g_reservation AND g_reservation.g_start_time< ='1226009628' AND g_reservation.g_end_time>‘1226009628′ AND g_reservation_allocation.g_account=’2′ ) AND g_reservation.g_deleted!=’True’ AND g_reservation_allocation.g_deleted!=’True’;

This query even with index’s on a few of the WHERE conditions PSQL was doing a sequental scan. Using the ‘EXPLAIN ANALYZE’ syntax we see:

 Nested Loop  (cost=0.00..53411.23 rows=1 width=12) (actual time=2878.228..18789.857 rows=502 loops=1)
   ->  Seq Scan on g_reservation_allocation  (cost=0.00..47592.58 rows=1657 width=16) (actual time=2870.689..17636.409 rows=928 loops=1)
         Filter: ((g_account = 2) AND ((g_deleted)::text <> ‘True’::text))
   ->  Index Scan using g_id_idx2 on g_reservation  (cost=0.00..3.50 rows=1 width=4) (actual time=1.238..1.239 rows=1 loops=928)
         Index Cond: (g_reservation.g_id = “outer”.g_reservation)
         Filter: ((g_start_time < = 1226009628) AND (g_end_time > 1226009628) AND ((g_deleted)::text <> ‘True’::text))
 Total runtime: 1707.245 ms

So even with the indexes PSQL is not optimizing the where condition. The worse being the check for !=g_delted.

As you can see an 1.7 second query is way to long, if we want to start 100’s of jobs a minute. To speed this up we found that PSQL lets indexes have WHERE conditions. These conditions lets PSQL know right away where to find data where g_delted!=’True’.

create index  g_reservation_acct_idx ON g_reservation_allocation (g_account) WHERE g_deleted!='True';
create index g_id_where_idx ON g_reservation (g_id) WHERE g_deleted!='True';

The first index lowered the query time to around 16ms. The second index is chosen over a regular index just because it is a smaller search area. It was really added for another common slow query that Gold does. Thus it only speeds up the above query to about 8.5ms.

 Hash Join  (cost=1462.31..1546.42 rows=1 width=12) (actual time=3.846..7.951 rows=502 loops=1)
   Hash Cond: ("outer".g_reservation = "inner".g_id)
   ->  Index Scan using g_reservation_acct_idx on g_reservation_allocation  (cost=0.00..75.85 rows=1649 width=16) (actual time=0.020..2.175 rows=928 loops=1)
         Index Cond: (g_account = 2)
   ->  Hash  (cost=1462.02..1462.02 rows=117 width=4) (actual time=3.763..3.763 rows=502 loops=1)
         ->  Index Scan using g_id_where_idx on g_reservation  (cost=0.00..1462.02 rows=117 width=4) (actual time=0.134..2.876 rows=502 loops=1)
               Filter: ((g_start_time < = 1226009628) AND (g_end_time > 1226009628))
 Total runtime: 8.492 ms

So our performance per/query went from 1600ms to ~10ms. Not bad, now we can start 100’s of jobs per minutes. So why was this performance so much better? The reason our performance started to become a problem the second time around was due to how many jobs we had run. g_reservation_allocation had 1,649,899 records. Not huge but big enough that if your doing a SecScan like PSQL was doing running over a gradually growing table would get slower and slower. Having an index of only valid jobs (g_delted!=True) gives PSQL an oprotunity to know exactly very quickly where to look on disk. Of which there was only 928 records. This number will only change with number of running jobs. Which will grow over time as we add hardware, or we run more serial jobs. In any case it will grow much slower than the total number of jobs ever ran. We should hit 2 million records very soon.

Moral is, if your using Gold add the above index’s. It will help you out greatly. You can find my email notifying Gold Users here: http://www.supercluster.org/pipermail/gold-users/2008-November/000123.html. I hope Scott adds this index to the next release of Gold so you don’t have to add it your self.

You can always email me questions at: brockp@mlds-networks.com

What can you do without government? - Why go to space!

First watch this from TED

Now those of you who know me will pick out right away the two topics that stick out to me in this video:

  • Why did it take so long to happen?
  • Why didn’t it happen when Government had a monopoly in space?

Why did it take almost 50 years after we went to the moon for something like this to happen? When we finally did make it to space why did it take just a small group of people who wanted it to happen? Is there something fundamental about our old structure of access to space that fundamentally made it impossible?

My personal reason for why the cost of going to space never went down was that there was a feeling that space was owned by the government. If our country isn’t socialist on the ground it is in space. If you thought trying to get all the permits to build a house was bad talk to someone from this project about getting Ok’d for going into space. People were just not allowed in two ways, there was a paper wall, and people just thought it was NASA’s job. NASA’s job is to study earth and space, not to exploit it for our use on earth. I think people thought NASA’s job was to do it all when it was not. Even though it took so long I think it was good that it is not NASA offering flights to space for average joe (well above average income joe, but not richie rich).

NASA even if the people thought that it was NASA job to use space for our benefit, NASA could not. Work for a public employer and Milton Freedmans, “anything the government does, private sector can do for half the cost” you will know why NASA can not. NASA will not have done such a thing even if it wanted to. Look at the Aries project to replace the shuttle. Late and over budget, yet offer of $10 Million in cash in a few years you can ride to space for $200k. Amazing, government (in this case NASA) couldn’t/wouldn’t do it, so regular Americans did it. Yes that is the power of free people in a free country. We can find ways to do things better and suffer the loss of failure and gain of success.

Look at the numbers, you can fly to space for 200K/person. If a person weights around 175lb on average, that is a cost of $1142/lb. Compare the shuttle of $10,000/lb. Well the shuttle is 20 year old right? Yes and we knew it cost more than the Saturn V when it was built, “but it was a good idea” (wrong) and we did it anyway. See government does not have to live with failure like someone doing this on a shoe string. Yeah $10-25 Million isn’t your normal string but compare that to Aries and show me what is efficient Oh and notice how he says at the end that $20,000/flight is on it’s way. I think its time for NASA to just pay to have someone else (the market) to fly their stuff to orbit. The market has shown how it can built and fly such a device in less than half the time for less than 25% the cost and operate for even less.

So the next time someone says thats important the government should provide that. Think back to how space flight was when it was government controled. Over priced, wasteful in people (think what all those skilled people could be doing), resources (all that fuel not being blown all over Florida), and availability. If they did get the cost down to $20,000 and I wanted to avoid buying a house for another few years I could fly to space, and I don’t make that much.

My what a few people can do. Just proves If you think something should be done go and do it, don’t wait for the government to do it! Get off your butt, find others who think like you and put it together. Or when your old, you will still be waiting.

Bulk Image Resizing with I

I was recently tasked with resizing a large group of images to post online. The original images were to large both in file size (to long to download over dial up) and physical size (images went of the edge of screens).

To do this I went to my trusty command line and used www.imagemagick.org. Image Magick comes with the wonderful convert tool. Using convert I have made jpg’s into gifs and mtiff’s into gif’s. But I have never used to resize and compress before. Lucky me there is a huge list of options. I even thought about watermarking the images (copyright info) using convert but decided against it.

To start I figured out how to resize then how to compress. The final command line option I came up with was:

convert input.jpg -resize 50% -quality 50 output.jpg

I then proceed to do this in a shell script, which took a few minutes to run, but still hours faster than I could ever do with photoshop or the GIMP.

#!/bin/bash
for x in `ls`
do
   IMG=`echo $x | awk -F. '{print $1}'`
   echo $IMG
   convert $IMG.JPG -resize 50% -quality 50 ${IMG}_bp.jpg
done

Now there is a bunch of resized images ready in minutes. The input images were all of form FILENAME.JPG the output were all the form FILENAME_bp.jpg

Questions about hosting images should go to brockp@mlds-networks.com.
The images can be found at the: Michigan Jersey Cattle Club

How your Hybrid was Paid for by the Lower/Middle Class

Some thoughts on government intervention that I am sure most people at face value would say is great really distributes wealth from the lower and lower middle classes to the upper middle and high class.

It was all done with Hybrid cars. Turns out our all wise government decided we need to have tax credits when buying a new hybrid car (Reference). At face value sounds great, this will encourage production of hybrids because it will lower the cost to get a hybrid thus increasing the number of people who can afford them. It gets support from green/auto/union etc.

What is the side effect of this policy though? Turns out in absolute terms it’s not all great. Hybrids being new and complicated are kinda pricey. Cheapest base model I found was around$20,000 (2008 Toyta). This is out the range of price for a regular house hold. Remember the median house hold income is around $47,000/yr and that’s on average a family including kids. So the only people who can really afford these cars are upper middle class and wealthy people.

So this is where the short change comes in. Only wealthy people can afford these cars and thus they get the tax break. Everyone pays taxes though. So everyone pays in to provide these breaks but only those who are rich can get them.

Now there is some technical arguments against this, mostly based that we run a deficit and thus the whole does not make up for these credits, its just financed. In general thought though when was the last time you saw someone say we could raise the taxes on the rich (roll back the Bush tax cuts) also say and get rid of that tax breaks on hybrids. I best most who want to do the first would not want to do the second. In the end it’s all money.

Just trying to keep people honest. If anyone can think of a reason why we should do such things please try to convince me.

plants