#3524 100% CPU used by /usr/share/webmin/blue-theme/right.cgi

1.490
closed-fixed
5
2009-10-27
2009-10-25
Anonymous
No

Webmin 1.493 on Ubuntu 8.03 takes several minutes to complete displaying the System Information screen. It freezes after displaying the "Time on system" (so before "Kernel and CPU"), and the right.cgi script uses 100% CPU.
This did not happen prior to the update to 1.493

Discussion

1 2 > >> (Page 1 of 2)
  • Jamie Cameron

    Jamie Cameron - 2009-10-25

    Does this happen every time the right frame is loaded, or just the first time?

    Webmin 1.493 add display of available package updates to the right frame, but this should be cached to prevent high CPU load every time..

     
  • Nobody/Anonymous

    Jamie... Suggestion: Since the "System Information" page appears to be locked up when the '/usr/bin/python /usr/bin/yum info' process is running to get the packages, can the page post a 'please wait... collecting Software Package' information.

    Another possible suggestion: Possible configuration setting to disable the running of this process on the "System Information" page. On older machines (read slow) and/or slow Internet connections, this may take many minutes. Because of that delay, most users don't know/understand why the page is 'locked-up'.

     
  • Nobody/Anonymous

    Final comment on this new featue: I do see that you did install a caching feature from 1.492 to 1.493. However, the first time it is run on 'System Information', the delay can be long, esp without the end-user understanding why. Need something to stop them from hitting STOP in browser or a message saying that someone truly is happening and this first time they should be patient (or be able to change a configuration to disable the "Software Update" info on the System Information page.

    Side note: Even though this is the first/second iteration of the Software Update feature, it is very handy and cool. THANKS!

     
  • ryates

    ryates - 2009-10-26

    jcameron wrote: "Does this happen every time the right frame is loaded, or just the first time?"

    On Debian Lenny, the delay happens every time the right frame is loaded. I checked that caching is enabled under "Module Config" for "Software Package Updates". "Software Package Updates" itself displays a slight delay in appearing. BTW, it does not matter whether "aptitude" or "apt-get" is deployed.

    Small (obliquely related bug): "aptitude" is misspelled "aptitute" on "Module Config" for module "Software Packages".

    Software Package Updates is a very welcome feature - thanks,
    ryts

     
  • Jamie Cameron

    Jamie Cameron - 2009-10-27

    Thanks, I see now .. the next Webmin release will include several optimizations to make this page faster, including caching in advance.

    Also, you will be able to turn off display of package updates completely at Webmin -> Webmin Configuration -> Background Status Collection.

     
  • Jamie Cameron

    Jamie Cameron - 2009-10-27
    • status: open --> closed-fixed
     
  • Nobody/Anonymous

    Same problem, same OS, same Webmin version.

    Disabling the "Collect available package updates?" option worked well, thank you. It would be good to have an option to poll for package updates every X minutes though, as per the system status option above.

    Thank you.

     
  • Jamie Cameron

    Jamie Cameron - 2009-11-07

    You can also enable background polling on that same page ..

     
  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2010-01-27

    Hi Jamie,

    I do have the same problem. loading up the index page takes forever.
    looking in system info the load is 100% cpu. after searching some more i found out that the "yum info" command (triggerd by the collect info script) is retrieving a enourmous list of packages. this is deu to some enormous extra yum repo's are installed and enabled. yum info lists every package in all repo's in my case that list is more than 300.000 packages long. disabling those extra repo's reduced the time the load spike lasts, and reduces the load to acceptable levels. in my case it takes the yum info command (on putty terminal) abount 20 minutes...

    Greets Chaot_s

     
  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2010-01-27

    forgot the system details:

    Operating system CentOS Linux 5.4
    Webmin version 1.500
    Virtualmin version 3.75.gpl GPL
    Theme version 7.5
    Kernel and CPU Linux 2.6.18-164.6.1.el5 on i686

     
    Last edit: Anonymous 2015-10-09
  • Jamie Cameron

    Jamie Cameron - 2010-01-27

    In case I didn't mention, Webmin 1.510 will fix this bug..

     
  • E71

    E71 - 2010-03-08

    Running Webmin 1.510 on CentOS 5.4 x64. Still slow. Disabled package update collection option. Still slow. :(

     
  • Jamie Cameron

    Jamie Cameron - 2010-03-09

    If you run "top" when it is slow, what process does it showing using up the most CPU time?

     
  • E71

    E71 - 2010-09-21

    Webmin 1.520 on CentOS 5.5 x86_64

    It still takes over 30 seconds for the 'System Information' page to fully load despite disabling the 'Collect available package updates' option...

    Am I alone on this?

     
  • E71

    E71 - 2010-09-21

    Sorry jcameron, I just saw your question.

    While the 'System Information' page is loading, this is what I get from top.

    Ordered by Time:

    19448 nsclient 15 0 778m 269m 2852 S 0.0 6.8 372:53.85 python26
    243 root 10 -5 0 0 0 S 0.0 0.0 14:37.13 kswapd0
    2230 named 25 0 225m 6144 2000 S 0.0 0.2 7:48.26 named
    1558 root 10 -5 0 0 0 S 0.0 0.0 6:35.74 xfsdatad/1
    2627 root 15 0 29152 664 456 S 0.0 0.0 1:43.65 apcupsd

    Ordered by CPU:

    23613 root 18 0 96760 29m 2268 S 2.0 0.7 0:01.38 miniserv.pl
    22647 root 15 0 12740 1160 844 R 0.3 0.0 0:04.40 top
    23738 root 18 0 18376 1496 1236 D 0.3 0.0 0:00.01 smartctl
    1 root 15 0 10348 684 576 S 0.0 0.0 0:01.70 init

    Does this help? Let me know if there's anything else you need.

    Thanks.

     
  • E71

    E71 - 2010-09-21

    Forgot to mention that the process 'miniserv.pl' shoots up to 30-40% CPU usage the first second or two when the System Information page starts loading.

    It then goes down to around 1-3%.

    kernel: 2.6.18-194.3.1.el5
    processor: amd x2 4800+ (s939)
    memory: 4gb
    os drive: wd siliconedge blue 64gb ssd

     
  • Jamie Cameron

    Jamie Cameron - 2010-09-21

    So during the majority of the time when the page is loading, is there any process using up a lot of CPU time?

     
  • E71

    E71 - 2010-09-26

    Sorry I'm not entirely sure how to check this. CPU Time == Time column on TOP output, right? If not, how do I find out?

     
  • Jamie Cameron

    Jamie Cameron - 2010-09-26

    Yes, just running top and checking the %CPU column is the best way to see which process is using up the most CPU time.

     
  • E71

    E71 - 2010-09-26

    Top output shows miniserv.pl as using the most. There's a few other processes using less than 1% CPU.

    When the loading of the System Information page begins:
    miniserv.pl (26.2% CPU time)
    top (0.7% CPU time)

    A few seconds later:
    miniserv.pl (1.0% CPU time) -- fluctuates between 1.0 and 3.0% until page finishes loading.
    smartctl (0.7% CPU time)
    top (0.3% CPU time)

    In other words, as far as I can tell, there are no other processes taking up much CPU time.

     
  • Jamie Cameron

    Jamie Cameron - 2010-09-26

    So it doesn't look like the page is stuck waiting for Webmin to perform some CPU-intensive operation then, which used to be the case with older versions.

    If you run the command :

    pstree -l -p `cat /var/webmin/miniserv.pid `

    when the page is stuck, what does it output? This will show which sub-processes Webmin is waiting on.

     
  • Nobody/Anonymous

    Before loading the page:
    [root@files ~]# pstree -l -p `cat /var/webmin/miniserv.pid`
    miniserv.pl(21792)

    While page is loading:
    [root@files ~]# pstree -l -p `cat /var/webmin/miniserv.pid`
    miniserv.pl(21792)âââminiserv.pl(26947)âââsh(26969)âââsmartctl(26970)

    After page has finished loading:
    [root@files ~]# pstree -l -p `cat /var/webmin/miniserv.pid`
    miniserv.pl(21792)âââminiserv.pl(26947)

     
  • Jamie Cameron

    Jamie Cameron - 2010-09-27

    Ok, looks like the smartctl command is taking a long time ..

    Try adding the line :

    collect_notemp=1

    to /etc/webmin/system-status/config

    And see if that helps.

     
  • Nobody/Anonymous

    That fixed it! Thank you so much!

    I've got to make a note of it somewhere so I don't forget with future deployments.

     
  • Jamie Cameron

    Jamie Cameron - 2010-09-27

    It may actually be hardware-specific, as usually the smartctl command is pretty quick..

     
1 2 > >> (Page 1 of 2)

Log in to post a comment.