Stupid network modeling

August 30, 2009

I was skimming[1] through the book:

Forecasting Oracle Performance

and i read this part:

«The world is much too complex for us to understand. To compensate, we create models to simplify the world around us, turning it into something we can comprehend. Models help us understand our world. When focused on a specific area in which the scope is very limited, a model can teach, expose, describe, reveal, and draw out the understanding we may desperately need. Modeling is all about making the complex simple.»

This part made me pause and think for a second, which models I’m using involuntary in order to understand some aspects of my work. And then it hit me. Most of the times, in my mind I model networks using streets, junctions, and cars. After driving for something like 12 years in Athens (which is notorious of traffic, and driving skills needed to stay alive), and having a tendency to always trying to find new paths to get to places avoiding the problems of the day (demonstrations that close the city center, accidents, trucks, taxi drivers stopping at any place, etc) I have an instinct of how I should drive to get where I want on time (not always 100% success though :(). I drive quite a lot everyday, so this has become something like a second nature to me, and my mind has been wired to operate in these conditions. As a result I tend to model networks, using my driving experience.

I model links between routers or switches as roads, and the routers or switches as junctions that have either traffic signs or a police officer to guide the traffic. VPNs or tunnels, are just special lanes that special vehicles travel (think something like the emergency lane in national roads, if the road suddenly is totally destructed, or the police office on the junction has gone bananas .. there goes the VPN). The packets are just the vehicles. I model different types of packets, as different type of vehicles. This is a extremely simple model (that’s the reason i say stupid in the title ;)) but sometimes it helps to diagnose problems, or explain to myself (or others) some concepts. Let me give some examples.

  1. Suddenly I realise that a network link is congested. The first think is to identify which packets are passing through this link. Then in my mind I create a simple “street” map that represents the network and I place myself as a driver in one of the packets stuck in the traffic. Which is the first question that pops in my mind?? “How did I ended up being stuck here???” Answering this question provides me info if this the path that I would normally choose, and if not how the heck I got here. Also it makes me think of alternative paths that I could follow to get to my destination. If I have the network map in my head like a street map, then I can easily spot the alternative ways, and find different solutions (well I could go that way .. but this is an one-way street on the opposite direction. Bummer! But .. what if I could make it for a while .. a two way street. AHA! There’s a possible solution.
  2. What about the firewalls. Simple solution. Each firewall is a  junction with the swat team that  says: Only red vehicles pass. Other type of vehicles are darn to heck. Hey suddenly I see a pink car on the other side. Something is wrong, what happened (and usually I first blame the equipment, just to realise after a while that it was a human error[2]).
  3. QoS. Think of 2004 in the Olympic games, that a special lane was designated for vehicles that were used for the olympic games. Each car that got a “special olympic pass” could be in this lane passing by  all the other suckers .. eeer drivers I mean that have to pile up in queues in the remaining lanes. However when no special olympic vehicle was in sight (and no police officer of course) noumerous drivers could just go the “special olympic lane” so they could use the whole street (Greek people are not known for the law abiding behaviour). However when a olympic vehicle appeared, everybody else was back in the other lanes. This special olympic lane of course could be congested, but only by olympic vehicles, but this is another story.
  4. Bandwidth vs Latency. A bit more complicated. We have the national road that has 3 lanes per direction, and then we have the side street that has 1 lane per direction. Now imagine (it’s a model .. we can imagine anything we want .. even little green alliens to make it interesting), that on the national road there is a speed limit of 80km/h, whereas in the side road the speed limit is 120km/h. (normally, the speed limit would be lower on the side road, but usually there are not any policemen … so the speed limit is deduced by the holes in the street). So if we want to take the bandwidth (assuming all the cars are 5m) on the national road it is 13.32 cars/sec. On the other hand on the side street the bandwidth is 6.666 cars/sec. (The calculations are made on the top of my head so bear with the numerical errors).The national road provides more bandwidth. However if two cars start from the same point and the one travels on the national road and the other travels on the side street, the one on the side street will arrive faster. So more bandwidth on the national road, lower latency on the side street.

These are some examples of my poor-man’s modeling of computer networks. Is the model ultra precise?? I doubt. Does it help me have the feeling of what is going on. Absolutely. I quote again the book:

«I like to say that models are an abstraction of reality. From paper airplanes to supermodels, they are not real but an abstraction. One of the dangers to those of us deeply involved with modeling is believing that our models are real.[…] So please remember that models are not reality. They are not perfect, cannot be expected to be perfect, and are not designed to be perfect. It would be foolish to think what a model says will absolutely 100% occur.»

Finally, I do not claim that this model is by any means pioneer or novel. I am sure that most people in the network business would be using something like this, or even on some text books they present this type of model. But at least it has been a tool that has helped be noumerous times in the past, and I hope in the future. 😉


[1] I said skim for two reasons:

  1. I read the book on my free time (read structured procrastination), usually before bed time
  2. I don’t have much of a knowlegde of database systems (I know and understand some of the principles but that is about it), let alone Oracle which is a beast of it’s own. (so i’ve heard)

[2] «At the source of every error which is blamed on the computer, you will find at least two human errors, including the error of blaming it on the computer.»

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: