Question regarding CPU usage

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ashitpro
    Recognized Expert Contributor
    • Aug 2007
    • 542

    #1

    Question regarding CPU usage

    Hi all,
    I am using linux kernel 2.6.20
    I've developed one scheduler for my project.
    It has many threads working in it.
    It is taking 30% of cpu. According to my calculation it should not take this much.
    So surely something is wrong with the code.
    I got few infinite while loops too, but I also used sleep system calls in each.
    So what are other possible reasons that I should look for?
  • arunmib
    New Member
    • May 2007
    • 104

    #2
    can you give info. as how many threads are there and the functionality of them.

    Comment

    • ashitpro
      Recognized Expert Contributor
      • Aug 2007
      • 542

      #3
      Originally posted by arunmib
      can you give info. as how many threads are there and the functionality of them.
      15 threads waiting for dbus call

      Comment

      • arunmib
        New Member
        • May 2007
        • 104

        #4
        Like what do the 15 threads do when waiting? Do you they all "sleep()" for same time and ping the 'dbus' library at same time causing havoc or have you handled that efficiently.
        dbus - you are speaking about the interprocess communication stuff right.
        I think you would have gone through their FAQ section fully. In general it is 2.5 times slower than normally doing a socket communcation. So it obviously means you've got some problem or performance related issues. The faq link,



        There is another chap who has done a performance testing, I think his results will be of use to you.


        So in general, an option is that the dbus's inherent performance issue can be the problem.

        If you are mentioning about someother 'dbus', then please clarify and ignore this post. Enlighten me if I have seen or said something wrong.
        Last edited by arunmib; Oct 10 '07, 11:51 AM. Reason: insufficent content

        Comment

        Working...