The Robinson Factor
The Robinson Factor
David Robinson's Weblog

20050216 Wednesday February 16, 2005

Budget Not Such a Budget

On a recent trip to Boston I rented a car through Budget. I had the normal options of buying the tank of gas for an average price per gallon, returning it full, or returning it partially empty and paying an outrageous price per gallon. As anyone who has done the math, unless you are really sure you will return it almost empty, buying the tank is not a good deal.

Now the new hook.

If you return the car with less than 75 miles travelled, they will charge you $6.00 regardless of what the gas gauge says!!

The only way around this charge is if the gauge is full and you show a receipt for gas purchased, but they will not remind you to show it to them to avoid the fee!

I suspect that they are trying to combat the fact that most cars will read full with up to a couple gallons of gas being used. Someone driving just a short distance can return it "full". As a result, if they top off the tank before the next customer they may end up paying for a gallon or two. Most rental car companies simply ask if you have added gas, if not they charge you a per mile fee, otherwise they have a fixed price per eighth of a tank.

Is this solving a real problem or just another way to get a few more bucks per customer? I'll let you decide.

( Feb 16 2005, 08:34:34 PM CST ) Permalink Comments [1]

20050210 Thursday February 10, 2005

Vote as I Say, Not as I Do

I take pleasure in having been accused by one person as being a Democrat and another as a Republican. In fact I don't much like either party and my personal views cross many party lines. I am not a Libertarian either.

It is always interesting to watch political parties espouse one philosophy while actual implement another. The Republicans have had the advantage in past years of not being in power, so any positions or proposals by them that were not accomplished could be blamed on the Democrats. Now that they are the party in power, they have no one to blame if their words fail to become action.

So how are they doing?

In a recent Washington Post article talks about how the Republicans, traditionally the party of smaller and less intrusive government, have actually become the opposite. The article quotes Indiana Republican representative Mike Pence saying:

"The Republican majority, left to its own devices from 1995 to 2000, was a party committed to limited government and restoring the balances of federalism with the states. Clearly, President Bush has had a different vision, and that vision has resulted in education and welfare policies that have increased the size and scope of government."

Reality is that most politicians first worry about being re-elected and second about party dogma, although the latter may influence the former it is still secondary. The standard stump speech of any politician is that they are the best suited to represent their constituents in Congress. Or in the time warn phrase "All politics is local." Local, if not myopic, vision usually translates into pork barrel spending to "give" the people what they want.

What about tax cuts?

There is a certain cynical element that claims that the Republican strategy of tax cuts is less about supply side economics (a topic for another blog), and more about starving the government of so much revenue that the size of government must be cut to prevent fiscal collapse from out of control deficits. This could actually work if they have the political strength of conviction to risk causing so much pain on the local voters that they are ousted in the next election.

Personally I think that regardless of party, congress will not risk being voted out and the size of government will not shrink.

( Feb 10 2005, 04:28:38 PM CST ) Permalink

20050208 Tuesday February 08, 2005

The Robinson Factor

It was recently called to my attention that the kind authors of the O'Reilly book "Managing NFS and NIS, 2nd Edition" named a NFS server performance effect after me, The Robinson Factor.

Thanks to Hal Stern, Mike Eisler and Ricardo Labiaga!

The description of the problem is fairly vague in the book. The problem was first discovered using Solaris kernel trace data (vtrace: a predecessor of DTrace) on early multi-processors.

The straight forward way to implement an NFS server is to have a set of worker threads awaiting requests. When a request arrives, it is queued by the networking layer and a worker thread is awoke. The first observation is that when a worker thread completes a request it would just go to sleep to be immediately awoke or another thread is awoke to handle the request. The impact is the consumption of the overhead of a context switch including any cache migrations between cpus.

The obvious solution is to have the completing thread check the request queue for more work and process the next request instead of yielding. The unintended consequence of this optimization is that the networking layer has no mechanism to know if the request will be poached by a completing thread or if a sleeping thread needs to be awoken. Thus for each request, one thread is woke up. Under continuous load this is not a problem, but when there is any pause in the request flow some number of threads will awake to find no work. The result is a wasted context switch and possibly some cache thrashing.

To avoid the threads finding no work, the solution is to introduce the notion of state to the worker threads. In addition to the obvious states of awake and asleep, a third that we called drowsy was added. A drowsy thread is one that has been sent a cv_signal to cause it to wake up, but it has not actually run on a cpu. If the networking stack queues a request and there is a drowsy thread, it does not need to wake another thread because it is assured that either a running thread will complete and dequeue the request or it will swtch allowing the drowsy thread to dequeue the request.

While this does not complete eliminate threads waking to find no work, it does greatly decrease the frequency of it happening.

Technorati Tag: Solaris

( Feb 08 2005, 05:35:45 PM CST ) Permalink Comments [2]


Archives
Links
Referrers