Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I measure CPU, memory and disk usage during a build?

I'm trying to improve my build times and want to have some feedback in place to measure where my problems are.

I'm using GNU Make on a Linux CentOS system to build the Linux kernel along with some application code. I can run Make with 'time' to get an overall time for the complete build, but that doesn't tell me where the bottlenecks are.

I used -j with Make to run it on multiple cores on my build machine, but I ran top during the build and noticed the CPU cores were often idle.

Any suggestions for the best way to measure disk and memory usage during the build?

Anything else I should be measuring?

No preference on text-based or GUI - whatever gives me some data I can use.

like image 268
Ross Johnston Avatar asked Nov 13 '22 01:11

Ross Johnston


1 Answers

For real time measurement I use tex-based htop from third-party repositories. It is like top but better, it shows graphically cpu (all cpu's separately), ram load.

like image 132
Ramil Huseynov Avatar answered Dec 09 '22 09:12

Ramil Huseynov