DHCP Lease Time Optimization

Setting DHCP lease times is in practice pure voodoo. I ran across a paper presented in 2007 on research into DHCP lease times at Georgia Tech’s student network called Usage-Based DHCP Lease Time Optimization.

While the paper on the whole is interesting, what caught my eye was the exponential lease time experiment, and how well it fit GT’s DHCP usage. Instead of a fixed-length lease time, the initial lease is 30 minutes, with each renewal doubling the lease time (up to a maximum of 30×25=960 minutes). Those machines connected for about 8 hours received 16-hour leases, allowing them to avoid reconnection (and reäthentication, which is a bother for users).

This exponential approach brought to mind what I learned in my operating systems class (waaaaaay back in the 1980′s), where the probability of a process terminating within the next fixed unit of time decreases exponentially with process run time.

 

Posted in SysAdmin | Leave a comment

Human Life Value

Posted in Uncategorized | Leave a comment

Eliminating Multi-Threading Headaches

I first touched parallel processing as an undergrad. I was selected to for a summer research program that tackled different aspects of parallel processing using transputers. They broke us into teams and I was put on the parallel debugging team. I missed the sign over the door that read, All hope abandon ye who enter here. My love and hate for parallelism began.

I actually have enjoyed parallelism over the years before it became mainstream. But, for all its intellectual challenge, it’s a pain in hindquarters because the traditional approaches of locks and semaphores makes coding a nightmare one you get past a quickly-reached complexity threshold.

One solution to that has been to use message-passing paradigms, but this has traditionally brought impractical and/or expensive “solutions” to the table.

I’ve been playing with ØMQ (ZeroMQ) because of its powerful sockets. But, I’m already intrigued by its potential power as a parallel-processing messaging system. The white paper Multithreading Magic reviews the problems of parallelism (all of which I’ve encountered) and makes the statement, Most ØMQ users come for the messaging and stay for the easy multithreading.

I’m skeptical of silver bullets, and it may not be fair to call ØMQ a silver bullet, but I have to agree that ØMQ’s simple and powerful tools make the intra-process message-passing paradigm very attractive so far. We’ll see how things go.

 

Posted in Programming | Leave a comment

Overriding DNS for Testing

This has come up three times in the last two weeks. There are times you want to do URL testing on a non-production test machine, but you don’t want to screw around with DNS either.

When resolving a host name, POSIX and Windows machines have a hosts file that it looks in first. If it doesn’t find the host name there, it falls back to using DNS to convert the host name to an IP address.

This can be handy when, for example, you’re monkeying around with Apache URL rewriting and want to (gasp) actually ensure it’s going to work correctly with the production servers’ URL.

For example, if the production servers are at foo.com, and the test server lives at 192.168.1.2, put the following line in the /etc/hosts file of the machine you’re running the tests from (assuming a POSIX machine):


192.168.1.2 foo.com www.foo.com

After flushing the DNS cache, the test machine will now associate foo.com with the test server instead of the production servers.

To reverse the process, remove (or comment out) the line from the hosts file.

 

Posted in Programming | Tagged , , , , , , | Leave a comment

Old But Funny

Ah the 80′s… big hair, Dr. Demento, and the Frantics. Ran across an old skit from the 1980′s that brought back memories. Somebody synchronized clips from Naurto to give a little video to the skit.

Posted in Uncategorized | Leave a comment

Sign of an Immature Programmer

This is a bit of a sticky subject, akin to the endless debates on what makes a “real” programmer (not to be confused with a Real Programmer). I don’t use the term professional because that simply denotes something that you do for pay, with the assumption that if you’re being paid for it, you have a certain level of competence.

However, there are stages of development that people seem to go through as a programmer. Just because one is at a certain stage doesn’t imply goodness or badness, it’s simply where one is at.

I’ve been working with a remote team in a not-to-be-disclosed location, and have been struggling with their work because while they can code, their practices have a lot to be desired. At first I attributed it to incompetence (of which there is a degree), but for my current struggle, I’ve settled on the explanation that they’re still immature in their development practices.

The thing I’m struggling with right now is revision control. In past discussions, I’ve been told that there’s not enough time, the schedule will be hurt, it’s too much trouble. Now that I’ve been forced to cut off direct access to the servers and have said, only through revision control, the truth has come out. The e-mail said, in essence, “Uhm… what’s revision control and can you tell us how it works?”

These people are technically professionals with degrees in computer science, but in my book this is a sign of underdeveloped maturity as a programmer. Revision control is an extremely liberating tool that allows one to work with reckless abandon, knowing that the next “I don’t believe I did that” moment falls from being a devastating heart-stopping mistake to an annoyance. It’s used to varying degrees by individuals, but at least in my circles, I don’t know of a single competent programmer that doesn’t have some form of personal revision control system in place.

In professional situations, a lack of revision control is in my book inexcusable. Client assets need protection, the software process needs the flexibility and surety, and developers don’t need the headaches.

Now it’s a interpersonal and management problem that I have. The inner annoyed part of me wants to say, “RTFM.” But we have work to do, so I’ll need to do a little hand-holding to not interrupt the flow.

Thoughts?

Posted in Programming | Tagged , , , , , , | 2 Comments

看板 (Kanban) and Agile Software Development

Agile software development is an evolutionary practice rather than a process (implementation). An 2009 article Kanban Development Oversimplified has a nice overview of adapting 看板 (kanban) ideas into the development cycle.

 

Posted in Programming | Tagged , , , | Leave a comment

Git Tutorial

For the uninitiated, here’s a nice git tutorial at progit.org.

You can download the current stable version of git at the git home page.

Posted in SysAdmin | Tagged , | Leave a comment

ZFS on Linux

ZFS and Linux unfortunately collide. M. Tim Jones has a paper on IBM developerWorks called Run ZFS on Linux.

 

Posted in SysAdmin | Tagged , | Leave a comment

ØMQ (ZeroMQ) and a Bit of Philosophy

While watching the SLLUG May presentation on SALT by Thomas S. Hatch, I was intrigued by his reference to ØMQ (ZeroMQ). This is a fascinating “intelligent” networking library, but some of the philosophy I found interesting. In the guide it says, for example:

Programming is a science dressed up as art, because most of us don’t understand the physics of software, and it’s rarely if ever taught. The physics of software is not algorithms, data structures, languages and abstractions. These are just tools we make, use, throw away. The real physics of software is the physics of people.

This clicked with me right away. Languages require almost no effort to pick up. Algorithms, etc. are useful toys selected by how well they match the current problem space. The most useful class that I took in university was Computer Theory, the mathematical underpinnings of software, but again it’s a tool.

From the beginning of my software crafting, I intuitively knew that software was about people. Early on I would tell people who approached me, “Write what you think you want, then write what would like in a dream world where anything is possible.” The first list is normally the list constrained by preconceptions of what can and cannot be done. The second list is usually what the client really wants. It’s a great way to trigger discussion on what the real problem space is. And, frequently, many of those items are actually quite feasible.

Code has to talk to code. Code has to be chatty, sociable, well-connected. Code has to run like the human brain, trillions of individual neurons firing off messages to each other, a massively parallel network with no central control, no single point of failure, yet able to solve immensely difficult problems.

I’m sill not convinced about the human brain analogy (a different topic), but I am convinced from my experience that this much is true. Code must talk to code, easily, impromptu, and in unexpected ways… but this hides the greater reality. It is people that drive the whole process. It must be easy for people to arrange the code chatter, and to change it at will to fit the changing needs and desires of individual humans.

While the implementation may show its age, the original Unix model of tiny specialized programs that can be easily threaded together has stood the test of time quite well. The old tools of sed, grep, find, etc. are bits of code that talk to code in a primitive way. Dated they may be, but Un*x and its relatives are the backbone of the Internet.

If you’ve done any work with threads, protocols, or networks, you’ll realize this is pretty much impossible. … Even connecting a few programs across a few sockets is plain nasty, when you start to handle real life situations. Trillions? The cost would be unimaginable. …

Today we face another software crisis, … Only the largest, richest firms can afford to create connected applications. There is a cloud, but it’s proprietary. Our data, our knowledge is disappearing from our personal computers into clouds that we cannot access, cannot compete with. Who owns our social networks? …

[W]hile the Internet offers the potential of massively connected code, the reality is that this is out of reach for most of us, and so, large interesting problems … remain unsolved because there is no way to connect the code, and thus no way to connect the brains that could work together to solve these problems.

Having worked on projects that have tackled pieces of the puzzle, this resonates with me also. Individuals, when left to their own devices to do clever things, can solve this. We have to not buy into the notion that traditional monolithic portals are The One True Way. It’s a seductive ancient paradigm, but software was made for Man. Man was not made for software.

Posted in Programming, Uncategorized | Tagged , , , | Leave a comment