独立的CPU和IO时间
我有一个有大量 IO 的应用程序。该应用程序是多线程的,并且有一个线程专用于 IO 请求,因此有时 IO 和 CPU 会重叠。
它是用 C 语言为 Linux 编写的。
我想知道CPU做了多少有用的工作。例如,如果我们制作了一个完美的 RAID 系统,我们也许能够显着减少(如果不能消除的话)IO 因素。之后,我们会受到主内存和 CPU 吞吐量的限制。我怎么知道这个?我该如何衡量这个?
谢谢 鲍勃
I have an application with a lot of IO. This application is multithreaded and has a single thread dedicate to IO requests and hence some of the time, IO and CPU is overlapped.
It is written in C for Linux.
I would like to know how much useful work the CPU is doing. For instance, if we made a perfect RAID system we may be able to reduce significantly (if not eliminate) the IO factor. Afterwards, we are limited by the main memory and CPU throughput. How can I know this? How can I measure this?
Thanks
Bob
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
time(1)
实用程序或getrusage(2)
系统调用可以为您提供一些计时信息。只要进程不执行代码,它就会在 I/O 上阻塞。The
time(1)
utility or thegetrusage(2)
system call can give you some timing information. Any time your process doesn't spend executing code is time it spends blocked on I/O.