I have seen these three words showing up a lot, but don't understand the exact differences between them. For example, collecting CPU utilisation is often called profiling and can also fall into performance monitoring. What is the (subtle) difference between them?
What’s difference between monitoring, tracing and profiling
monitoringperformance-monitoringtrace
Related Topic
- Linux – Can someone explain the “use-cases” for the default munin graphs
- What metrics should I watch when I monitor a server
- Postgresql – Monitoring PostgreSQL replication with Nagios and check_postgres shows intermittent delay
- Docker performance monitoring – how to query I/O busy time and exact block reads/writes
Best Answer
This is the way I use these words. Others may have additional or different usages. Depending on the job at hand, I will use the terms differently. Development teams and operations teams have different needs an usage.
Monitoring is monitoring. Usually it is ongoing, and preferably automated. Open source tools like
Munin
,Nagios
, andMRTG
fall into this category. There a lot of commercial tools as well. I would also includesar
run continuously in this category, but its results are not normally monitored. Monitoring tools can be used to trigger alerts when a monitored resource falls above or below a trigger level. Many monitoring tools work well in heterogeneous environments.Profiling is usually done on a particular program to see which code is using the most resources. Often this is CPU time, but can also include memory, I/O, and execution (wall) time. It is usually used to identify candidate code for optimization. Profiling tools tend to be language and/or platform dependent.
A different kind of profiling is done using logs and/or monitoring data. This is usage profiling and can be done for a variety of reasons. I haven't found many tools to do this.
I use tracing in a couple of different ways. Most frequently, I trace network routes. Depending on network and firewall settings a variety of tools may be used with more or less success. Most of these have traceroute in their name or description.
Program tracing is tracing the execution of a program. This is generally done in a test situation. This can be done in a number of ways (in my order of usage and experience):
strace
to see what code is called. This can be useful in determining why a program is failing or not responding as expected.