高负载系统和多线程

发布于 2024-10-11 07:32:57 字数 67 浏览 1 评论 0原文

谁能告诉我,在高负载系统中使用多线程的最佳架构模式或方式是什么? 我读过有关多路复用方法的内容,还有其他方法吗? 谢谢。

Can anyone tell me , What is architectural pattern or way the best for using multi threading in High Load System?
I have read about Multiplexing approach, Is there something else?
Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

日暮斜阳 2024-10-18 07:32:57

我不太清楚您所说的“高负载系统”是什么意思,但我假设您指的是商业服务器环境。如今高端服务器芯片的趋势是拥有许多复制核心,每个核心都允许一定程度的多线程。很难说哪种多线程技术是最好的,因为每种技术都提供了可能更适合特定应用程序工作负载的优点。

以Sun UltraSPARC T1为例。它有 8 个核心,每个核心在单个共享管道上最多可支持 4 个线程。核心能够在线程之间无延迟地切换。这种方法称为细粒度时间多线程:细粒度是因为线程可以在每个周期切换,时间是因为线程跨周期交错。

另一种称为同时多线程 (SMT) 的方法允许来自多个线程的指令同时处于同一管道阶段。该技术要求处理器超标量,即能够在单个周期内向流水线发出多条指令。您在服务器市场上往往不会看到那么多这样的情况,因为超标量处理器往往更大、更耗电,不符合服务器群和数据中心所需的规模经济。

I'm not exactly sure what you mean by High Load System, but I'll assume you mean a commercial server environment. The trend for high-end server chips these days is many replicated cores, each of which allows some degree of multi-threading. It's hard to say which multi-threading technique is best, since each offers advantages that may be more appropriate given a certain application workload.

Take the Sun UltraSPARC T1 for example. It has 8 cores, each of which can support up to 4 threads on a single shared pipeline. A core is able to switch between threads with no delay. This approach is called fine-grained temporal multi-threading: fine-grained because threads can switch every cycle, temporal because threads are interleaved across cycles.

Another approach, called Simultaneous Multithreading (SMT) allows instructions from multiple threads to be in the same pipeline stage at the same time. This technique requires that the processor be superscalar, that is, be able to issue multiple instructions to the pipeline in a single cycle. You will tend to not see as much of this in the server market because superscalar processors tend to be bigger and more power-hungry, not in line with the economies of scale that server farms and data centers require.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文