Valgrind can run multi-threaded processes, but can only run one thread
at the same time.
So, when running a single process under Valgrind on a multi-cpu system,
you will not use more than 1 CPU
at the same time. This explains the 12.5% (1/8) that you have observed.

Note that this "serialised thread running" can somewhat badly interact
with CPU frequency scaling
and/or can give unfair scheduling of the threads in the process.

(see bug https://bugs.kde.org/show_bug.cgi?id=270006
<https://bugs.kde.org/show_bug.cgi?id=270006>  )

Philippe



________________________________

        From: Roman Biesiada [mailto:[email protected]]
        Sent: Friday 2 December 2011 14:26
        To: [email protected]
        Subject: [Valgrind-users] How to boost application under
Callgrind control?



        Hello,



        I hope i did not send it twice :-)




        I am trying to profile my own ldapd process with the use of
callgrind. I am running my software on quite powerful machine equipped
with 2 x E5440  @ 2.83GHz CPU. So I have total of 8 CPU cores that I can
use. Normally under heavy load my ldapd process takes ~ 400 % of CPU (4
full cores utilized for handling ldap requests). My ldapd is
multi-threaded daemon. When I run however ldapd under control of
valgrind/callgrind I can utilize only 12.5% of CPU (roughly 1/8 of CPU
power). I suspected that it is because only one of 8 cores was used by
valgrind/callgind. When I checked however CPU usage then "sar -P ALL"
command showed all cores were used equally.  I thought that maybe
"--separate-threads=yes" switch could help but it didn't.



        I am using callgrind-0.10.1-1.i586.rpm on SLES 9 sp4.



        I am calling callgrind by:

        valgrind --tool=callgrind /bin/ldapd &



        Can anybody provide any hint how to use valgrind/callgrind to be
able to use my whole server capacity and simulate larger load for the
process being controlled by callgrind?



        Thanks,

        Roman


____
 
This message and any files transmitted with it are legally privileged and 
intended for the sole use of the individual(s) or entity to whom they are 
addressed. If you are not the intended recipient, please notify the sender by 
reply and delete the message and any attachments from your system. Any 
unauthorised use or disclosure of the content of this message is strictly 
prohibited and may be unlawful.
 
Nothing in this e-mail message amounts to a contractual or legal commitment on 
the part of EUROCONTROL, unless it is confirmed by appropriately signed hard 
copy.
 
Any views expressed in this message are those of the sender.
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to