Sunday, May 12, 2013

mpstat

mpstat

mpstat reports information which is useful in understanding lock contention and CPU loading issues.

mpstat reports the following:

  • CPU: Processor ID
  • minf: Minor faults
  • mjf: Major faults
  • xcal: Processor cross-calls (when one CPU wakes up another by interrupting it). If this exceeds 200/second, the application in question may need to be examined.
  • intr: Interrupts.
  • ithr: Interrupts as threads (except clock).
  • csw: Context switches
  • icsw: Involuntary context switches (this is probably the more relevant statistic when examining performance issues.)
  • migr: Thread migrations to another processor. If the migr measurement of mpstat is greater than 500, rechoose_interval should be sent longer in the kernel.
  • smtx: Number of times a CPU failed to obtain a mutex.
  • srw: Number of times a CPU failed to obtain a read/write lock on the first try.
  • syscl: Number of system calls.
  • usr/sys/wt/idl: User/system/wait/idle CPU percentages.

No comments: