Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to improve sampling frequency #2

Open
Jasonmessage opened this issue Dec 21, 2018 · 4 comments
Open

How to improve sampling frequency #2

Jasonmessage opened this issue Dec 21, 2018 · 4 comments

Comments

@Jasonmessage
Copy link

Jasonmessage commented Dec 21, 2018

Hi joemario,

Now,i‘m using the perf c2c tool, but i find that sample size is small,following is the setting parameter.

perf_event_max_sample_rate : 100000
perf_cpu_time_max_percent :25
command line :perf c2c record -F 60000 -a --all-user sleep 5
the output sample size : 5321
the hardware : X86 40 cores
test case : false_sharing_example.c

I don't know why the output sample size is so small , so need your help!
Looking forward to your reply soon when you are convenient!

@Jasonmessage Jasonmessage changed the title How the How to improve sampling frequency Dec 21, 2018
@joemario
Copy link
Owner

Hi Jason:
Try this:
gcc -g false_sharing_example.c -pthread -lnuma -o false_sharing.exe
perf c2c record -F ./false_sharing.exe 40
Then hit ctrlC after 2-3 seconds.

Joe

@Jasonmessage
Copy link
Author

Thank joemario for your reply! but we test the program by your advice! The result is still not good and the output sample size : 14K (time : ctrlC after 8 seconds , perf_event_max_sample_rate : 100000)

@joemario
Copy link
Owner

Hi Jason:
Can you attach your c2c report output file?
Joe

@joemario
Copy link
Owner

Hi Jason:
A few more thoughts to consider.
14K samples for just that program or for just user space (--all-user) is nothing to worry about. That is sufficient. Remember, C2C only samples load and store instructions. And by default, it will ignore all loads with a load latency of less than 30 machine cycles. You can adjust that 30 to whatever you want, but less than 30 is not interesting.
Joe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants