help-gnunet
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gnunet] downloads and CPU


From: Brent Miller
Subject: Re: [Help-gnunet] downloads and CPU
Date: Sun, 13 Feb 2005 23:32:41 -0800
User-agent: Debian Thunderbird 1.0 (X11/20050116)

Christian Grothoff wrote:

Do you have similar data for gnunet-download?

Christian

Attached are the gprof output from gnunet-download and gnunet-gtk with the stats window closed and the search aborted.

What's interesting is that with gnunet-download, I can download smaller files with out a problem, but as the files get larger gnunet-download uses up more and more cpu. If I download a file around a couple of megs, everything is okay, if I try and download a 700MB file like the Knoppix image I indexed, my computer gets brought to a standstill and the download slows to 1-2 kbps, even though it's indexed on my computer. The gprof output of gnunet-download is from a 50 meg test file that I have indexed locally, which slowed things down substantially, but didn't quite bring it to a crawl.

Hope this is useful.

-Brent
$ gprof /usr/local/bin/gnunet-download
Flat profile:

Each sample counts as 0.01 seconds.
  %   cumulative   self              self     total
 time   seconds   seconds    calls  ms/call  ms/call  name
100.07      0.04     0.04        1    40.03    40.03  run
  0.00      0.04     0.00   110496     0.00     0.00  data_start
  0.00      0.04     0.00        1     0.00     0.00  downloadFileHelper
  0.00      0.04     0.00        1     0.00     0.00  scheduleDownload

 %         the percentage of the total running time of the
time       program used by this function.

cumulative a running sum of the number of seconds accounted
 seconds   for by this function and those listed above it.

 self      the number of seconds accounted for by this
seconds    function alone.  This is the major sort for this
           listing.

calls      the number of times this function was invoked, if
           this function is profiled, else blank.

 self      the average number of milliseconds spent in this
ms/call    function per call, if this function is profiled,
           else blank.

 total     the average number of milliseconds spent in this
ms/call    function and its descendents per call, if this
           function is profiled, else blank.

name       the name of the function.  This is the minor sort
           for this listing. The index shows the location of
           the function in the gprof listing. If the index is
           in parenthesis it shows where it would appear in
           the gprof listing if it were to be printed.


                     Call graph (explanation follows)


granularity: each sample hit covers 2 byte(s) for 24.98% of 0.04 seconds

index % time    self  children    called     name
                0.04    0.00       1/1           main [2]
[1]    100.0    0.04    0.00       1         run [1]
                0.00    0.00    5919/110496      data_start [3]
-----------------------------------------------
                                                 <spontaneous>
[2]    100.0    0.00    0.04                 main [2]
                0.04    0.00       1/1           run [1]
                0.00    0.00      15/110496      data_start [3]
                0.00    0.00       1/1           scheduleDownload [5]
-----------------------------------------------
                0.00    0.00       1/110496      process [12]
                0.00    0.00       6/110496      scheduleDownload [5]
                0.00    0.00       8/110496      parseOptions [11]
                0.00    0.00       8/110496      downloadFileHelper [4]
                0.00    0.00      15/110496      main [2]
                0.00    0.00    5919/110496      run [1]
                0.00    0.00  104539/110496      progressModel [13]
[3]      0.0    0.00    0.00  110496         data_start [3]
-----------------------------------------------
                0.00    0.00       1/1           process [12]
[4]      0.0    0.00    0.00       1         downloadFileHelper [4]
                0.00    0.00       8/110496      data_start [3]
-----------------------------------------------
                0.00    0.00       1/1           main [2]
[5]      0.0    0.00    0.00       1         scheduleDownload [5]
                0.00    0.00       6/110496      data_start [3]
-----------------------------------------------

 This table describes the call tree of the program, and was sorted by
 the total amount of time spent in each function and its children.

 Each entry in this table consists of several lines.  The line with the
 index number at the left hand margin lists the current function.
 The lines above it list the functions that called this function,
 and the lines below it list the functions this one called.
 This line lists:
     index      A unique number given to each element of the table.
                Index numbers are sorted numerically.
                The index number is printed next to every function name so
                it is easier to look up where the function in the table.

     % time     This is the percentage of the `total' time that was spent
                in this function and its children.  Note that due to
                different viewpoints, functions excluded by options, etc,
                these numbers will NOT add up to 100%.

     self       This is the total amount of time spent in this function.

     children   This is the total amount of time propagated into this
                function by its children.

     called     This is the number of times the function was called.
                If the function called itself recursively, the number
                only includes non-recursive calls, and is followed by
                a `+' and the number of recursive calls.

     name       The name of the current function.  The index number is
                printed after it.  If the function is a member of a
                cycle, the cycle number is printed between the
                function's name and the index number.


 For the function's parents, the fields have the following meanings:

     self       This is the amount of time that was propagated directly
                from the function into this parent.

     children   This is the amount of time that was propagated from
                the function's children into this parent.

     called     This is the number of times this parent called the
                function `/' the total number of times the function
                was called.  Recursive calls to the function are not
                included in the number after the `/'.

     name       This is the name of the parent.  The parent's index
                number is printed after it.  If the parent is a
                member of a cycle, the cycle number is printed between
                the name and the index number.

 If the parents of the function cannot be determined, the word
 `<spontaneous>' is printed in the `name' field, and all the other
 fields are blank.

 For the function's children, the fields have the following meanings:

     self       This is the amount of time that was propagated directly
                from the child into the function.

     children   This is the amount of time that was propagated from the
                child's children to the function.

     called     This is the number of times the function called
                this child `/' the total number of times the child
                was called.  Recursive calls by the child are not
                listed in the number after the `/'.

     name       This is the name of the child.  The child's index
                number is printed after it.  If the child is a
                member of a cycle, the cycle number is printed
                between the name and the index number.

 If there are any cycles (circles) in the call graph, there is an
 entry for the cycle-as-a-whole.  This entry shows who called the
 cycle (as parents) and the members of the cycle (as children.)
 The `+' recursive calls entry shows the number of function calls that
 were internal to the cycle, and the calls entry for each member shows,
 for that member, how many times it was called from other members of
 the cycle.



Index by function name

   [3] data_start              [1] run (gnunet-download.c)
   [4] downloadFileHelper (gnunet-download.c) [5] scheduleDownload 
(gnunet-download.c)
$ gprof /usr/local/bin/gnunet-gtk
Flat profile:

Each sample counts as 0.01 seconds.
  %   cumulative   self              self     total
 time   seconds   seconds    calls  ms/call  ms/call  name
 76.93      0.10     0.10        4    25.00    25.00  displayStats
  7.69      0.11     0.01        1    10.00    10.00  doRefreshMenuSensitivity
  7.69      0.12     0.01        1    10.00    10.00  gtkDoneSaveCalls
  7.69      0.13     0.01                             modelCallback
  0.00      0.13     0.00    90796     0.00     0.00  data_start
  0.00      0.13     0.00     4596     0.00     0.00  gtkSaveCall
  0.00      0.13     0.00     4590     0.00     0.00  gtkSaveCallDone
  0.00      0.13     0.00       87     0.00     0.00  checkDaemonRunning
  0.00      0.13     0.00       64     0.00     0.00  refreshMenuSensitivity
  0.00      0.13     0.00       35     0.00     2.86  gtkRunSomeSaveCalls
  0.00      0.13     0.00        3     0.00     0.00  doInfoMessage
  0.00      0.13     0.00        3     0.00     0.00  infoMessage
  0.00      0.13     0.00        3     0.00     0.00  openSaveAs
  0.00      0.13     0.00        3     0.00     0.00  startDownload
  0.00      0.13     0.00        1     0.00     0.00  addToNotebook
  0.00      0.13     0.00        1     0.00     0.00  checkForDaemon
  0.00      0.13     0.00        1     0.00     0.00  doAddToNotebook
  0.00      0.13     0.00        1     0.00     0.00  doInitSearchResultList
  0.00      0.13     0.00        1     0.00     0.00  doneGTKStatistics
  0.00      0.13     0.00        1     0.00     0.00  getSearchWindow
  0.00      0.13     0.00        1     0.00     0.00  gtkInitSaveCalls
  0.00      0.13     0.00        1     0.00     0.00  initGTKStatistics
  0.00      0.13     0.00        1     0.00     0.00  makeMainWindow

 %         the percentage of the total running time of the
time       program used by this function.

cumulative a running sum of the number of seconds accounted
 seconds   for by this function and those listed above it.

 self      the number of seconds accounted for by this
seconds    function alone.  This is the major sort for this
           listing.

calls      the number of times this function was invoked, if
           this function is profiled, else blank.

 self      the average number of milliseconds spent in this
ms/call    function per call, if this function is profiled,
           else blank.

 total     the average number of milliseconds spent in this
ms/call    function and its descendents per call, if this
           function is profiled, else blank.

name       the name of the function.  This is the minor sort
           for this listing. The index shows the location of
           the function in the gprof listing. If the index is
           in parenthesis it shows where it would appear in
           the gprof listing if it were to be printed.


                     Call graph (explanation follows)


granularity: each sample hit covers 2 byte(s) for 7.69% of 0.13 seconds

index % time    self  children    called     name
                0.00    0.10      35/35          stopSearch [3]
[1]     76.9    0.00    0.10      35         gtkRunSomeSaveCalls [1]
                0.10    0.00       4/4           displayStats [2]
                0.00    0.00     113/90796       data_start [21]
-----------------------------------------------
                0.10    0.00       4/4           gtkRunSomeSaveCalls [1]
[2]     76.9    0.10    0.00       4         displayStats [2]
                0.00    0.00    4457/4590        gtkSaveCallDone [22]
-----------------------------------------------
                                                 <spontaneous>
[3]     76.9    0.00    0.10                 stopSearch [3]
                0.00    0.10      35/35          gtkRunSomeSaveCalls [1]
                0.00    0.00      71/90796       data_start [21]
-----------------------------------------------
                                                 <spontaneous>
[4]     15.2    0.01    0.01                 modelCallback [4]
                0.00    0.01    4458/4596        gtkSaveCall [6]
                0.00    0.00   38373/90796       data_start [21]
-----------------------------------------------
                                                 <spontaneous>
[5]      7.7    0.00    0.01                 main [5]
                0.01    0.00       1/1           gtkDoneSaveCalls [8]
                0.00    0.00       1/1           makeMainWindow [19]
                0.00    0.00      13/90796       data_start [21]
                0.00    0.00       1/1           initGTKStatistics [30]
                0.00    0.00       1/1           gtkInitSaveCalls [29]
                0.00    0.00       1/1           checkForDaemon [25]
                0.00    0.00       1/1           doneGTKStatistics [28]
-----------------------------------------------
                0.00    0.00       1/4596        makeMainWindow [19]
                0.00    0.00       1/4596        getSearchWindow [18]
                0.00    0.00       1/4596        addToNotebook [17]
                0.00    0.00       1/4596        cronCheckDaemon [20]
                0.00    0.00       3/4596        downloadFile_ [14]
                0.00    0.00       3/4596        infoMessage [11]
                0.00    0.00      64/4596        refreshMenuSensitivity [10]
                0.00    0.00      64/4596        displayResultGTK [9]
                0.00    0.01    4458/4596        modelCallback [4]
[6]      7.7    0.00    0.01    4596         gtkSaveCall [6]
                0.01    0.00       1/1           doRefreshMenuSensitivity [7]
                0.00    0.00   45910/90796       data_start [21]
                0.00    0.00       3/3           doInfoMessage [24]
                0.00    0.00       1/1           doAddToNotebook [26]
                0.00    0.00       1/1           doInitSearchResultList [27]
-----------------------------------------------
                0.01    0.00       1/1           gtkSaveCall [6]
[7]      7.7    0.01    0.00       1         doRefreshMenuSensitivity [7]
                0.00    0.00     390/90796       data_start [21]
                0.00    0.00      65/4590        gtkSaveCallDone [22]
-----------------------------------------------
                0.01    0.00       1/1           main [5]
[8]      7.7    0.01    0.00       1         gtkDoneSaveCalls [8]
                0.00    0.00       4/90796       data_start [21]
-----------------------------------------------
                                                 <spontaneous>
[9]      0.2    0.00    0.00                 displayResultGTK [9]
                0.00    0.00      64/4596        gtkSaveCall [6]
                0.00    0.00      64/64          refreshMenuSensitivity [10]
                0.00    0.00     768/90796       data_start [21]
-----------------------------------------------
                0.00    0.00      64/64          displayResultGTK [9]
[10]     0.1    0.00    0.00      64         refreshMenuSensitivity [10]
                0.00    0.00      64/4596        gtkSaveCall [6]
-----------------------------------------------
                0.00    0.00       3/3           startDownload [13]
[11]     0.0    0.00    0.00       3         infoMessage [11]
                0.00    0.00       3/4596        gtkSaveCall [6]
-----------------------------------------------
                0.00    0.00       3/3           downloadGTK [15]
[12]     0.0    0.00    0.00       3         openSaveAs [12]
                0.00    0.00       3/3           startDownload [13]
                0.00    0.00      36/90796       data_start [21]
-----------------------------------------------
                0.00    0.00       3/3           openSaveAs [12]
[13]     0.0    0.00    0.00       3         startDownload [13]
                0.00    0.00       3/3           infoMessage [11]
                0.00    0.00      42/90796       data_start [21]
-----------------------------------------------
                                                 <spontaneous>
[14]     0.0    0.00    0.00                 downloadFile_ [14]
                0.00    0.00       3/4596        gtkSaveCall [6]
                0.00    0.00      30/90796       data_start [21]
-----------------------------------------------
                                                 <spontaneous>
[15]     0.0    0.00    0.00                 downloadGTK [15]
                0.00    0.00       3/3           openSaveAs [12]
                0.00    0.00       3/90796       data_start [21]
-----------------------------------------------
                                                 <spontaneous>
[16]     0.0    0.00    0.00                 search [16]
                0.00    0.00       1/1           getSearchWindow [18]
                0.00    0.00       1/1           addToNotebook [17]
                0.00    0.00       2/90796       data_start [21]
-----------------------------------------------
                0.00    0.00       1/1           search [16]
[17]     0.0    0.00    0.00       1         addToNotebook [17]
                0.00    0.00       1/4596        gtkSaveCall [6]
-----------------------------------------------
                0.00    0.00       1/1           search [16]
[18]     0.0    0.00    0.00       1         getSearchWindow [18]
                0.00    0.00       1/4596        gtkSaveCall [6]
                0.00    0.00       5/90796       data_start [21]
-----------------------------------------------
                0.00    0.00       1/1           main [5]
[19]     0.0    0.00    0.00       1         makeMainWindow [19]
                0.00    0.00       1/4596        gtkSaveCall [6]
-----------------------------------------------
                                                 <spontaneous>
[20]     0.0    0.00    0.00                 cronCheckDaemon [20]
                0.00    0.00       1/4596        gtkSaveCall [6]
                0.00    0.00      86/87          checkDaemonRunning [23]
-----------------------------------------------
                0.00    0.00       1/90796       parseOptions [179]
                0.00    0.00       1/90796       initGTKStatistics [30]
                0.00    0.00       2/90796       search [16]
                0.00    0.00       2/90796       gtkInitSaveCalls [29]
                0.00    0.00       2/90796       doneGTKStatistics [28]
                0.00    0.00       3/90796       downloadGTK [15]
                0.00    0.00       3/90796       doUpdateMenus [97]
                0.00    0.00       4/90796       destroyMain [77]
                0.00    0.00       4/90796       gtkDoneSaveCalls [8]
                0.00    0.00       5/90796       getSearchWindow [18]
                0.00    0.00       5/90796       receiveResults_ [184]
                0.00    0.00       5/90796       stopSearch_ [218]
                0.00    0.00      13/90796       main [5]
                0.00    0.00      15/90796       abortSelectedDownloads [34]
                0.00    0.00      30/90796       downloadFile_ [14]
                0.00    0.00      36/90796       openSaveAs [12]
                0.00    0.00      42/90796       startDownload [13]
                0.00    0.00      61/90796       freeSearchList [109]
                0.00    0.00      71/90796       stopSearch [3]
                0.00    0.00     113/90796       gtkRunSomeSaveCalls [1]
                0.00    0.00     349/90796       checkDaemonRunning [23]
                0.00    0.00     390/90796       doRefreshMenuSensitivity [7]
                0.00    0.00     768/90796       displayResultGTK [9]
                0.00    0.00    4588/90796       gtkSaveCallDone [22]
                0.00    0.00   38373/90796       modelCallback [4]
                0.00    0.00   45910/90796       gtkSaveCall [6]
[21]     0.0    0.00    0.00   90796         data_start [21]
-----------------------------------------------
                0.00    0.00       1/4590        doInitSearchResultList [27]
                0.00    0.00       3/4590        disentangleFromCLIST [88]
                0.00    0.00      64/4590        doDisplayResult [95]
                0.00    0.00      65/4590        doRefreshMenuSensitivity [7]
                0.00    0.00    4457/4590        displayStats [2]
[22]     0.0    0.00    0.00    4590         gtkSaveCallDone [22]
                0.00    0.00    4588/90796       data_start [21]
-----------------------------------------------
                0.00    0.00       1/87          checkForDaemon [25]
                0.00    0.00      86/87          cronCheckDaemon [20]
[23]     0.0    0.00    0.00      87         checkDaemonRunning [23]
                0.00    0.00     349/90796       data_start [21]
-----------------------------------------------
                0.00    0.00       3/3           gtkSaveCall [6]
[24]     0.0    0.00    0.00       3         doInfoMessage [24]
-----------------------------------------------
                0.00    0.00       1/1           main [5]
[25]     0.0    0.00    0.00       1         checkForDaemon [25]
                0.00    0.00       1/87          checkDaemonRunning [23]
-----------------------------------------------
                0.00    0.00       1/1           gtkSaveCall [6]
[26]     0.0    0.00    0.00       1         doAddToNotebook [26]
-----------------------------------------------
                0.00    0.00       1/1           gtkSaveCall [6]
[27]     0.0    0.00    0.00       1         doInitSearchResultList [27]
                0.00    0.00       1/4590        gtkSaveCallDone [22]
-----------------------------------------------
                0.00    0.00       1/1           main [5]
[28]     0.0    0.00    0.00       1         doneGTKStatistics [28]
                0.00    0.00       2/90796       data_start [21]
-----------------------------------------------
                0.00    0.00       1/1           main [5]
[29]     0.0    0.00    0.00       1         gtkInitSaveCalls [29]
                0.00    0.00       2/90796       data_start [21]
-----------------------------------------------
                0.00    0.00       1/1           main [5]
[30]     0.0    0.00    0.00       1         initGTKStatistics [30]
                0.00    0.00       1/90796       data_start [21]
-----------------------------------------------

 This table describes the call tree of the program, and was sorted by
 the total amount of time spent in each function and its children.

 Each entry in this table consists of several lines.  The line with the
 index number at the left hand margin lists the current function.
 The lines above it list the functions that called this function,
 and the lines below it list the functions this one called.
 This line lists:
     index      A unique number given to each element of the table.
                Index numbers are sorted numerically.
                The index number is printed next to every function name so
                it is easier to look up where the function in the table.

     % time     This is the percentage of the `total' time that was spent
                in this function and its children.  Note that due to
                different viewpoints, functions excluded by options, etc,
                these numbers will NOT add up to 100%.

     self       This is the total amount of time spent in this function.

     children   This is the total amount of time propagated into this
                function by its children.

     called     This is the number of times the function was called.
                If the function called itself recursively, the number
                only includes non-recursive calls, and is followed by
                a `+' and the number of recursive calls.

     name       The name of the current function.  The index number is
                printed after it.  If the function is a member of a
                cycle, the cycle number is printed between the
                function's name and the index number.


 For the function's parents, the fields have the following meanings:

     self       This is the amount of time that was propagated directly
                from the function into this parent.

     children   This is the amount of time that was propagated from
                the function's children into this parent.

     called     This is the number of times this parent called the
                function `/' the total number of times the function
                was called.  Recursive calls to the function are not
                included in the number after the `/'.

     name       This is the name of the parent.  The parent's index
                number is printed after it.  If the parent is a
                member of a cycle, the cycle number is printed between
                the name and the index number.

 If the parents of the function cannot be determined, the word
 `<spontaneous>' is printed in the `name' field, and all the other
 fields are blank.

 For the function's children, the fields have the following meanings:

     self       This is the amount of time that was propagated directly
                from the child into the function.

     children   This is the amount of time that was propagated from the
                child's children to the function.

     called     This is the number of times the function called
                this child `/' the total number of times the child
                was called.  Recursive calls by the child are not
                listed in the number after the `/'.

     name       This is the name of the child.  The child's index
                number is printed after it.  If the child is a
                member of a cycle, the cycle number is printed
                between the name and the index number.

 If there are any cycles (circles) in the call graph, there is an
 entry for the cycle-as-a-whole.  This entry shows who called the
 cycle (as parents) and the members of the cycle (as children.)
 The `+' recursive calls entry shows the number of function calls that
 were internal to the cycle, and the calls entry for each member shows,
 for that member, how many times it was called from other members of
 the cycle.



Index by function name

  [17] addToNotebook           [7] doRefreshMenuSensitivity [11] infoMessage
  [23] checkDaemonRunning (helper.c) [28] doneGTKStatistics [30] 
initGTKStatistics
  [25] checkForDaemon         [18] getSearchWindow        [19] makeMainWindow 
(main.c)
  [21] data_start              [8] gtkDoneSaveCalls        [4] modelCallback 
(download.c)
   [2] displayStats (download.c) [29] gtkInitSaveCalls    [12] openSaveAs
  [26] doAddToNotebook         [1] gtkRunSomeSaveCalls    [10] 
refreshMenuSensitivity
  [24] doInfoMessage           [6] gtkSaveCall            [13] startDownload
  [27] doInitSearchResultList (search.c) [22] gtkSaveCallDone

reply via email to

[Prev in Thread] Current Thread [Next in Thread]