Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Example Analysis of By Amdahl's Law for performance improvement after system Optimization

2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article will explain in detail the example analysis of By Amdahl's law to improve the performance of the system after optimization. The editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.

After the completion of the system optimization, how do we evaluate the effect of the optimization? The simplest way is to measure the ratio of time spent after optimization to that before optimization, which is also called acceleration ratio S (Speed Up).

Amdahl's law has important guiding significance in understanding performance optimization. Before optimization, the total system time is To (old), and after optimization, the total time is Tn (new), and the speedup is S=To/Tn.

Understand through the following picture: (α is the original time-consuming ratio of the part to be increased)

S = To/Tn = 1 / (1-α) + α / k

When the speed of the part to be optimized is increased infinitely (k is close to infinity and does not take time), S = 1 / (1-α), that is, for example, α = 60%, if 60% of the system can be speeded up so that it does not take time, then the highest speedup is still only 1max 0.4 / 2.5, and the system can speed up 2.5 times. This is the main point of Amdahl's law: to significantly accelerate the entire system, you must increase most of the speed of the whole system.

When we describe parallel programs, ideally, as the number of cpu cores increases, the expected run time will decrease linearly. In other words, if the expected number of threads is doubled, the running time will be halved.

As shown in the figure:

The actual situation:

Ideal:

The key indicator of performance improvement is the speedup, the old time / new time, as the thread increases, the time corresponding decreases, in fact, as the thread increases, the running time may increase because of the overhead of thread context switching.

This is the end of this article on "example analysis of By Amdahl's law for improving system performance after optimization". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report