如何读取 PCIe 总线上使用的带宽?
我正在开发一个流媒体应用程序,该应用程序在启动时将大量数据推送到显卡。当数据被推送时,CPU 几乎不做任何事情,它以接近零的使用率闲置。
我想监控哪些机器在推送初始数据方面遇到困难,哪些机器可以应付,以便我能够为客户硬件获得最低推荐规格。
我发现配备 PCIe 1.1 x16 插槽的 PC 很难将初始数据推送到显卡上。
我的开发 PC 有一个 PCIe 2.0 x16 插槽,它可以毫无问题地应对最初推送到显卡的大量数据。
我需要数字来证明(或反驳)我的观点。
我想要的是能够确定:
显卡位于哪种插槽类型? 该插槽的速度是多少? GFX卡名 Gfx 卡驱动程序版本
但最重要的是 PCIe 插槽上的数据流 - 例如,如果我可以表明 PCIe 总线的数据已达到最大,我可以指出这是瓶颈。
我知道系统内存速度也是一个因素,例如数据通过 PCIe 总线从 RAM 传输到显卡,那么有没有办法也确定系统内存速度?
最后,我使用非托管 C++ 编写,因此无法选择访问 .NET 库。
I'm working on a streaming media application that pushes a lot of data to the graphics card at startup. The CPU is doing very little at the point when the data is being pushed, it idles along at close to zero percent usage.
I'd like to monitor which machines struggle at pushing the initial data, and which ones can cope, in order that I can get to a minimum recommended spec for our customers hardware.
I've found that PCs with PCIe 1.1 x16 slots struggle with the initial data being pushed over the graphics card.
My development PC has a PCIe 2.0 x16 slot, and it has no problems with coping with the large amount of data being initially pushed to the graphics card.
I need numbers to prove (or disprove) my point.
What I'd like is to be able to determine:
Which slot type is the graphics card on?
What is the speed of that slot?
Gfx card name
Gfx card driver version
But most importantly, the data flow over the PCIe slot - e.g. if I can show that the PCIe bus is being maxed out with data, I can point to that as the bottle neck.
I know that system memory speed is also a factor here, e.g. the data is being transferred from RAM, over the PCIe bus to the graphics card, so is there a way to determine the system memory speed also?
Finally, I write in unmanaged C++, so accessing .NET libraries is not an option.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
对于 Nvidia GPU,您可以尝试使用
NvAPI_GPU_GetDynamicPstatesInfoEx
:For Nvidia GPUs, you can try using
NvAPI_GPU_GetDynamicPstatesInfoEx
:您在推送大量数据时是否会遇到错误,或者您“只是”担心速度慢?
我怀疑是否有任何简单的方法可以监控 PCI-e 带宽使用情况(如果可能的话)。但应该可以通过 WMI 和/或 SetupAPI 查询视频适配器连接到的总线类型 - 抱歉,我没有个人经验或有用的链接。
Do you get errors pushing your massive amounts of data, or are you "simply" concerned with slow speed?
I doubt there's any easy way to monitor PCI-e bandwidth usage, if it's possible at all. But it should be possible to query the bus type the video adapter is connected to via WMI and/or SetupAPI - I have no personal experience or helpful links for either, sorry.