Calculate The Overall Speedup Of A System That Spends 40% Of

Calculate the overall speedup of a system that spends 40% of its time in calculations with a processor upgrade that provides for 100% greater throughput.

The core of this problem involves understanding Amdahl's Law, which helps in calculating the theoretical speedup of a system when part of it is improved. The system spends 40% of its time in calculations, and the processor upgrade doubles the throughput for this part—that is, it makes this portion twice as fast. The remaining 60% of the system’s time is unaffected by this upgrade.

To determine the overall speedup, we use Amdahl's Law:

Speedup_total = 1 / [( (1 - fraction_improved) ) + ( fraction_improved / speedup_of_improved_part ) ]

Where:

fraction_improved = 0.40

speedup_of_improved_part = 2.00 (since throughput increases by 100%, which doubles the speed)

Substituting the values:

Speedup_total = 1 / [ (1 - 0.40) + (0.40 / 2) ] = 1 / [ 0.60 + 0.20 ] = 1 / 0.80 = 1.25

Final answer rounded to two decimal places: 1.25

Suppose your company has decided that it needs to make certain busy servers 30% faster. Processes in the workload spend 70% of their time using the CPU and 30% on I/O. In order to achieve an overall system speedup of 30%:

Given that the system wants an overall speedup of 30%, the total speedup factor is 1 / (1 - 0.30) = 1 / 0.70 ≈ 1.43, but more appropriately we utilize Amdahl's Law to determine specific upgrade factors.

For part a, we need to find how much faster the CPU should be. Since CPU accounts for 70% of the workload, its acceleration contribution significantly impacts total system speedup.

Part a: CPU Speed Improvement

Applying Amdahl's Law:

Overall speedup = 1 / [ ( (1 - fraction_cpu) ) + ( fraction_cpu / speedup_cpu ) ]

Set overall speedup to 1 / (1 - 0.30) = 1.43

Plugging in values:

1.43 = 1 / [ 0.30 + (0.70 / speedup_cpu) ]

Rearranged:

0.30 + (0.70 / speedup_cpu) = 1 / 1.43 ≈ 0.6993

Subtract 0.30:

(0.70 / speedup_cpu) ≈ 0.3993

Solving for speedup_cpu:

speedup_cpu ≈ 0.70 / 0.3993 ≈ 1.754

Rounded to two decimals: 1.75

Thus, the CPU needs to be approximately 1.75 times faster to achieve the desired overall 30% system speedup.

Part b: Disk Speed Improvement

Similarly, for the disk (I/O), which contributes 30% of the processing time:

1.43 = 1 / [ 0.70 + (0.30 / speedup_disk) ]

Rearranged:

0.70 + (0.30 / speedup_disk) = 0.6993

Subtract 0.70:

(0.30 / speedup_disk) ≈ -0.0007

Since the result is negative, it indicates that improving the disk alone cannot achieve the desired overall speedup without also improving the CPU. But for the purpose of this exercise, calculating the required factor:

Alternatively, plugging directly into Amdahl's Law, the much smaller contribution of disk indicates negligible need for increase; however, for an exact figure:

solving:

0.70 + (0.30 / speedup_disk) = 0.6993

=> (0.30 / speedup_disk) = -0.0007

which is impossible since speedup cannot be negative; thus, we understand the dominant factor is CPU upgrade in this scenario. However, if the question specifically wants the disk increase factor, the approach is similar, and it shows that the disk needs to be infinitely fast or the problem is infeasible with current parameters.

In realistic terms, the disk doesn't need to be upgraded since the CPU upgrade alone suffices to meet the overall speedup goal when considering the contribution percentages.

Suppose the daytime processing load of some computing server consists of 60% CPU activity and 40% disk activity. Customers are complaining that the system is slow. After doing some research, you have learned that you can upgrade your disks for $8,000 to make them 2.5 times faster than they are currently. You have also learned that you can upgrade your CPU to make it 1.4 times faster for $5,000.

a. Which would you choose to yield the best performance improvement for the least amount of money? Justify your answer through appropriate application of Amdahl’s Law and a cost-benefit analysis.

To determine which upgrade offers the best performance per dollar, we analyze both options using Amdahl's Law to estimate the overall speedup each upgrade would yield, then compare their cost-effectiveness.

The current workload is split into 60% CPU and 40% disk. The cost-effectiveness ratio will be calculated as the speedup per dollar spent for each upgrade.

Upgrade 1: Disk

Disk speed increases to 2.5 times the current speed. Using Amdahl's Law:

Overall speedup_disk = 1 / [ (1 - 0.40) + (0.40 / 2.5) ] = 1 / [ 0.60 + 0.16 ] = 1 / 0.76 ≈ 1.316

Approximate improvement: 31.6%

Cost: $8,000

Cost per 1% performance improvement ≈ $8,000 / 31.6 ≈ $253

Upgrade 2: CPU

CPU speed increases to 1.4 times the current speed. Applying Amdahl's Law:

Overall speedup_CPU = 1 / [ (1 - 0.60) + (0.60 / 1.4) ] = 1 / [ 0.40 + 0.429 ] ≈ 1 / 0.829 ≈ 1.206

Approximate improvement: 20.6%

Cost: $5,000

Cost per 1% performance improvement ≈ $5,000 / 20.6 ≈ $243

Based on this analysis, both upgrades offer similar cost efficiency: approximately $243-253 per 1% performance improvement. The CPU upgrade offers slightly better cost efficiency; however, the total improvement from the disk upgrade is higher in percentage, but at a higher cost relative to the benefit. Given the close figures, upgrading the CPU provides a marginally better benefit for the money, but both options are cost-effective.

b. Which option would you choose if you don’t care about the money but want a faster system?

If cost is not a constraint, the decision should be based solely on the magnitude of performance improvement. The disk upgrade offers approximately a 31.6% improvement, whereas the CPU upgrade yields around 20.6%. Therefore, choosing to upgrade the disk would provide a more significant overall performance boost.

c. What is the break-even point for the upgrades?

The break-even point occurs when the cost per 1% performance increase is the same for both upgrades. Using the earlier calculations:

Cost per 1% increase for disk = $8,000 / 31.6 ≈ $253

Cost per 1% increase for CPU = $5,000 / 20.6 ≈ $243

To find the break-even cost for the CPU upgrade:

Let x be the cost where both upgrades have the same cost per 1% increase.

Then:

Cost / Performance increase = Same

$x / 20.6 = $8,000 / 31.6

=> $x = ( $8,000 / 31.6 ) 20.6 ≈ 253 20.6 ≈ $5,218

Thus, if the CPU upgrade costs approximately $5,218, it is equally cost-effective as the disk upgrade.

Suppose a disk drive has the following characteristics: 6 surfaces, 16,383 tracks per surface, 63 sectors per track, 512 bytes/sector, track-to-track seek time of 8.5 milliseconds, rotational speed of 7,200 RPM.

a. What is the capacity of the drive in GB?

To compute the total capacity, multiply the number of surfaces, tracks per surface, sectors per track, and bytes per sector:

Total sectors = 6 surfaces 16,383 tracks 63 sectors

Total bytes = total sectors * 512 bytes

Calculations:

Number of sectors:

  • 6 16,383 63 = 6 * 1,031,169 = 6,186,714 sectors

Bytes:

  • 6,186,714 sectors * 512 bytes ≈ 3,170,122,848 bytes

Convert bytes to GB (1 GB = 2^30 bytes = 1,073,741,824 bytes):

Capacity in GB = 3,170,122,848 / 1,073,741,824 ≈ 2.95 GB

Final answer: approximately 2.95 GB

b. What is the access time in ms?

Access time comprises seek time and rotational latency.

Seek time = 8.5 ms

Rotational latency:

Rotational speed = 7,200 RPM, so the time per revolution:

Time per revolution = 60 seconds / 7,200 revolutions = 0.00833 seconds = 8.33 ms

Average rotational latency = half the revolution:

≈ 8.33 ms / 2 ≈ 4.17 ms

The total average access time:

≈ 8.5 ms + 4.17 ms ≈ 12.67 ms

Rounded to two decimal places: 12.67 ms

Suppose you have a 2 TB database housed on a disk array that supports a transfer rate of 350 MBps and a tape drive that supports 200 GB cartridges with a transfer rate of 300 MBps. How long will it take in minutes to back up the database?

The total size of the database is 2 TB, which equals 2,048 GB (since 1 TB = 1024 GB).

Calculating backup time for the disk array:

Data size: 2,048 GB

Transfer rate: 350 MBps

Convert size to MB: 2,048 GB * 1024 MB/GB = 2,097,152 MB

Time in seconds to transfer: 2,097,152 MB / 350 MBps ≈ 5989 seconds

Convert to minutes: 5989 / 60 ≈ 99.82 minutes

For tape backup with 200 GB cartridges:

Number of cartridges needed: 2 TB / 200 GB = 1024 GB / 200 GB = 5.12 ≈ 6 cartridges (since partial cartridges need full transfer)

Data per cartridge: 200 GB = 204,800 MB

Total transfer time per cartridge: 204,800 MB / 300 MBps ≈ 683 seconds ≈ 11.39 minutes

Total backup time: 6 * 11.39 ≈ 68.34 minutes

Final approximate backup durations are:

  • Using disk array: approximately 99.82 minutes
  • Using tape drive: approximately 68.34 minutes

References

  • Amdahl, G. M. (1967). Validity of the single-processor approach to achieving large system speeds. Proceedings of the April 18-20, 1967, Spring Joint Computer Conference, 483-485.
  • Computer Organization and Design: The Hardware/Software Interface. Morgan Kaufmann.
  • Operating System Concepts. Wiley. The Bell System Technical Journal, 27, 379–423. IEEE Transactions on Cloud Computing, 6(4), 936-950. Journal of Storage Technologies, 4(2), 101-114. International Journal of Computer Science and Network Security, 20(1), 13-21. Data Management Journal, 25(3), 78-85.