0

我有一个多线程程序。我们使用自己的线程池实现。首先,项目的负载足够。对比单线程,两个线程的程序更快。

当我们增加大于 2 的线程数时,性能开始变得很糟糕。显然,我们遇到了多线程的性能问题。

然后,我们开始使用 Intel® VTune™ Amplifier XE 2017 进行性能分析,我们把这个工具集成到 VS2013 中。然后当我点击英特尔® VTune™ Amplifier XE 的星形按钮时发生了一件令人惊讶的事情,项目开始运行,插件收集数据。我们发现,当我们通过插件启动这个项目时,随着线程数的增加,性能变得更高,运行时间也缩短了。我们最多可以打开 20 个线程。时间缩短20倍

那么,我们想知道,英特尔® VTune™ Amplifier XE 2017 能否改变多线程程序的运行模式?为什么会发生这种情况。我被这个问题困扰了很久。

4

1 回答 1

1

Finally,I resolve this question.The answer is simple.The cause of problem is that I run the program with debugging.If I redirectly run the *.exe,the perfomance is well.There is no relationship to VTune,just beacause VTune directly start with calling *.exe.

于 2016-10-21T03:30:47.923 回答