Friday, June 12, 2009

The Constraints of Hardware

In a previous post (in which I tried to argue that threading is a "how" and not a "what" when it comes to feature requests) a user made this comment:
That is, that I feel you are a bit too concerned about the fact that XP has to be possible to run on a 2001 year machine. This really halts the development although you could add options to turn this and that off.
I'd like to side-step around the details of cost-benefit analysis (e.g. do the sales from low-end systems pay for the development of a renderer with lower system requirements) but take a second to focus on three general issues:
  • Is there a cost to developing a scalable renderer?
  • How does the trend of hardware development affect hardware?
  • How do marketing forces affect both of the above?

Is there a cost to writing a renderer that can run on a wide range of hardware? Absolutely. Obviously we have to write more code to do that.

But there is an additional cost: there are some rendering engine design decisions that have to be made system-wide. It's not practical to provide different scenery files for different hardware (since we are limited by distribution on DVD). In some cases we have to pick a non-ideal data layout (for the highest end hardware) to support everyone.

But: before you raise up arms against your fellow X-Plane user who is holding you down with his GeForce 2 MX and P-III 800 mhz machine, bear in mind that the problem of picking a data format is a bit unavoidable. Even if we targeted the highest-end machines and told everyone else to jump in a lake, those decisions would appear to target rather quaint machines only a year into the version run. At some point we have to pick a line in the sand.

There is some light at the end of the tunnel when it comes to scalability: as computers become (on average) bigger and faster, we can start to defer at least a little bit of the work of scenery generation to while the sim is running. When we first designed the new sceney system (for X-Plane 8) most users did not have dual-core machines, so the doing work on the scenery was very expensive. We preprocessed as much as possible. This isn't as necessary any more.

So are high-end users limited by having one renderer that fits all sizes? Perhaps a little bit, but any design choice is only going to fit one hardware profile perfectly, and hardware is a moving target; today's shiny new toy is tomorrow's junk.

Hardware Growth

Every two years (to be very loose about things) the number of transistors we can pack on a chip doubles. This "transistor dividend" can be turned into more cores for a CPU, or more shading units (which are now really just cores) for a GPU.

And this gets to the heart of why I don't think we can say "forge the low-end" any time soon. Imagine that we support 6 years of hardware with X-Plane, and the best hardware is 8 times as powerful as the low-end hardware. Fast-forward two years - we drop two-years of hardware and two-years of new ATI and NV graphics cards come out. What is the result?

Well, the newest hardware is still 8x as powerful as the old hardware, but the difference in the polygon budget between the two has now doubled! In other words, the gap in absolute performance is doubling every two years, driving the two ends of our hardware spectrum farther apart. (Absolute performance is what Sergio and I have to worry about when we design a new feature. How many triangles can we use is an absolute measurement.)

If we say "okay forget it, only 3 years of supported hardware" that gets us out of jail for a little while, but eventually even the difference between the newest and slightly off-the-run hardware will be very large.

A gap in hardware capability is inevitable and it will only get worse!

Market Divergence

You may have noticed that the above paragraph makes a really gross assumption: that the lowest end hardware we support is the very best card on the market from a certain number of years ago. Of course this isn't true at all. The lowest end hardware we support was probably pretty lame even when it was first made. The GeForce FX 5200 was never, even for a microsecond, a good graphics card. (It was, however, quite cheap even when first released.)

So the gap we really have is between the oldest low-end and newest high-end hardware, which is really quite wide. Consider that in May 2007 the GeForce 8800 Ultra was capable of 576 GFLOPs. Two months later (July 2007) the GeForce 8300 GS was released, packing a whopping 22 GFLOPs. In other words, in one video card generation the gap between the best and worst new card NVidia was putting out was 26x! (I realize GFLOPs isn't a great metric for graphics card performance - really no one metric is adequate, but this example is to illustrate a point.)

Let's go back in time a few years. In February 2002, NVidia released the GeForce 4 Ti (high-end) and MX (low-end. The slowest MX could fill 1000 MT/s, while the fastest Ti could fill 2400 MT/s. That's a difference in fil rate of "only" 2.4x.

What's going on here? Commodification! Simply put, graphics cards have reached the point where a lot of people just don't care. Very few users need the full power of a GeForce 8800, so a lot of lower-end machines are sold with low-end technology - more than adequate for checking email and watching web videos. This creates a market for low-end parts and creates a wider "gap" for X-Plane. Dedicated returning X-Plane users might do the research and buy the fastest video card, but plenty of new users already have the computer, and it might have something unfortunately (like a Radeon X300 or Intel GMA950) already on the motherboard.

As X-Plane's hardware needs diverge from the needs of mainstream computer users, we can expect some but not all of our users to have the latest and greatest. We can also expect plenty of new users to have underpowered machines.

Let me go out on a limb (I am not a technologist or even a hardware guy, so this opinion isn't worth the bits it is printed on) and suggest this: we're going to see a commodification fall-off in the number of cores everyone has too. Everyone is going to have two cores because it is cheap to put a second core on the main CPU if it lets you get rid of a whole array of special-purpose hardware. Give me multi-core and maybe I can get away with software-driven rendering (who needs hardware acceleration), software-driven sound (goodbye DSP chips), maybe I can even find cheaper ways to build my I/O. But 16 cores? The average user doesn't need 16 cores to check email and run Windows 7.

So as transistors continue to shrink and it becomes possible to pack 8 or 16 cores on a die, I expect some people to have this and others not to. We'll end up in the same situation as the graphics chips.

Summing It Up

To sum it up, sure there may be some drag on X-Plane in supporting a wider range of hardware. But it's an inevitable requirement, because hardware shifts in capability even during a single version run, and as hardware becomes faster, the gap between -end and cheap systems gets wider.


Dirk Hohndel said...

Ahh - I love math problems.

Let's start with the easy part. If you assume Moore's law continues to hold, then the number of transistor's we can pack on a chip indeed will double every 18-24 months. So let's boldly over-simplify and say that performance / capability similarly doubles every couple of years.

That does NOT mean that your gap over a fixed number of years really widens. Yes, the difference as an ABSOLUTE number (whatever you measure, triangles per second, GFLOPS, I don't care) goes up - but that's meaningless. It's still 8 times between old and new. And as much as you care about absolute number of triangles for example, 8 times is 8 times is 8 times.

But the other observation that you made is much more interesting, I think. The fact that while the ratio of improvement on the high end stays about the same, the ratio of improvement on the low end doesn't keep track - instead the low end chips get smaller and smaller (in absolute size) and size is directly proportional to price in the chip business - so things get cheaper!

And that means that while in 1993 the original Pentium was introduced in 60 and 66MHz (that's 10% spread) and the high end (P66) and the low end (486sx25) were only about a factor of 3 apart, the performance difference between an Atom Z500 and a Core i7 975 Extreme Edition is quite a bit wider. One in-order core, no hyper threading, 512KB cache at 800MHz vs 4 out-of-order cores with hyper threading, 9MB cache at 3.33GHz. Oh, and the Beckton chips (Xeon EX, I guess) are about to be released which go to 8 cores and even more cache...

So yes, the range has widened and it will continue to widen. At some point you, the developers, will have to draw a line and have to set realistic minimum requirements. Anyone who thinks that a Netbook is the right platform for X-Plane is simply confused!

Yes, for economic reason you want to reach a large target market - but you don't want to sacrifice the capabilities on the high end in return - because those are the people who continue to drive what's possible, who will continue to pay for new versions of the software (and oh, most likely your high end, high value customers will be focused on the highest end hardware as well).

krz said...

u know you can talk as much as u want about supporting 10 year old systems...what i know is that xplane does not look like a modern "game". since most people out there are eyecandy whores im sure you would improve sales a lot more by supporting cutting edge gpu/cpu features compared to the few guys that cant buy a more modern grafikcard. if you take a look to the latest steam hardware survey you can see that the majority of people are on a nv8800 level right now. its a shame that the FS guys are out of bussiness...they at least cared about pushing limits (with FSX a little bit too much though)

Benjamin Supnik said...

Hi Dirk,

Two comments. First on the part we agree about (the low end falling behind): it's not the netbooks that concern me. For NetBooks we need something like X-Plane Lite.

My concern is when we get new Dell customers who have bought a brand new machine and have a Radeon X300. (This was happening a lot a year or two ago.)

The problem is that at the very, very low end of the tech curve, the companies stop cutting fat and start cutting muscle. To save that last $20 in OEM hardware cost, you lose all of your dedicated VRAM. Ouch!

If we told the user for $20 you could get 4x performance, would they take it? Heck yes! But...often the computers that have these constraints have problems that aren't easily swapped out like a graphics card (e.g. the graphics are mobo, not in a real PCIe slot). Call it the "stealth netbook-ization" of desktop hardware.

Back in 2000 or 2001 when I bought a Dell I got, for not much more than $500: the second fastest graphics slot and a decent P-IV (for the time). The graphics card was a bit on the low-end, but the gap wasn't as wide back then between gamer and commodity GPUs. All in all the machine actually flew X-Plane at the time decently, and a GPU replacement was an option.

I don't think this level of performance still exists in lower-budget hardware.

Now absolute vs. relative performance...that's just the problem: X-Plane is art asset and data driven in its graphics, so a lot of the times we don't have wide-range relative scalability. And that means that we are stuck in an "absolute budget" kind of world.

Recognizing that triangle count and any other single metric is a gross simplification of GPU or system performance...consider that we have two different "flavors" of feature:

- Forests. We could throw even more hardware at forests and probably make them loo even better. Since real forests are so detailed, and since forests are generated from rough data by the sim, we can have scalability. For forests, the relative performance is really what matters...we can always set "tree hugger" to eat 8x the resources of "sparse".

- Airplanes. Problem is: the airplane meshes are premade by the author. Even if we had a way to make an airplane use 8x the performance in certain modes (we do not really have this right now, unless you consider the virtual cockpit an optional feature) we'd still have to go back and remake the art asset to keep up with hardware.

When our lead artist works on a new airplane, he asks "what's my polygon budget". This number is absolute - it's just a number.

In fact, neither of these problems are great examples, because the numbers involved in the GPU are so huge. In truth the problem with the GPU is that the performance changes so much that the very question of _how_ we render it's not just a question of "is there a way to make the rendering of feature X 8x as expensive, and then keep doing that over and over?" It's almost a question of: do I render feature X using technique A or B which are wholly different.

The quantitative gap in hardware leads to a qualitative gap, which I don't think can be described as a multiplier of represents a fixed engineering cost.

Benjamin Supnik said...


1. X-Plane is not a game - it is a highly complex numeric simulation! ;-)

2. The flight simulator to game comparison is IMO a dubious one...see also the tons of threads where FSX users complained (idiotically) that FSX doesn't look like CRYSIS. Take a modern shooter and fly up to 40,000 feet and it's really not going to look as good as it does up close.

I'm not saying that X-Plane's graphic limits are only due to having to support a truly flexible viewpoint - but I am saying that that is enough of a difference in engine design to make it an Apples to Oranges comparison.

(The fact that X-Plane is a franchise, now on version 9, vs. games that might only have one version is another incomparable difference.)

"since most people out there are eyecandy whores im sure you would improve sales a lot more by supporting cutting edge gpu/cpu features compared to the few guys that cant buy a more modern grafikcard."

I'm not sure we can meaningfully discuss this. We would have to compare a feature we did code that wasn't eye candy vs. a feature we intentionally deferred that would have been eye candy, and then connect sales directly to those particular features (not easy to do). The cost-benefit analysis of features is rarely so clean-cut.

Daveduck said...

Oy. So many words to say: "We're a business and we want to sell as many copies of this baby as possible. And since most people have crap video cards, here we are."

"X-Plane Lite" is a great idea. Austin obviously has no problem calling XP a game* and selling it to iPhone users. XP-Lite would retain (even expand) one market, while "X-Plane Pro" would satisfy the users who have been commenting on your last few posts.

And there's no reason that the old ruse about being a small company should stop you. Simply take existing XP and remove any user-adjustable settings that would cripple performance on a low-end machine, and don't allow the addition of scenery packages or add-on aircraft. Pretend you're creating version for a giant iPhone.

Voila. Instant new product and market. And then you can get back to doing what you presumably like the most--making XP qualitatively better.

*Yes, I did catch the "complex numeric simulation" jest.

kaminari said...

About multithreading, parallelisation and the interest of developing a scalable renderer that can work on state of the art architecture as well as hardware of yesteryear, I suggest to read the Criterion interview by Eurogamer. Significant excerpt:


The Criterion tech team are quick to dismiss the notion that the current generation, or indeed any generation of hardware, has been pushed to its absolute limits.

"It's nothing new, you hear it all the time... we've maxed out, we're the best," says Fry dismissively. "That's proof that you're not the best," Parr chimes in. "It means you're out of ideas."

ritchan said...

Hey, I just found X-Plane after a whole day of Wikipedia browsing, and it seems like a cool program to run. Trouble is, I have a Core Duo 1.6GHz with a GMA950, and there's no getting around that. I also have a Athlon XP 2500+ with a Radeon 9500 Pro/Geforce 4 Ti 4200 about half the circumference of the Earth away from my present location. Assuming I have enough RAM (2 and 1.5GB respectively) what can I expect from these machines of mine? 640x480 everything turned off on the GMA950?

Also, have you considered porting your program to IRIX? SGI's Onyx2/3xxx systems seem like just the type of hardware X-Plane would run on. Plus it's a great excuse to own an SGI.

Benjamin Supnik said...

Richtan: grab the demo! Your system is below requirements but you might get it to limp if you set the rendering settings carefully. You'll have to run 1024x768 - that's the minimum. But...the performance of the demo and the full product are about the same, ignoring variation due to the scenery complexity of a local region.

Email info at x-plane dot com for more info!