Bug 1376531

Summary: /usr/libexec/upowerd concumes significant amount of CPU resources
Product: [Fedora] Fedora Reporter: Tomasz Kłoczko <kloczko.tomasz>
Component: upowerAssignee: Richard Hughes <rhughes>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: rhughes
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-30 20:19:13 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Tomasz Kłoczko 2016-09-15 16:09:52 UTC
Description of problem:

I found that in last couple of days I see quite often upowerd on top of CPU consuming processes. Top line from top output:



  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND                                                                                              
 2470 root      20   0  422208   9216   7784 S  85.7  0.1   8:30.34 /usr/libexec/upowerd                               

I made short test for about 5 seconds:

$ sudo strace -c -p 2470
strace: Process 2470 attached
^Cstrace: Process 2470 detached
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
 90.35    0.030299           2     12607           getrusage
  2.60    0.000872          10        88           select
  2.22    0.000745           8        90           sendto
  1.84    0.000617           7        88           recvfrom
  0.97    0.000325          14        23           connect
  0.90    0.000302          10        29           close
  0.60    0.000201           7        29         6 stat
  0.49    0.000163           7        23           socket
  0.01    0.000004           1         7           futex
  0.01    0.000002           0         7           fstat
  0.00    0.000001           0        14           read
  0.00    0.000001           0         6           poll
  0.00    0.000001           0         3           access
  0.00    0.000001           1         1           restart_syscall
  0.00    0.000000           0         2           write
  0.00    0.000000           0         9         2 open
------ ----------- ----------- --------- --------- ----------------
100.00    0.033534                 13026         8 total

12k getrusage() calls in about 5-6s really does not look good.

Comment 1 Tomasz Kłoczko 2016-11-30 20:19:13 UTC
Closing as I cannot reproduce this effect on current rawhide.