Posts tagged ‘Ethernet’

2022/12/21

Best Buy queueing theory

Single-queue multiple-server is often a pretty optimal way to set up a system; there’s a single potentially large / unending bunch of jobs / customers waiting, and some comparatively small number of servers / staff to take care of them. When a server is free, some job is chosen and the server starts running / serving that job.

When the chosen job / customer is always the one that’s been waiting longest, that’s a FIFO (first-in first-out) queue, known to consumers in the Eastern US as a “line”. It’s easy to implement, sometimes pretty optimal under certain assumptions, and has a sort of “fair” feeling about it.

On the other hand, I have the feeling that when the customer set is highly bimodal, the whole setup might not be entirely optimal in some cases.

For instance, if some of your customers are just buying a 1Gb Ethernet switch (see below) and some Reese’s Peanut Butter Cups using a credit card, and it will take 45-60 seconds, and another set of customers are picking up something that’s being held for them somewhere in the back, and they aren’t quite sure what it is, and want the staff person to explain how to use it, and then want to purchase it using Latvian stock market futures that are actually in their brother-in-law’s name, and that will take 20-90 minutes, then some of those first set of customers are going to end up waiting (in some sense) an unnecessarily long time, waiting for education to complete or a brother-in-law’s marriage certificate to be found in an overcoat pocket.

One could assign a particular server to small jobs, or to small jobs if there are any such waiting, or always let a short job go before a long job if there are any waiting, or unless there’s a large job that’s been waiting more than a certain time, or…

All of these can be implemented in software systems, but most of them are too complicated or unfair-feeling for a Best Buy full of strangers. Allocating one server / staff member / desk to “customer service” (anything involving training, or stock market futures, for instance) and the rest to ordinary purchases is about as complex as it’s practical to implement. They weren’t doing even that at my Best Buy this morning, but then there were only three staff people on registers, and taking one-third of them away from the short-transaction customers might have been bad. Or just no one wanted to bother figuring it out.

Speaking of 1Gb Ethernet switches, I mean, WTF? I know I’m old, but I still think of these as costing thousands (tens of thousands?) of USD, requiring careful tuning, and taking up a significant part of a room (okay, a small room, or at least a rack slot). Now granted that was maybe for one with at least 24 ports and a management interface, but I mean! I can buy one for the price of two large pizzas, and it fits in the palm of my hand? Really? Where are the flying cars then??

A picture of a Netgear 1Gb Ethernet Switch.

That is a picture of a 1Gb Ethernet Switch. Possibly the one that I bought, I forget exactly. Might have been Linksys. Or something.

2013/08/07

Mach’s Principle

I wrote my 750 words again! (Answers to even-numbered exercises are in the back of the book.)

The blinking light on the side of your laptop computer actually represents the average heartbeat of every human on Earth who is within one mile of a monitoring node.

Which is approximately 45% of the population of the planet.

Most of the time it is rock-steady, as any excitement in one heart, or in one group of hearts, is exactly balanced through the vast mushy laws of large numbers, by the ebbing of excitement in the same number of hearts elsewhere.

And vice-versa.

But on some days, if you are watching the blinking light as I often do, you will notice it slowly subtly down, or speeding suddenly up, as somewhere there is a large anomaly, a sudden gasping, a thrill, an excitement, in the entire population of a small city in Rawanda, or every Girl Scout in the USA; or somewhere else an entire continent goes to bed, and on the other side of the world, due to an international holiday, their usual counterbalancers are sleeping in.

Because, vast and sprawling and numerous though we are, humanity is still finite. There are only so many left-handed people, only so many people about to open a soda can, only so many Lutherans. The number of religious sects is large, but smaller than the number of grains of sand on the beach, which is smaller than the number of atoms in one grain of sand, which is smaller than the number of possible Sudoku grids, which is itself still finite, and so smaller than nearly all of the positive integers.

Looking down Platform 29, across all those people waiting patiently, or impatiently, for the 6:45 to arrive, and thinking that each of them has a history, and a set of beliefs, a complicated web of preferences and fears, we are already far beyond the vastness that any one of us can comprehend (one, two, three, seven, many), but if all of those people were to vanish suddenly, spirited off by aliens or vaporized by more mundane means, the size of the world as a whole would be reduced by only an imperceptible fraction.

So your laptop’s light blinks, almost always, at the same steady pace, as all of our hearts (or the hearts of all of us within one mile of a monitoring node), average out into a signal with just one bit of content (“still the same, still the same, still the same”); all the complexity nicely smoothing out, a hill here balanced by a valley there, a hundred orgasms in one set of college dorms nicely making up for a hundred hearts drifting off to sleep in another set one time zone away.

Take a breath. Feel yourself breathing, and what it feels like to breathe. Feel yourself thinking, and what it feels like to think. If you are worried, feel what it feels like to worry. Feel your own heartbeat slowing. Look at the reflection of the blinking light on the Ethernet connector, or the shiny tabletop, or your fingernail. As your heart slows down, imagine that you can see the light slowing down, by the smallest imaginable amount.

Imagine that you can feel, somewhere deep in your gut or your inner ear, the Earth turning under you, and the stars whirling around.

It the Earth turning, or the stars? We know, these days, that motion in a straight line is relative; that jogger is the one who is moving, and I on the park bench here with my peanuts am the one sitting still, only because the math is simpler that way; but either one might be true. It’s not so simple for rotation, though, for things spinning around. Ernst Mach thought, at least if we listen to Einstein (and we might as well, since we listened to him on that whole “motion in a straight line” thing), that the universe has a large-scale structure (large as large, larger than anything), that determines what counts as spinning and what doesn’t; but I hear down at the corner pub that this is not true in all solutions to the field equations.

Feel your breath, and what it is like to breathe. Feel your heart beating, and what it is like to have a heart, beating. Watch the blinking light, and feel your heart beating with all of the other hearts (the ones within a mile of a monitoring node). Feel the Earth turning under you, and the stars whirling around you (with or without closed timelike curves). Be still.