A few months ago tmux made a jump in CPU utilization. At the time I didn't have the BW to spend any time on this so I ignored it.
Now that it's been happening for some time, I have no idea what may have changed at that time to cause this.

It does only happen when I use tmux in conjunction with powerline. I originally filed a powerline bug: powerline/powerline#1564 and they referred me to tmux.
If I run with -v, I see a lot of these in the log:
1459979040.179888 got 105 from client 25
1459979040.179891 got 105 from client 25
1459979040.179894 got 105 from client 25
1459979040.179898 got 105 from client 25
1459979040.179901 got 105 from client 25
Taking a stab in the dark and grepping for powerline in the log, I see a lot of these:
1459979135.823895 format 'env "$POWERLINE_COMMAND" $POWERLINE_COMMAND_ARGS tmux right -R pane_id="tmux display -p "#D"" --width=tmux display -p "#{client_width}" -R width_adjust=tmux show-options -g status-left-length | cut -d" " -f 2' -> 'env "$POWERLINE_COMMAND" $POWERLINE_COMMAND_ARGS tmux right -R pane_id="tmux display -p "%4"" --width=tmux display -p "277" -R width_adjust=tmux show-options -g status-left-length | cut -d" " -f 2'
1459979135.823912 format '#(env "$POWERLINE_COMMAND" $POWERLINE_COMMAND_ARGS tmux right -R pane_id="tmux display -p "#D"" --width=tmux display -p "#{client_width}" -R width_adjust=tmux show-options -g status-left-length | cut -d" " -f 2)' -> '#[fg=colour233,bg=default,nobold,noitalics,nounderscore]\302\240\356\202\262#[fg=colour247,bg=colour233,nobold,noitalics,nounderscore]\302\240\342\207\221\302\240\302\2407d\302\2406h\302\24055m#[fg=colour241,bg=colour233,nobold,noitalics,nounderscore]\302\240\356\202\263#[fg=colour2,bg=colour233,nobold,noitalics,nounderscore]\302\2402.8\302\240#[fg=colour2,bg=colour233,nobold,noitalics,nounderscore]3.2\302\240#[fg=colour2,bg=colour233,nobold,noitalics,nounderscore]3.3#[fg=colour236,bg=colour233,nobold,noitalics,nounderscore]\302\240\356\202\262#[fg=colour247,bg=colour236,nobold,noitalics,nounderscore]\302\2402016-04-06#[fg=colour241,bg=colour236,nobold,noitalics,nounderscore]\302\240\356\202\263#[fg=colour252,bg=colour236,bold,noitalics,nounderscore]\302\240\342\214\232\302\24014:45#[fg=colour252,bg=colour236,nobold,noitalics,nounderscore]\302\240\356\202\262#[fg=colour16,bg=colour252,bold,noitalics,nounderscore]\302\240\356\202\242\302\240tmac.local\302\240'
Here's my comment-stripped .tmux.conf:
set-option -g prefix unbind-key C-b bind-key C-a last-window bind-key last-window
bind-key a send-prefix
set -g set-remain-on-exit on
bind C-r respawn-pane
bind R respawn-window
bind-key F11 set-option -g prefix C-a
bind-key F12 set-option -g prefix `
set -g base-index 1
setw -g pane-base-index 1
set -g xterm-keys on
set -g mouse-utf8 on
set -g mouse on
bind m
set -g mouse on ;
display 'Mouse: ON'
bind M
set -g mouse off ;
display 'Mouse: OFF'
setw -g mode-keys vi
setw -g monitor-activity on
set -g default-command "reattach-to-user-namespace -l ${SHELL}"
set -g default-terminal "screen-256color"
setw -g aggressive-resize on
TMROOT=$GIT_ROOT/server/content/sdk
SESSION=b-ct
HIST_ID=$SESSION.main
new -n $SESSION -s $SESSION
neww -n content "cd $TMROOT/; HIST_ID=$SESSION.content tmux.sh -l $SHELL"
neww -n parser-v4 "cd $TMROOT/content-parser-v4; HIST_ID=$SESSION.parser-v4 tmux.sh -l $SHELL"
neww -n cm "cd $TMROOT/content-manager; HIST_ID=$SESSION.cm tmux.sh -l $SHELL"
neww -n cb "cd $TMROOT/content-builder; HIST_ID=$SESSION.cb tmux.sh -l $SHELL"
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-pain-control'
set -g @plugin 'tmux-plugins/tmux-sessionist'
set -g @plugin 'tmux-plugins/tmux-copycat'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-logging'
run '~/.tmux/plugins/tpm/tpm'
The above "tmux.sh" is a symlink:
/Users/bedge/bin/tmux.sh -> /usr/local/bin/reattach-to-user-namespace
ie: Just a way to get the osx copy/paste stuff working again.
The end of my .zshrc has this:
USER_PYTHON_LIB=/Users/bedge/Library/Python/2.7/lib/python/site-packages
if [[ "$TMUX" ]] && [[ -f ${USER_PYTHON_LIB}/powerline/bindings/tmux/powerline.conf ]]; then
tmux source "${USER_PYTHON_LIB}/powerline/bindings/tmux/powerline.conf"
fi
A post I found detailed this as the "right way" to configure tmux & powerline in osx.
Although, this is not what I had originally it did get it working again after I rolled everything to current versions before posting this.
This in .tmux.conf doesn't appear to work anymore:
source /Users/bedge/Library/Python/2.7/lib/python/site-packages/powerline/bindings/tmux/powerline.conf
Here's the powerline & version info:
%C> pip show powerline-status
Metadata-Version: 2.0
Name: powerline-status
Version: 2.3
Summary: The ultimate statusline/prompt utility.
Home-page: https://github.com/powerline/powerline
Author: Kim Silkebaekken
Author-email: kim.silkebaekken+vim@gmail.com
Installer: pip
%C> brew info tmux
tmux: stable 2.1 (bottled), HEAD
Terminal multiplexer
https://tmux.github.io/
/usr/local/Cellar/tmux/1.9a (16 files, 599.2K)
Poured from bottle
/usr/local/Cellar/tmux/2.0 (16 files, 620.6K)
Poured from bottle
/usr/local/Cellar/tmux/2.1 (15 files, 648.8K) *
Poured from bottle
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/tmux.rb
I expect it's the result of a mixture of old & new config & tooling. It's hard to know where to draw the line in what to include as tmux tends to infiltrate some pretty convoluted setups.
Anyway, let me know if I've missed anything vital, or if just need to RTFM.
A few months ago tmux made a jump in CPU utilization. At the time I didn't have the BW to spend any time on this so I ignored it.
Now that it's been happening for some time, I have no idea what may have changed at that time to cause this.
It does only happen when I use tmux in conjunction with powerline. I originally filed a powerline bug: powerline/powerline#1564 and they referred me to tmux.
If I run with -v, I see a lot of these in the log:
Taking a stab in the dark and grepping for powerline in the log, I see a lot of these:
Here's my comment-stripped .tmux.conf:
The above "tmux.sh" is a symlink:
The end of my .zshrc has this:
A post I found detailed this as the "right way" to configure tmux & powerline in osx.
Although, this is not what I had originally it did get it working again after I rolled everything to current versions before posting this.
This in .tmux.conf doesn't appear to work anymore:
Here's the powerline & version info:
I expect it's the result of a mixture of old & new config & tooling. It's hard to know where to draw the line in what to include as tmux tends to infiltrate some pretty convoluted setups.
Anyway, let me know if I've missed anything vital, or if just need to RTFM.