Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5945465
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T16:41:07+00:00 2026-05-22T16:41:07+00:00

As I understand it, the Performance Counters subsystem for Linux uses the perf record

  • 0

As I understand it, the Performance Counters subsystem for Linux uses the perf record command to perform sample-based profiling of the CPU and hardware counters (such as cache misses).

  1. How does one specify the sampling rate for perf record? The closest I can see from the man page is the somewhat cryptic option “-c, –count=Event period to sample”, but it’s not clear if this is referring to period-as-duration or inverse-of-rate-period (and if the latter, what units it expects).

  2. What is a ‘good’ sampling rate to sample at for an application on a mobile Android device? What rate is too low to be useful, and what rate is excessively high?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T16:41:08+00:00Added an answer on May 22, 2026 at 4:41 pm

    At first, you need to get a list of events with perf list. I have no experience with android, so, if you can, please, show most interesting part of this list.

    1) -c is count of event between the samples will be taken. (only count’th event is sampled, 1 is to sample all and 100000 is to sample every 100000th event) E.g. if there is an event for cpu tick (smth like TSC), then count is number of ticks, and I recommend you to set sampling to be done not more often than 1 millisecond. To get tick count, use formula: CPU_Freq_in_MHz * 1000. This is a count of events to get sample each millisecond, e.g. for 800 MHz CPU and tick event use -c 800000.

    For other events you should estimate, how often will they done. If you don’t know, you can start from the count value for ticks, and then check is enough samples were collected. If not, lower the count ten times and check again. The count for ticks will be safe, because the tick is one of the most often event in any CPU.

    2) The good rate is different for various PMU, which is selected with “-e” or “–event=” option. If the event is rare, not more 1000 per second, you can sample even each event. If the event is like cache miss, you should try several variants, because the good value is depends on the code sampled. Too low sampling rate will give you small number of samples and results will be not dependable and noisy. But for too high rate the results will be noised too, because every PMU can affect the program traced. I recommend you to use not more than 1000 events per second in average.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have to implement a performance statistics MIB for a linux based device and
I'm trying to understand the performance numbers I'm getting and how to determine the
I don't understand why the performance of SortedDictionary is approximately 5x slower than Dictionary
Jeff Atwood wrote about this here , and while I understand the theoretical performance
First of all, I understand in 90% of applications the performance difference is completely
I am trying to understand a potential performance issue with our database (SQL 2008)
I've been doing some performance testing, mainly so I can understand the difference between
I'm trying to understand the performance of database indexes in terms of Big-O notation.
I am trying to understand some performance summary output from MSBuild. The results look
How can I test performance of an asp.net mvc application and understand where exactly

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.