1# Perfetto benchmarks 2 3 4*** note 5**This doc is WIP**, stay tuned. 6<!-- TODO(primiano): Summarize results of perfetto_benchmarks --> 7*** 8 9This doc should show the charts of `perfetto_benchmarks`, showing cpu usage and 10tracing bandwidth for both writing (producer->service) and reading 11(service->file / service->consumer). 12 13In two modes: 14- Measure peak tracing bandwidth saturating the cpu: the producer(s) write as 15 much data as they can, reaching 100% cpu usage. 16- Measure CPU overhead vs constant bandwidth: the producer(s) writes data at a 17 pre-defined rate. 18 19Tweaking the various parameters, such as: 20- Number of writers 21- Size of the shared memory buffer 22- Size of each TracePacket. 23 24**TL;DR:** 25Peak producer-to-service tracing bandwidth: 26* Linux desktop: ~1.3 GB/s 27* Android Pixel: ~1 GB/s 28 29Producer-to-service CPU overhead when writing ~3 MB/s: 0.01 - 0.03 30(0.01 := 1% cpu time of one core) 31 32CPU overhead for translating ftrace raw pipe into protobuf: 33* Android Pixel: 0.00-0.01 when idle. 34* Android Pixel: 0.02-0.04 with 8 cores @ 8.0 CPU usage (raytracer). 35* Linux desktop: TBD 36