Home > Articles

  • Print
  • + Share This
This chapter is from the book

Throughput and Price/Performance

In measuring throughput, we have ignored the cost of the systems we are analyzing. If a system costing $100 can handle 1,000 transactions per second and a system costing $500,000 can handle 1,200 transactions per second, the latter obviously has better throughput—but it's gained at a much higher cost. The idea of measuring throughput and its relationship to price is something that has been popularized by the Transaction Processing Council (TPC), which has created database benchmarks, better known as the TPC-style benchmarks.

There are three TPC benchmarks: TPC-A, TPC-B, and TPC-C. The most recently developed (as of this writing) is the TPC-C. It measures database transaction processing in terms of how efficiently it supports a mythical ordering system. Specifically, it measures how many "new order" transactions can be handled while the system is busy handling four other types of order-related transactions (payment, status, etc.). While the TPC specification is meant to measure database throughput, you can use the same principle with your systems. After all, Web application transactions are at their core a set of database transactions.

Although it is unlikely that you will benchmark your system against another, you can measure how well your system is improving or lagging over its own evolution. For example, if release 1 of your application requires $100,000 worth of hardware and software and nets 10,000 transaction per second, you can calculate a price/performance index by dividing the price by the performance:

100,000/10,000 = $10 per transaction. 

This doesn't mean that it costs $10 to execute a transaction on your system. It is simply a measure of throughput as it relates to the overall cost of the system. Suppose that a year later, release 2 of your application requires $150,000 worth of hardware and handles 40,000 transactions per second. The release 2 price/performance index would be:

150,000/40,000 = $3.75 per transaction. 

Obviously, release 2 is more efficient than release 1 by evidence of its lower price/ performance figure.

My interest in price/performance in this section is a reminder of the more general bias throughout this book: Favor architectural strategies over resources when developing your application. Once the application is deployed, you can always buy more resources to meet demand. On the other hand, rewriting code, changing designs, or re-architecting your application after deployment comes at a much higher cost. The best solution is obviously good design at the outset for scalability and performance. Not only does this eliminate the need for massive design changes after deployment, but it also typically leads to more cost-efficient resource acquisitions. CPUs, memory, disk, and other resources are purchased less frequently for applications that are inherently fast and scalable. In short, well-designed systems adapt and evolve much better than poorly designed ones do.

  • + Share This
  • 🔖 Save To Your Account