Ryan

Linux — System Performance Analysis — CPU Profiling: https://compassinbabel.org/post/e77e475f-f465-413f-bbbe-69ef434fec33

Table of Content

  • Introduction
  • Related Readings
  • A Template for CPU Profiling
  1. Get the number of CPUs on a machine
  2. Check the CPU utilization
  3. Check ongoing hot processes
  4. Check cumulative CPU utilization of processes
  • Linux perf tool
  • Process Profiling
  • Collect process performance stats 20 times/second in the 10 seconds period.
  • Generate process performance reports
  • Get the time line of events of a process
  • CPU Scheduler Profiling
  • Record a scheduler profile for 10 seconds
  • Show per-process scheduler latency from a scheduler profile:
  • List per-event scheduler latency from a scheduler profile
  • Other Recipes
  • How to check the CPU run-queue length?

--

--

Flask is a light web framework written in Python. It’s easy to learn and use and it’s a perfect tool to build website prototypes. For example: in this website
most of the content is static and with the help of Jinja library, it only takes a couple of lines to generate the table. The website does need to store the thumbs-up and thumbs-down data but for a prototype it’s not a big deal and we don’t really need a database.

--

--