term seems to lag for a split second every two or three seconds

Bug #386546 reported by Chris Galardi
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
byobu
Fix Released
Low
Unassigned

Bug Description

The default byobu seems to cause the session to lag every one or two seconds on CentOS 5.3 over ssh, and Linux Mint 6 locally. You can test this by just starting screen and holding down a key. As it repeats you'll notice it pause every once and a while. It's pretty annoying when scrolling in text editors and the like.

Also, I've replaced the scripts in the bin/ directory with ones that are compatible with Mac OS 10.5.7 on my personal machine and am experiencing the same problem. I've found that the pauses get less apparent when you disable the entire hardstatusline, so I think there must be something causing them to lag.

Related branches

Revision history for this message
Ciemon Dunville (ciemon) wrote :

Chris,

Can you confirm where byobu is running, at the server end, or locally, or both? Also, which version of byobu are you using?

Can you carry out a few tests for the team:

1. Without using screen, or byobu, can you ssh into the server and try to see if you get the lag when scrolling.
2. Using screen at the server, repeat the test checking for lag.
3. Using byobu at the server, again repeat the test.

This will help to determine where the issue is.

Thanks

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

Also, can you tell us which status notifications you are running when you experience this?
 $ cat ~/.byobu/status

Can you try turning off all status notifications, and see if you experience the same lag? F9->Toggle status and turn each one off.

I suspect poor performance of one of the 2-second notifications.

:-Dustin

Changed in byobu:
status: New → Confirmed
importance: Undecided → Low
Changed in byobu:
status: Confirmed → Fix Committed
Revision history for this message
Chris Galardi (ixplode) wrote :

I dunno if this is the right place to put this, but I also found that doing `cat /proc/loadavg | awk -F" " '{print $4}'` executes almost twice as fast as ${ls -d /proc/[0-9]* 2>/dev/null|wc -l} for getting process count.

The fourth field in /proc/loadavg gives the number of currently running processes and the total number of processes separated by a '/'.

Revision history for this message
Dustin Kirkland  (kirkland) wrote : Re: [Bug 386546] Re: term seems to lag for a split second every two or three seconds

Hi Chris-

I really like your thinking.

However, that number doesn't match what I'm getting from in counting
processes from the process table, or counting numbered directories in
/proc.

Does it match for you?

:-Dustin

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

I'm finding this pretty efficient:
ls -d /proc/[0-9]* 2>/dev/null| wc -l

:-Dustin

Revision history for this message
Chris Galardi (ixplode) wrote :

I'm not actually sure why the numbers are different, but all the documents I can find about proc/loadavg say that it shows the current running process and the total processes.

Anyway, while the difference is small ( your way gets sys 0.016s - 0.020s vs my way's sys 0.010s - 0.012s on my machine ) it could potentially add up when a bunch of other calls are being run by screen every second.

I honestly don't think most of these files in the usr/lib/byobu directory are whats weighing down performance. /Although/ now that I think about it, you should have a look at sysctl -a, because there is a huge amount of information that can be printed out about the system by simply using `sysctl -n <key>` which removes the need to do expensive greps and regexes entirely in some situations. I mean, you can get very detailed information about the cdrom drive, or the swap file, for example.

Another reason this may be preferable is that it would be easier to make portable between BSD and Linux, as all you'd need to do is change the key instead of the path name and regex.

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

Good idea, about sysctl -n.

Can you give some real suggestions?

:-Dustin

Changed in byobu:
status: Fix Committed → Fix Released
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.