Re: The sample time decreases when I run high cpu utilization job.

Michael Petlan <[email protected]>
Newsgroups gmane.linux.oprofile
Message-ID <alpine.LRH.2.20.1603111455310.13911@Rudolf-RHEL-7>
Hi,

this decrease of samples from 42M to 1k seems to be very strange to me.

1) What is the event you are using? In case you use the default one, it should be
the output of `ophelp -d`.

2) What hardware you're running your tests on? Is it an Intel x86_64 box or some
other architecture? Could you send `ophelp -r` and `lscpu` outputs?

3) Do you see any kernel complaining about the sample rate in dmesg? What's your
kernel version?

4) Try using perf-record (you have to have 'perf' package installed for that):

perf record -p `pgrep mysqld`
# run your tests
perf report --stdio

Does it behave in the same way?

Regards,
Michael


On Thu, 10 Mar 2016, Tim Chou wrote:
> Hi All,
> I use oprofile to try profile the database server's (MySQL) performance.
> 
> I start with this command before I start my test:
> sudo nohup operf --pid `pgrep mysqld` &
> All the tests will be run for 150s.
> 
> When the CPU utilization is low, the sample number seems reasonable.
> However, when the CPU utilization is very high, more than 100%, the sample number decreases dramatically.
> 
> Because the sample numbers change a lot in these tests. So I'm not sure if I can still believe the results I got in the high CPU utilization case. I
> think the sampling should be done in a fix time interval. So the sampling number should be similar.
> 
> The total sample numbers are 42417612 samples and 1226 samples, for 70% CPU utilization and 100% CPU utilization.
> 
> Is my understanding right? Or what's the right way to use oprofile in the high CPU utilization case?
> 
> Looking forward to your reply.
> 
> Thanks,
> Tim
> ---------------------------------------------------------------------------------
> Below are the symbols results.
> 70% cpu utilization:
> samples  %        image name               symbol name
> 2340974   5.5390  mysqld                   MYSQLparse(THD*)
> 1024614   2.4243  mysqld                   rec_get_offsets_func(unsigned char const*, dict_index_t c
> onst*, unsigned long*, unsigned long, mem_block_info_t**)
> 610260    1.4439  mysqld                   lex_one_token(YYSTYPE*, THD*) [clone .constprop.119]
> 
> >100% cpu utilization:
> 
> samples  %        image name               symbol name
> 63        4.8951  libc-2.22.so             __strcmp_sse2_unaligned
> 60        4.6620  mysqld                   fill_schema_collation(THD*, TABLE_LIST*, Item*)
> 44        3.4188  mysqld                   my_strnncollsp_utf8
> 29        2.2533  libc-2.22.so             __memcpy_avx_unaligned
> 
> 
>

------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140

_______________________________________________
oprofile-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oprofile-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.