How to check if app is cpu-bound or memory-bound?

前端 未结 2 486
野性不改
野性不改 2020-12-24 15:17

I\'ve got an application that does few computational CPU work, but mostly memory accesses (allocating objects and moving them around, there\'s few numeric or arithmetic code

2条回答
  •  情歌与酒
    2020-12-24 15:58

    Unless you have a latency built into the system, just run the application for some time on a dedicated machine and check the CPU counters. If the app uses 100% of the CPU core it can access, it's CPU bound. Otherwise, it spends time on other things like memory allocations and IOs.

提交回复
热议问题