spacer.png, 0 kB
spacer.png, 0 kB
Home arrow Technology Corner arrow Going slower to go faster


Going slower to go faster E-mail
Contributed by Alan Lewis   
It's a little known phenomena, outside scientific circles (and once upon a time, informed science fiction writers), that a spaceship in orbit around a planet slows down in order to go "faster". Faster, in that as it slows, it's orbital position (distance from the planet's surface) decreases, and it completes an entire revolution of said planet in less time.

"WTF? Where are you going with this one, Alan?" Bear with me!

Back in the early 90's, bleeding edge desktop PCs were based on the 386DX processor, capable of an incredible 10-15 MIPS (million instructions per second, or meaningless indicator of speed). Plebes, like myself, had to make do with PCs based on the Intel 80286 processor. Those of you around in the day will remember the difference in speed, even running DOS software, between the two processors. And forget about running Windows 3 - it could be done, but was s-l-o-w. In my role, I used DrawPerfect, a vector drawing package complimenting the then leading word processor, WordPerfect. Both were DOS based, hence character mode only for WordPerfect, and both did exactly what it said on the can, perfectly. Except DrawPerfect was slow, on the 286, especially when zooming into an area. On the 386, it flew, even on a 386SX based PC (a cut down, cost-reduced version of the 386DX). It was slow as it used a proprietary graphical interface, not a DOS "graphical" interface, and not Windows, but a custom environment graphical environment. Even then, faster graphics cards - or rather, card specific drivers - helped, but software was really CPU bound.


When the 486DX came along, software hummed. Literally. It chain sawed through everything, and just got faster with time; 33MHz, 50MHz, 66Mhz, even 100MHz Yes, that's MHz as in MEGAHERTZ, not GHz as in GIGAHERTZ... Then along came Windows95, and a 486, well, wasn't quite enough. It was like running DrawPerfect on the 286. It could be done, but it was slow. Heck, even the Pentiums of the time struggled, especially with less than 16MB of RAM (and yes, that is considerably less memory than you probably have on your oldest graphics card!)

In the time frame 1995-1998, users faced a difficult choice between DOS/Windows 3.x (which needed DOS to run), and Windows95 on their hard disk. A lot of software would run under Windows95, but needed tweaks and arcane configuration files in order to do so. And a lot more software refused to work full stop. But on the leading 486/Pentium hardware, DOS software flew pretty well.

15 years later, no one uses MIPS as an indicator of speed, it truly has become meaningless. And so, realistically, have processor speed bumps. Ramps are on the level of 100MHz increments, and lead to system performance increases measured in 3% or less. The average PC has 512MB RAM at least, more likely 1GB. Graphics cards have upwards of 128MB even in the entry-level models. SMP - Symmetric Multi-Processing, or Dual Processor - has moved from the realm of the dedicated workstation (and seriously dedicated and well-informed home user) into the mainstream, mainly due to AMD's Athlon64 X2 and Intel's Core Duo. Frankly, PC's have become more powerful than anyone needs.

So where has the speed gone?

Why, in terms of general productivity, are our PC's still working at the same speed we were 15 years ago, and in some respects, slower? Let’s remove one constant - the human user - and specific tasks such as graphical/video editing and rendering. The tasks that 99% of us do such word processing and email, we do at the same speed we did years ago. And more worryingly, the OS seems to run at the same speed.

Word is no faster than Word 2 was 10 years ago, or Word Perfect in 1991. Photoshop labours, even on a dual 3GHz Xeon with 1 gigabyte of RAM. And as for Explorer over an uncontended 2mb link, well, at times it seems slower than Netscape was back in the mid-90's.

Where has the speed gone?

So thinking back to the spaceship in orbit, I decided to try throttling back. I build a couple of rigs from old, spare parts; a dual Pentium Pro, and a Pentium II 400. And I put DOS on them. And some old DOS application software. And Windows.

Ohmigoditsfast

DOS boots quicker than the BIOS takes to fire up. Applications load quicker than you can say Tommy Cooper, let alone "just like that". DrawPerfect is almost instantaneous. Tell a lie, it works quicker than I can use it. Complex drawings render and zoom in a flash, and printing highly complex shaded drawings, happen as soon as I press "print". And games. Well, Rise Of The Triads, Doom, and X-Wing are fast. I mean, really fast. Almost insanely unplayably fast.

When I first used a dual processor system, I was pleasantly surprised at how responsive Windows NT was (windows 9x only uses one processor, regardless of how many CPUs or cores are present). Silky smooth best describes it. And using more than two programs at a time did not impact the system; my multi-tasking NT experience had gone from sluggishness to smoooooth. Using 'obsolete' software on somewhat less obsolete hardware was even more shockingly pleasant.

For a while, I found myself using technology from the last decade in preference to my main PC. Sure, there were some drawbacks. Lack of an inbuilt IP stack meant I had to ferret about for someway to connect to the Internet, and even the network printer. Fortunately, good old floppy net comes to the rescue with Chameleon for Windows 3.1. Before Windows, most DOS software shipped with its own printer drivers; yep, you had a Deskjet 500, and used Word Perfect, DrawPerfect, Supercalc, Autosketch (who remembers that!) and so on, you needed a separate printer driver within each application - there was no unified printer architecture. Fortunately, the HP LaserJet 2100 I use can emulate the older series, such as the HPLJ III and IV, which were common, "high-end" laser printers back then. Ditto graphics cards; any application that had a graphical mode used specific card drivers, or the VESA standard model. So it was back to VESA modes for me. But the card chipsets themselves are powerful enough without specific drivers, and hunting about on the 'net found a few workarounds the odd issue.

Internet work was a problem. Long ago, the web standard was that pages should support graphical browsers, and non-graphical browsers such as Lynx. A non-graphical browser?!!! Yep, back in the days when most internet users were on dial-up, text browsers were common. Although many pages fail to load, a good many sites are still usable with a text browser. However, I wouldn't recommend it. And yes, I did try Archie and Gopher tools, but these do require server support for indexing, and with the exception of some, mainly university, sites, this was unsuccessful.

But in terms of productivity, I was getting more done on my old hardware in less time, than doing the equivalent on my modern PC. I was going slower to go faster.

When I used to play games, and frequent gaming sites, I'd read AMD vs Intel discussions, ATI vs NVidia, my-PC-is-faster-than-yours. Often, if someone was being particularly obnoxious, I'd bet my rig against his, that my machine was faster; the test would be to cold boot, type a letter, and print. I'd bet that I would complete the task first, possibly before his had finished POSTing let alone loaded Windows. I'd omit that I was using an 20+ year old 8-bit micro, a Commodore 64 with just 64KB RAM, and an Easyscript cartridge; the word processor was on as soon as a switched on. Sadly, no takers. Few really believed their machine was *the* fastest around, or did not have sufficient faith to gamble.

I'm back at that stage. My two old rigs are actually in operation, running an OS and a word processor, before my dual Xeon rig has completed POSTing. I'm generally well stuck into my day's work before XP has finished loading. I even slipstreamed the XP startup, and it makes little difference.

Intrigued, I started thinking about why modern hardware runs so slow. Ok, it’s not really the hardware; for a complete giggle I stuck an IDE drive into my Xeon and tried to install DOS. It took some trickery, and I ended up having to use DR-DOS as MS-DOS crashed on the Xeon CPU. ut Christ did things fly. It is, simply put, too quick. But why does Windows, and even Linux, run so slowly? Linux was a complete surprise. Ok, I know the days of throwing it on an old 486 (or even Pentium) and doing everything on it are long gone, but I was surprised at how slow the modern distro I used is. Slow as in noticeable pauses when loading utilities and applications. And slow, in cases, in use.

Why?

Well, applications and operating systems seem to be too big. And they are only getting bigger. In the case of Microsoft, it needs to bring out a new operating system every three years. Not because the world needs one, but because its business model needs one; revenue, and hence profit. It needs the revenue stream. Ditto the application developers, such as Adobe. Once everyone has an OS or a Photoshop, where does the money come in from...?

Of course, they can't say "we need money", so we are marketed into buying the new software. Its newer, so must be better, right? Maybe not. From an OS view, ignoring the new security problems, the first issue is that its grown larger and more complex, and needs faster hardware just to run at the same "speed" as the old operating system. Why did *we* upgrade? Why spend all that money to achieve the same?

And it’s not as if anything groundbreaking new is offered. The PC was designed as a business tool, and has gained acceptance in the home. Look at the common tasks; word processing, spreadsheets, application front end (all those business apps such as SAP, Oracle, etc, where the processing is done on the server). In the home, internet access, email, media playback, and games. With the exception of the later, all those tasks can be conducted on a 7 year old Pentium III 550 MHz with 256mb RAM running Windows 98, or Windows 2000. Heck, leaving films aside one can do all that on a Pentium II 400MHz, and even film playback is possible, especially with hardware assist such as an mpg card or a 5 year old graphics card. So where has all the horsepower gone? Games will eat every resource, and if you believe in frames-per-second benchmarks still want more. But word processing? Web browsing? Email? They don't eat CPU cycles and memory.

It’s the operating system.

Many years ago I used to use a Commodore Amiga. A wonderful machine. I read Guy Kewney's review in the August 1985 edition of PCW magazine, and fell in love. It was, for its time, simply amazing. An incredible 4096 colours - in an age when the Mac was monochrome and the PC, well, it didn't have colour. 4 channel stereo sound - when the PC and Mac could only "beep". A graphical interface - when the Mac was horrendously cramped by its 'one selection' limitation, and the PC had a character driven screen (I'll ignore Windows 1.0, Top View, and GEM, as they were not mainstream, nor ever became so). And a true pre-emptive multi-tasking operating system that ran in just 256KB of RAM and fitted on a floppy disk. Read that again, two hundred and fifty-six kilobytes. The average Amiga shipped with a half megabyte of memory, which was enough to do most tasks. Software not only shipped on floppy disk, (800KB floppy disks) it also *ran* from floppy disk. And it ran quite fast. Sure, to really begin to do serious work you needed two disk drives, or better still a hard disk, but such as system offered a fast, productive environment for office work, entertainment, and games. Now somewhere back in the mists of time, Bill Gates famously said something along the lines of "640KB is more than enough for anyone". He also said "true multitasking is impossible in less than 4mb of RAM". He was wrong on both counts, but - and here I surprise myself - also very, very right.

As the Amiga proved, you could achieve true multi-tasking in far less than 4MB, 256KB in fact. But on the PC, things were very different. On the PC, there is one chip - the CPU - doing all the work. The CPU plays sound, handles hard disk traffic, decodes and displays films, and so on. It even transfers network traffic too and from the network card and decodes the information up through the IP stack (ok, in recent years graphics and sound cards have relieved the CPU burden, and some Intel network cards are starting to do the same with IP traffic). The Amiga had a custom chipset, with one chip handling graphics, one handling sound, one handling memory and hard disk transfers, and the CPU sat there controlling the overview of everything. That is grossly simplified, but serves the point. The PC of the 80's and 90's just wasn't up to the task. The legacy of the 8bit 8088 and 16bit 8086 architecture and the 1mb memory barrier meant that task switching and memory bank switching really precluded multitasking. Without a CPU that could stay in Supervisor (or Exec) mode, whenever a different program wanted to be running, pre-emptive multitasking was nigh-on impossible. Multi-tasking in a DOS environment was meaningless; DOS itself precluded it, as well as imposing a 1mb memory limit, of which only 640KB was directly accessible, and only in 64KB chunks. But Windows had to run on DOS to start, before switching out. And even then, there were still memory limitations. To fit Windows inside the RAM footprint, and run applications, the OS needed to swap memory in and out of the addressable range. To explain that, imagine a row of 10 boxes. You can only ever see the contents of the first 4. To see what is in the next 2, you swap boxes 3 and 4 with 5 and 6. Then do the same with 7 and 8. It takes time. This is what Bill Gates meant; multi-tasking *on the PC* is impossible in less than 4mb of memory. 4mb was needed to hold the operating system, and at least two applications.

He was also right that 640KB is enough for anyone. Simply put, if Word Perfect in 1991, on a 1mb PC (of which only 640KB was available for use), did everything we needed to do, then why do we need more memory? In 640Kb we wrote documents, ran spreadsheets and databases, organisers, and edited pictures, all sorts.

Agreed, time moves on. Hi-res full colour photographs simply need more memory, and more processing power to play with. But we were doing that on our PIII-550's and 256MB RAM. And what’s more, we were doing it almost as fast as we are now. Animation, scene-generation, video editing all needs horsepower, as time really is money in those areas, even at the home level. But for day-to-day tasks, why am I less productive using my dual 3GHz Xeon box than I am when using a dual Pentium Pro, or even the single PII? For most tasks, 640KB really could be enough.


It would be easy to blame Microsoft, (which provides the operating system probably 95% of us use). Windows 9x ad to provide backwards compatibility, insofar as possible, with the old 16bit Windows 3.x and 8bit DOS software. But Windows 2000 and XP seem to have baggage, too. And, it seems, they provide "legacy" compatibility with MSOffice apps from yesteryear; a number of "kludges" in the source code have been revealed, along the lines of "this is a kludge but needs to be here to ensure Excel still works". And this is in the OS...

And it’s going to get worse. Vista's hardware requirements are up in the air. Frankly, no one knows what the shipping version will require in the way of hardware, just to enable you to turn the hardware on and stare at the screen. At the moment you need more than a gigabyte of drive space just to install the OS, and a gigabyte of memory. It might seem little, in the days of 700GB hard disks, but when you think about it, that’s unreal. What does an OS do - it is a framework that provides the environment for applications to execute in, and an interface to interact with those applications. And that’s it. Compare that to the Amiga, which could do it in 256KB and fit on a floppy. In other words, about 1/4000th of the requirement. And a modern PC is not 4000x better.


But although MS must take a heap of blame, I'm not sure it is all their fault. Compilers, since the days of the old Commodore PET in 1979, have generated program code far bigger than the source code and libraries combined. And the resultant output has only grown bigger as time passes.


Libraries take some of the strain out of programming. They tend to deal with common tasks, such as writing to the screen, printing, etc, or creating user interfaces such as the standard Windows File | Edit | View | menu (look at any two applications on your machine), handle window creation, and so forth, which all programs do. They save a programmer re-inventing the wheel. But these libraries are all things to everyone. They cover every possible scenario that library might face. And there is no guarantee that the library itself has been optimised and had redundant code, or even comments and debugging information, removed from it. However big that library is, add it to the size of the eventual program, as it will be included. Repeat for every library used in the software program.


Programmers seem to include libraries willy-nilly. I've seen source code that includes I/O libraries with no obvious requirement, and when the reference is removed, the dependency check does not complain. The programmer had been taught that when writing "this" code one "must" include "this" library. It would seem that universities teach the management of developing, the language of programming, but not the art of programming.


And Windows programmers use libraries. So the final code is very, very large.

Hmm, I must cast some blame at MS though. MS entwined Explorer (the web browser) and Media Player (erm, obvious!) very deep into Windows. There is a school of thought that this was to evade the anti-trust litigation. Certainly, in the original Win95 they were not so embedded (Gates even dismissed the Internet at one point) and could easily be removed. Now a web browser and a media player are not part of the operating system. They do not handle the interface to software, the user interface, nor responsible for handling memory, multi-tasking, nor the reading and writing of disk and directory information. Hence why I agree with the above school of thought. But they are now deeply embedded. And they use libraries, too, which worsens the situation. And there is more. Ever tried to remove Messenger? Oh, look, apparently Outlook, a mail client, depends on it. And it isn't the only program. Hang on, why is my mail client dependant on an instant messenger application. Methinks it is to corner the IM market... but anyway, it’s yet another bit of software on the drive one doesn't need, nor do I need it loaded in memory. Neither do I need all the codecs that MPlayer feels the need to install in case I ever play a music or video file. Nor the DRM certificates.


And of course, the larger and more complex something becomes, the greater the possibility of errors. And in Windows, there are many. They are called security vulnerabilities. And it's riddled with them.


There is a solution, and it is along the same cry as making games programmers start off on a Commodore 64 - with just 64KB of memory, games relied less on graphics and had a hell of a lot of game play. Remove all compatibility restrictions on the programmers. Stick them in front of a few Amigas, to get used to the idea that a true pre-emptive multitasking OS needs very little memory. Give them bare-bones compilers, and enforce a from-scratch code-writing policy. Start with common framework items, such as the User Interface, and other reusable items such as dialogue windows, disk I/O, graphics, sound, and make one team and only one team responsible for this. Enforce product management and quality control, comment removal, documentation, code testing, and vigorously reject code that is not up to par. Then bring in the team to write the OS. Enforce the ideas of object reuse, openness, scalability, modularity, security, and keep the product management focus.


It might take time, but we'd have a leaner, more efficient, and more secure operating system. And then our software really would fly, and we would see real, tangible, bum-pushed-back-in-the-seat speed increases when we did upgrade our hardware.


In the interim (I'm not holding my breath), the only solution is the following:


Partition your drive into C: and D:
Install your operating system, with only the components you know you need.
Add the various service packs and patches
Add any third party widgets such as codec packs.
GHOST your hard disk
save all data to the D: drive
Every 3 months or so, when Windows starts slowing down, reinstall from the the Ghost backup.


If you don't have Ghost or similar, its back to the old win9x maintenance mode - reinstall from scratch every few months.


Until then, I'm keeping my Xeon system for video work, and doing [almost] everything else on hardware from the last millenia. Its a helluva lot more productive than running the latest software on the latest hardware.

Only registered users can write comments.
Please login or register.

Comments

spacer.png, 0 kB
spacer.png, 0 kB
spacer.png, 0 kB