On 2020/4/27 16:54, Abby Spurdle wrote:> What's the benchmark?I don't have any benchmark about this problem.> > I (still) have Windows 10 x64. > Opening the task manager, causes the CPU to jump to over 90%.It will drop to about 0.5% or below very quickly.> > In regards to the CPU usage remaining high: > (1) Are you running R in a standard way?TRUE. I closed all applications, and run the R using Rgui on Windows 10 x64.> (2) If (1) true, is R idle (i.e. waiting for user input)?TRUE.> (3) If (2) true, how much CPU is R using?0%.> (4) If (3) is zero, what processes are using the CPU the most?In such case, almost every processes is using the CPU in a very low percentage, i.e., 1% or below. I don't recognized those processes. Now, I invoke help.start(), about 25% of CPU loading is used by R. Quit from R, the CPU loading go back to idle.> > If (1) is false, it's not R's fault. > If (1) is true and (2) is false, then I don't know, that would be interesting... > If (1) and (2) are true and (3) is high, then that would be a bug in R. > > If (4) is processes other than R, it's also not R's fault. > But if you provide information, someone here maybe able to offer advise... >Thanks for those suggestions. Best, Jinsong> > On Mon, Apr 27, 2020 at 7:51 PM Jinsong Zhao <jszhao at yeah.net> wrote: >> >> Hi there, >> >> After calling help.start(), I noticed that CPU loading is up to about >> 25% (my CPU is core i5 with 4 core). In the out html page, if I click >> "Packages", the CPU loading may be up to 75% or much higher. After >> closing the browser, the CPU loading does not drop. >> >> If I just use ?plot to open a specific help page, the CPU loading is not >> change dramatically. However, if I click the package name (base or >> graphics package in this example) in the help page to open the index >> page of the corresponding package, then the CPU loading will increase to >> more than 75%. >> >> I do not know if this phenomenon could be reproduced... And I do not >> know how to trace the detailed information. >> >> Best, >> Jinsonng >> >> > sessionInfo() >> R version 4.0.0 (2020-04-24) >> Platform: x86_64-w64-mingw32/x64 (64-bit) >> Running under: Windows 10 x64 (build 18363) >> >> Matrix products: default >> >> locale: >> [1] LC_COLLATE=Chinese (Simplified)_China.936 >> [2] LC_CTYPE=Chinese (Simplified)_China.936 >> [3] LC_MONETARY=Chinese (Simplified)_China.936 >> [4] LC_NUMERIC=C >> [5] LC_TIME=Chinese (Simplified)_China.936 >> >> attached base packages: >> [1] stats graphics grDevices utils datasets methods base >> >> loaded via a namespace (and not attached): >> [1] compiler_4.0.0 tools_4.0.0
> > (3) If (2) true, how much CPU is R using? > 0%.> > (4) If (3) is zero, what processes are using the CPU the most? > In such case, almost every processes is using the CPU in a very low > percentage, i.e., 1% or below. I don't recognized those processes. > Now, I invoke help.start(), about 25% of CPU loading is used by R. Quit > from R, the CPU loading go back to idle.Is R using 0% or 25%? Again, if R was using 25% while showing the prompt and waiting for user input, that would be a bug in R. Or do you mean R is using 0% and total CPU usage *temporarily* increases 25% *while* R is running? If so, this could be the result of some security feature...? not sure because this is outside my area... I just found the following feature. If you open powershell, one can run: ps | sort -desc cpu This could be used if you want to show people what's happening. PS C:\Users\spurdle> ps | sort -desc cpu Handles NPM(K) PM(K) WS(K) CPU(s) Id SI ProcessName ------- ------ ----- ----- ------ -- -- ----------- 625 28 108940 111644 4,900.52 8176 0 audiodg 794 38 234888 177924 62.13 8652 19 chrome 1673 71 84372 147628 61.97 10304 19 chrome 330 25 100096 146968 55.80 1052 19 chrome 391 26 141928 181264 35.27 6884 19 chrome 291 20 46676 80472 15.25 5352 19 chrome 2351 79 58404 107276 13.33 6940 19 explorer 443 22 17916 34764 12.17 7196 19 chrome 1331 90 107628 87596 10.86 9432 19 SearchUI 671 41 56184 70320 9.94 10420 19 powershell 362 24 51984 91568 9.06 4360 19 chrome 1129 107 206988 31852 7.17 6740 19 SkypeApp 696 40 26764 45620 5.33 4348 19 Lenovo.Modern.ImController.PluginHost.Device 256 20 56860 84372 5.17 1660 19 chrome 284 18 34532 62112 5.13 1212 19 chrome 291 19 7048 16360 4.30 1476 19 chrome Diverging, I can't figure out how to permanently stop Lenovo and Skype processes, or why chrome (and edge) need so many copies of themselves... Anyway, the plan is to shift to Debian or OpenIndianna, and run ReactOS via virtualization...
Just realized CPU(s) is time the process was running.
On 2020/4/28 3:40, Abby Spurdle wrote:>>> (3) If (2) true, how much CPU is R using? >> 0%. > >>> (4) If (3) is zero, what processes are using the CPU the most? >> In such case, almost every processes is using the CPU in a very low >> percentage, i.e., 1% or below. I don't recognized those processes. >> Now, I invoke help.start(), about 25% of CPU loading is used by R. Quit >> from R, the CPU loading go back to idle. > > Is R using 0% or 25%? > > Again, if R was using 25% while showing the prompt and waiting for > user input, that would be a bug in R.25% CPU is used by R. And R shows the prompt and waits for user input. Here is a report of the CPU usage by Rgui from Windows command line: C:\Users\Jinso>typeperf "\Process(Rgui)\% Processor Time" -si 5 .... "04/28/2020 13:31:05.895","-1" "04/28/2020 13:31:10.915","0.622494" "04/28/2020 13:31:15.925","0.000000" "04/28/2020 13:31:20.935","0.000000" "04/28/2020 13:31:25.945","0.000000" "04/28/2020 13:31:30.965","2.801177" "04/28/2020 13:31:35.975","37.418638" "04/28/2020 13:31:40.982","100.159072" "04/28/2020 13:31:45.987","99.887614" "04/28/2020 13:31:50.992","99.899896" "04/28/2020 13:31:55.999","119.270784" "04/28/2020 13:32:01.002","299.014789" "04/28/2020 13:32:06.007","299.666184" "04/28/2020 13:32:11.015","294.905707" "04/28/2020 13:32:16.019","299.755921" "04/28/2020 13:32:21.025","299.924392" "04/28/2020 13:32:26.030","296.594191" "04/28/2020 13:32:31.048","298.195791" "04/28/2020 13:32:36.054","292.362986" "04/28/2020 13:32:41.064","292.503832" "04/28/2020 13:32:46.068","301.650976" ... ... At about 10", I start Rgui, the CPU usage is about 0.5~1% (The second column number may be divided by 4). At about 35", I call help.start() from menu of Rgui, you may notice that CPU usage increased to about 25%. At about 55", I click on the ``Packages'' link in the browser. The CPU usage increased to about 70-75%, and closing browser does not have any effects on the CPU usage of R.> > Or do you mean R is using 0% and total CPU usage *temporarily* > increases 25% *while* R is running? > If so, this could be the result of some security feature...? not sure > because this is outside my area... > > I just found the following feature. > If you open powershell, one can run: ps | sort -desc cpu > > This could be used if you want to show people what's happening. > > PS C:\Users\spurdle> ps | sort -desc cpu > > Handles NPM(K) PM(K) WS(K) CPU(s) Id SI ProcessName > ------- ------ ----- ----- ------ -- -- ----------- > 625 28 108940 111644 4,900.52 8176 0 audiodg > 794 38 234888 177924 62.13 8652 19 chrome > 1673 71 84372 147628 61.97 10304 19 chrome > 330 25 100096 146968 55.80 1052 19 chrome > 391 26 141928 181264 35.27 6884 19 chrome > 291 20 46676 80472 15.25 5352 19 chrome > 2351 79 58404 107276 13.33 6940 19 explorer > 443 22 17916 34764 12.17 7196 19 chrome > 1331 90 107628 87596 10.86 9432 19 SearchUI > 671 41 56184 70320 9.94 10420 19 powershell > 362 24 51984 91568 9.06 4360 19 chrome > 1129 107 206988 31852 7.17 6740 19 SkypeApp > 696 40 26764 45620 5.33 4348 19 > Lenovo.Modern.ImController.PluginHost.Device > 256 20 56860 84372 5.17 1660 19 chrome > 284 18 34532 62112 5.13 1212 19 chrome > 291 19 7048 16360 4.30 1476 19 chrome > > Diverging, I can't figure out how to permanently stop Lenovo and Skype > processes, or why chrome (and edge) need so many copies of > themselves... > Anyway, the plan is to shift to Debian or OpenIndianna, and run > ReactOS via virtualization... >