Horsepower Thoughts

I’m in the midst of reading (a thus-far very good) review of the beta release of PHP5.

Hmm…a review of a preview….

One thing caught my attention: PHP5 comes with a built-in database, a lite (less-filling, tastes great) SQL database aptly named SQLite. While the author really didn’t come up with any good reason for PHP including this as part of the build, he did say it was not meant as a replacement for mySQL or Postgres.

OK.

But then he goes on and says it might be worth using for some tasks, such as handling sessions or what have you.

OK again, even though I don’t get running two databases against one app.

But his reasoning for this is that SQLite is fast, about twice as fast as mySQL (no slacker in the speed department).

OK – what’s going on here?

I thought we were pretty much past the point of the limitations of software speed because the hardware has gotten so damn fast.

While the Amazons and Googles of the world will still be buying faster and multi-processored (is that a word?) boxes, the rest of us really don’t have a need for speed. Either on the sites we develop or our home machines.

Sure, faster is always better, but it has gotten to the point were there are diminishing returns.

The leap from a 486 to a Pentium was huge, and the Pentium Pro (essentially the basis for P2s, without the MMX or whatever) was a big jump in stability and robustness. (Hell, my main Linux box here is running on an approximately 6-year old Pentium Pro 200Mhz machine. It was my Windoze box for three years.)

But how much of a jump – really – is there from P3 to P4? Sure, the numbers are going up, as are the buses (way underappreciated by buyers, who look at Mhz only), but how much faster – especially for the average user – is a 3.0Ghz box than a 2.0Ghz box?

Sure, it’s faster, but noticably?

We are really past that. I’m working on a 1Ghz P3 right now (which was a screamer after my 200Mhz Pentium Pro), and it’s still a fast box.

Sure, it would be nice if Photoshop started up faster, but that’s more of an OS issue (I have the same program on a Win98 box, half as fast, one-quarter the RAM and it’s faster there).

Right now, I’m running the following stuff – as services, not talking about programs I’m using (IE, command shell…):

  • MS SQL Server 7
  • mySQL
  • Netscrape FastTrack server (three instances of it)
  • IIS (v5)
  • Cold Fusion Server (v5, with the Graphing server, as well)
  • SMTP

That’s just the stuff I remember. But that’s stuff that runs in the background all the time, not even counting the three versions of IE, telnet, FTP, Outlook, Netscrape and other crap that I have open. And not to mention Norton (which is scanning as I type; then you can notice a little hang in programs opening, because Norton is close to pegging the CPU).

And nothing really hangs, all is pretty snappy.

And this is – for this day and age – a pretty low-end machine, and I run it hard.

So what’s this “oh goodie, it’s faster than mySQL” stuff? So a 100 row select on three joins will take 1/2 of a millisecond instead of a full millisecond? Oh goodie..

To be fair, people using PHP are running sites, and that is really where you want to shave the milliseconds, so there is some method to this madness (of a way of thinking…).

But I thought we were getting beyond this need for speed with quad-processor, gigs of memory boxes. Again, faster is always better, but – again – is the faster really noticable?

And – in this case (SQLite) – is the speed improvement enough do decide to split your app so parts (say, sessions) run against one database, other parts against another DB?

Ack! I say.