2

I am trying to understand each field of activity monitor to understand my process usage.
But I am not able to wrap my heads around few things.

  Model Name:   MacBook Pro
  Model Identifier: MacBookPro11,4
  Processor Name:   Intel Core i7
  Processor Speed:  2.2 GHz
  Number of Processors: 1
  Total Number of Cores:    4
  L2 Cache (per Core):  256 KB
  L3 Cache: 6 MB
  Hyper-Threading Technology:   Enabled
  Memory:   16 GB

Number of cores here are 4 but if I see the See CPU Usage in activity monitor, I see 8 blocks, how they are corresponding to 4 cores.
enter image description here
In memory what are Swap Used, does Memory used and Cached Files are always have to be less than or equal to Physical Memory. enter image description here
How to know if the maximum read and write IO operations are being performed looking at the graph.
enter image description here There is also a Data option which I don't understand how it is different from IO operation.

1
  • Unless you actually have a problem with memory and CPU usage (e.g. excessive usage causing performance issues), then for a happy life, I'd recommend not monitoring what your computer does. Leave that to the OS, and spend more time on whatever it is that you want to do.
    – benwiggy
    Jan 5, 2023 at 11:56

2 Answers 2

3

I have taken your questions as relating to four areas which I will attempt to answer in the same sequence. I am writing this because I feel that @Ezikiel Elin answer is, in some parts, misleading.

Physical cores and hyper-threading

Your CPU has 4 cores, but also has Hyper-threading which presents 8 virtual cores to the operating system. This has the benefit of allowing the cores to more rapidly change from running one process thread to another thread (quite likely from a different process). There are circumstances where this can slow throughput, but it is usually beneficial.

Activity monitor presents all 8 virtual cores. The first physical core is shown as the first two virtual cores in the graphs. The second physical is in graphs 3 and 4, and so on. In your example, the cores are only lightly loaded and not sufficient to make significant use of hyper-threading.

Swap and Compressed

There are time when macOS and your running applications need more memory can than comfortably fit in physical RAM. In that case, the memory management of macOS frees up RAM in two ways:

  1. Take some memory and compress it. In your example, 906 MB of physical RAM is being used to store some unspecified (but probably about twice that) of macOS and application memory. Of course, the memory will need to be decompressed before it is next used.

  2. Move some portions of memory out of physical RAM and store them on the boot disk. In your case, 6.64 GB of disk space in being used in this way. When an application requires to use that memory, it will have to be brought back into physical RAM. This moving portions of memory out and in to RAM is called swapping and the disk space used is in one or more swap files.

Compressing and decompressing is a relatively fast action using a highly efficient algorithm. Swapping is slower. When boot disks were hard disks, this was a key cause of slow system response. With SSDs, this is quicker and leads to a more responsive feel to the system.

macOS's memory tuning has a preference for compression rather than swapping, though in your example, it has decided that rather a lot of memory must be taken out of physical RAM and placed in the swap files. Ideally, the memory tuning will have chosen application memory that is unlikely to be wanted for some time.

Memory calculations

Memory allocations can be counted in more than one way, but as presented by Activity Monitor:

App Memory + Wired memory + Compressed = Memory Used

Wired memory is memory which can't be compressed or swapped. I don't like the use of "memory used" in this context because, in reality, nearly all the physical RAM is usefully occupied. But that is what Activity Monitor calls it.

Memory Used + Cached Files + Free memory = Physical Memory

So it is true that Memory Used + Cached Files is always less than or equal to Physical RAM.

With a simple calculation, you can work out that your Free Memory is only 0.10 GB.

Your "memory pressure" graph is green, which indicates that macOS is able to manage memory with few bottlenecks.

Disk IO and Data

To the left of the graph, Activity Monitor shows that number of read and write operations (called IO in the graphs) both as totals since boot and current rates.

Each disk operation can read or write variable amounts of data. The values for amount of data and current rates are on the right hand side. The graph calls this DATA (which seems reasonable to me).

From your graphs and current counters, the Mac looks fairly busy from the disk point of view. But the graphs have no units which does limit their usefulness.

1
  • You see eight cores because your Mac has an Intel chip that creates virtual cores. Your hardware only has four.
  • Swap used refers to the amount of memory that has been "swapped" to the disk for temporary archival. This happens when your system runs low on memory, but unless your "memory pressure" is consistently high this isn't indicative of a problem.
  • Because of Swap, there is no requirement that the amount of memory used is less than Physical memory.
  • I'm not sure there's an answer here. This graph doesn't have units, it isn't intended to be used except to estimate changes in usage. I would recommend looking at "Data read/sec" and "Data written/sec" and comparing these figures to your SSDs rated performance (you can google what your computer should be getting). In general though you will not get that figure because unless you're writing/reading one large file there's a lot of additional processing and overhead.
  • I/O refers to your disk read/writes, and Data refers to the amount of data being read/written.

The other answer from @Gilby has more detail - please refer to that as well!

9
  • Thank You for this. How is disk read/writes different from data read/writes as I am assuming data is read from the disk only and written in disk only.
    – Mark
    Aug 6, 2021 at 17:03
  • 1
    I'm not exactly certain, but it's more the number of operations being done to your disk versus the amount of data being written.
    – Ezekiel
    Aug 6, 2021 at 20:03
  • 1
    Third dot point is wrong. In Activity Monitor: Memory Used + Cached Files is always less than Physical Memory. The difference is Free Memory. Swap Used is addition to Physical Memory.
    – Gilby
    Aug 6, 2021 at 23:25
  • 2
    First dot point, in addition: Each pair (i.e. 1&2, 3&4, etc) correspond to a physical core. The OP's example has 4 lightly loaded cores which are not significantly using hyper-threading.
    – Gilby
    Aug 6, 2021 at 23:30
  • 1
    Don't delete yours, the OP may find mine too detailed.
    – Gilby
    Aug 9, 2021 at 2:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .