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).
How can I measure the share of the time that am I spending in memory access latencies (due to cache misses), with the CPU being idle?
I should note that the app is running on a Hyper-V guest; I'm not sure it will pose any difficulties, but it might.
Look at CPU usage and if its bordering at 100% it's CPU bound. If it's not there's an artificial bottleneck in the implementation. E.g. on a dual-core CPU a single threaded process will not go above 50% CPU usage.
CPU Bound. It is easy to see if a system is CPU bound or not. Simply type `htop` at the command line and press enter.
Any application that involves reading and writing data from an input-output system, as well as waiting for information, is considered I/O bound. These include applications like word processing systems, web applications, copying files, and downloading files.
CPU Bound means the rate at which process progresses is limited by the speed of the CPU. A task that performs calculations on a small set of numbers, for example multiplying small matrices, is likely to be CPU bound. I/O Bound means the rate at which a process progresses are limited by the speed of the I/O subsystem.
You could always profile
your application to see where it spends most of the time.
You can learn a lot about your application's behaviour and data access patterns this way.
If you are using Linux, you have a wide range of available tools for profiling, like:
EDIT:
For a more exact measurement of the processor performance as well as memory accesses, you could also try the AMD CodeAnalyst Performance Analyzer. Here are instructions on how to use it with Intel processors, though I haven't tried it myself.
Another tool that you might also find useful is the Intel Performance Tuning Utility.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With