4.1.4 What Affects Processor Performance?
A computer cannot be judged by a single specification. Processor design, clock speed, the number of cores, cache memory and bus width all influence performance. Their effect also depends on the program being run and on the speed of the surrounding hardware.
By the end of this section, you should be able to:
- Explain why performance must be considered as a combination of factors.
- Describe how processor type and core count can affect different workloads.
- Relate clock frequency to the duration of one clock cycle.
- Explain how cache reduces delays caused by slower main memory.
- Distinguish the performance implications of data-bus and address-bus width.
- Compare processor specifications and justify which design better suits a scenario.
Performance Depends on the Workload
Processor performance describes how effectively a processor completes useful work. This is not identical to clock speed. Two processors operating at the same frequency may complete different amounts of work because their internal designs are different.
A processor that performs well in a single sequential task may not be the best choice for video rendering, scientific simulation or running many applications at once. Performance comparisons should therefore connect the hardware specification to the workload.
Processor Type and Internal Design
Different processor families use different internal architectures. Their designs can vary in the instructions they support, the amount of work completed during each clock cycle, cache arrangement, power use and the kinds of tasks for which they are optimised.
This means that clock speed should normally be compared cautiously across different processor types. A newer design may complete more useful work per cycle than an older design even when its clock frequency is lower.
| Design emphasis | Possible strength | Possible compromise |
|---|---|---|
| High single-core performance | Responsive performance for tasks that use one main instruction stream. | May consume more power or provide fewer cores. |
| Many-core throughput | Can complete many independent pieces of work concurrently. | Not all software can distribute its work effectively. |
| Energy-efficient design | Longer battery life and reduced heat output. | May prioritise power saving over maximum sustained speed. |
Clock Speed
The processor clock produces regular timing pulses that coordinate CPU activity. Clock speed, or clock frequency, is the number of cycles produced each second. It is measured in hertz.
A higher frequency provides more opportunities for processor operations to begin, but it does not show how much useful work is completed in each cycle. Performance may also be limited by memory access, software design, heat or another system component.
Calculating the clock period
The duration of one cycle is the reciprocal of the frequency:
clock period = 1 Γ· clock frequency
Worked example
A processor operates at 3.2 GHz.
3.2 GHz = 3.2 Γ 109 Hz
Clock period = 1 Γ· (3.2 Γ 109) = 3.125 Γ 10β10 seconds = 0.3125 ns.
Processor Cores and Parallel Work
A processor core can fetch, decode and execute its own instruction stream. A multi-core processor places two or more cores in the processor package, allowing multiple pieces of work to make progress at the same time.
Additional cores are most useful when a program can divide a large task into parts or when several independent programs are running. The improvement is rarely proportional to the number of cores because some work remains sequential and the cores may need to coordinate or share data.
| Workload | Likely benefit from more cores | Reason |
|---|---|---|
| Rendering many independent video frames | High | Frames or sections can often be processed concurrently. |
| Running several applications | Moderate to high | Different processes can be scheduled on different cores. |
| A strictly sequential algorithm | Limited | Later steps depend on results from earlier steps. |
Cache Memory and the Memory Gap
Processor cores can operate much faster than main memory can normally supply data. When required instructions or data are not available quickly enough, the processor may have to wait.
Cache memory is small, fast memory positioned close to or inside the processor. It keeps copies of instructions and data that are likely to be needed soon. Accessing a useful item from cache is usually faster than requesting it from main memory.
Cache miss: the required item is absent, so slower memory must be accessed.
A larger or faster cache can reduce waiting, but a larger cache does not guarantee that every access will be faster. The benefit depends on whether the program repeatedly uses data and instructions that remain in the cache.
Bus Width
A bus width is the number of bits that can be represented or transferred at one time. The address bus and data bus have different roles, so increasing their widths has different consequences.
Address-bus width
An n-bit address bus can represent 2n different binary addresses. A wider address bus therefore increases the number of locations that can be addressed directly. It does not, by itself, increase how many data bits move in one transfer.
Worked example
A system has a 22-bit address bus.
Number of directly addressable locations = 222 = 4,194,304 locations.
In a byte-addressable system, this corresponds to 4,194,304 bytes of directly addressable storage.
Data-bus width
The data bus determines how many bits can be transferred in one operation. If a processor needs to move a 64-bit word through a 32-bit data bus, at least two transfers are required. A 64-bit data bus could move the same word in one transfer, assuming the rest of the system supports that width.
Word Length as a Supporting Factor
A word is the natural-sized group of bits that a processor is designed to handle as one unit. Register size and internal data paths are often related to the processor's word length.
| Word length | Equivalent size | Possible implication |
|---|---|---|
| 16 bits | 2 bytes | Smaller values and data units are handled naturally. |
| 32 bits | 4 bytes | Registers commonly hold 32-bit values. |
| 64 bits | 8 bytes | Larger values can be handled in one processor word. |
Word length is included here to help explain data-bus transfers. A larger word length does not automatically make every program faster, and the software and operating system must support the architecture.
Comparing Complete Processor Designs
Consider two fictional systems. Neither specification is universally better.
| Feature | System Atlas | System Beacon |
|---|---|---|
| Design emphasis | High single-core responsiveness | Parallel throughput |
| Clock speed | 4.1 GHz | 3.3 GHz |
| Cores | 4 | 10 |
| Cache | 8 MB | 24 MB |
| Data bus | 64 bits | 64 bits |
Reasoning challenge
- Which system might respond better to a mainly sequential task? Justify your choice.
- Which system might be better suited to rendering many independent frames? Justify your choice.
- Explain why the specifications are not enough to predict exact real-world performance.
Interactive: Processor Performance Explorer
Adjust the processor and workload settings. The result is an illustrative learning model, not a real benchmark. Its purpose is to show why the same hardware change can have a different effect on different tasks.
Common Mistakes and Misconceptions
- Using clock speed as the only measure of performance.
- Assuming that twice as many cores always produces twice the speed.
- Saying cache replaces main memory rather than keeping fast copies of selected content.
- Confusing address-bus width with data-bus width.
- Claiming that a wider address bus directly makes calculations faster.
- Forgetting that software and workload determine whether hardware features are useful.
- Converting gigahertz incorrectly: 1 GHz is one billion hertz.
Practice
Core questions
- A processor runs at 4.0 GHz. Calculate the duration of one clock cycle in nanoseconds.
- Explain why a processor with a lower clock speed could outperform one with a higher clock speed.
- Explain why increasing the number of cores may have little effect on a sequential algorithm.
- Describe how a cache hit can improve processor performance.
- Calculate the number of locations represented by a 21-bit address bus.
- A 64-bit processor uses a 16-bit data bus. Calculate the minimum number of transfers required for one 64-bit word.
Extended reasoning
A school is choosing a processor for a computer used mainly for video export and running several applications simultaneously. Explain which three processor specifications should be prioritised and why.
Review
| Factor | Potential performance effect | Important limitation |
|---|---|---|
| Processor type | Different designs complete different amounts or types of work efficiently. | Performance depends on the workload and implementation. |
| Clock speed | More cycles occur each second. | Does not show work completed per cycle. |
| Core count | More instruction streams can make progress concurrently. | Software must expose parallel work. |
| Cache memory | Can reduce waiting for slower main memory. | Only helps when required content is found in cache. |
| Address-bus width | Increases the number of directly representable addresses. | Does not determine the amount of data transferred at once. |
| Data-bus width | More bits can be transferred in one operation. | Other system components may still limit throughput. |