byobu-status causes high cpu usage / system load

Bug #823581 reported by Michael Rooney
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
byobu (Ubuntu)
Fix Released
High
Dustin Kirkland 

Bug Description

Hello! We are using Ubuntu 11.04 on EC2 (ami-1aad5273 from Canonical), and setting "byobu_by_default: system" via cloud-init. Logging in, byobu launches, but the system becomes unresponsive for long periods of time. After looking in top, I see byobu-status is the culprit, taking up most of the CPU and making the machine not even SSHable, leaving us with a load average of about 3 on a single CPU machine. I tried chmod -x'ing byobu-status, but this only seemed to make things work, perhaps it is attempting to call it infinitely until it succeeds?

We aren't customizing anything with screen / byobu as far as I know! I found https://answers.launchpad.net/ubuntu/+source/byobu/+question/153434 though it was unanswered so I'm not sure if it is related. Any help would be GREATLY appreciated, and let me know what debugging info I can provide. Thanks :D

Revision history for this message
Michael Rooney (mrooney) wrote :

We spun up a few boxes in an attempt to reproduce this, and could. Everything is fine with one user on the system, but as soon as we get 2+ users, byobu-status will start intermittently eating CPU. Here is a screenshot of top if it is of any use (at this time top/byobu was completely unresponsive for 5-10 seconds until byobu-status stopped).

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Hey Michael,

We've reworked byobu-status pretty extensively for 11.10 (Oneiric), reducing the number of process forks by hundreds.

Could you try:
 $ sudo apt-add-repository ppa:byobu/ppa
 $ sudo apt-get update
 $ sudo apt-get install byobu

And retry your test (with a couple of simultaneous users)? I'm hoping the newer version is less resource intensive on your system. When you post your results, please post your byobu -v too.

Thanks!
:-Dustin

Changed in byobu (Ubuntu):
importance: Undecided → High
status: New → In Progress
assignee: nobody → Dustin Kirkland (kirkland)
status: In Progress → Incomplete
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Also, after you've tested that, try running byobu in quiet mode. You can toggle that with 'byobu-quiet' and 'byobu-quiet --undo'.

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Just looked at your screenshot, Michael. Something else is definitely wrong, though, if that one byobu-status process is taking 45% CPU. Can you reproduce this easily?

Changed in byobu (Ubuntu):
status: Incomplete → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package byobu - 4.29-0ubuntu1

---------------
byobu (4.29-0ubuntu1) oneiric; urgency=low

  * usr/bin/byobu:
    - clean up the backend determination a little
  * usr/share/man/man1/Makefile.am:
    - install some missing manpages
  * usr/share/byobu/profiles/common:
    - check raid once per minute
  * usr/share/byobu/profiles/common:
    - back and forth, back and forth on this color issue;
      the previous version looked terrible (too bold) on stock
      Ubuntu/gnome-terminal
  * usr/bin/byobu-janitor, usr/share/byobu/profiles/common: LP: #823581
    - when a status item is disabled, remove the backtick command entirely
      from the current screen configuration; this *drastically* reduces
      the number of no-op byobu-status calls (60+ per minute, per session)
 -- Dustin Kirkland <email address hidden> Wed, 10 Aug 2011 18:24:27 -0500

Changed in byobu (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Partial fix in bzr r1583, should help.

A more complete improvement would involve modifying byobu-status to cache output in tmpfs, which would allow sessions owned by the same user to share the calculated values (expiring them as necessary). Would not be secure to share values from one user to another (as one user could poison the other user's status).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.