pass is 15x slower on one machine than another. How to debug?
Ryan Lue
lists at ryanlue.com
Mon Feb 18 02:43:21 CET 2019
>>> Hi,
>>>
>>> Suddenly, pass is v. slow on my desktop.
>>>
>>> $ time pass ls
>>>
>>> shows 0.6s on my desktop vs. 0.04s on my laptop.
>>> Both are comparably specced and running
>>> nearly identical installations of Debian buster.
>>>
>>> This only began a week or so ago, but for the life of me,
>>> I can’t figure out what change caused it.
>>>
>>> Any suggestions re: how to debug this performance issue?
>>>
>>> —Ryan
>>>
>>> P.S. Thanks for an amazing utility.
>>> _______________________________________________
>>> Password-Store mailing list
>>> Password-Store at lists.zx2c4.com
>>> https://lists.zx2c4.com/mailman/listinfo/password-store
>> Interesting, problem. I would suggest looking at running perf:
>> ``perf stat -d pass ls``
>> Or try using perf record the attempt, then use perf report to analyze
>> it. While perf has its limitations it is likely to work on your Debian
>> machine out of the box.
>> Aside from that perhaps even using strace to see what is being done and
>> could be failing or taking in in an attempt to do something. Problems
>> like this are usually pretty fun to dig into, and will usually be very
>> insightful into your system.
>> Without more information or data I don't think we could give you
>> anything to fix the issue you are having (maybe someone else knows more
>> than me though!).
>>
>> Good luck
>> -Kevin
>>
>> _______________________________________________
>> Password-Store mailing list
>> Password-Store at lists.zx2c4.com
>> https://lists.zx2c4.com/mailman/listinfo/password-store
> Perhaps running pass directly with bash -x (it shows the whole execution
> flow) could be helpful, combined with perf.
>
> Cheers!
>
> On 2/15/19 3:34 PM, Kevin Faulkner wrote:
>
> --
> HacKan || Iván
> GPG: 0x35710D312FDE468B
>
> _______________________________________________
> Password-Store mailing list
> Password-Store at lists.zx2c4.com
> https://lists.zx2c4.com/mailman/listinfo/password-store
Thanks for the suggestions.
Here’s the output of perf in a `bash -x` session.
(From what I can tell, the bulk of the output from the -x flag
is for two plugins I use, direnv and tmux-git.
FWIW, these are both also installed on my laptop, where pass runs way faster.)
$ perf stat -d pass ls
+ perf stat -d pass ls
Password Store
├── [redacted]
...
Performance counter stats for 'pass ls':
572.73 msec task-clock # 1.006 CPUs utilized
51 context-switches # 89.161 M/sec
6 cpu-migrations # 10.490 M/sec
10,540 page-faults # 18426.573 M/sec
1,468,509,401 cycles # 2567324.128 GHz (48.02%)
2,020,963,274 instructions # 1.38 insn per cycle (60.65%)
459,226,959 branches # 802844333.916 M/sec (75.00%)
14,503,153 branch-misses # 3.16% of all branches (75.75%)
644,024,031 L1-dcache-loads # 1125916138.112 M/sec (69.60%)
21,528,339 L1-dcache-load-misses # 3.34% of all L1-dcache hits (24.21%)
5,777,864 LLC-loads # 10101160.839 M/sec (24.15%)
430,711 LLC-load-misses # 7.45% of all LL-cache hits (35.99%)
0.569333694 seconds time elapsed
0.535859000 seconds user
0.038507000 seconds sys
++ _direnv_hook
++ local previous_exit_status=0
+++ /usr/bin/direnv export bash
++ eval ''
++ return 0
++ update_tmux
++++ pwd
+++ readlink -e /home/rlue/.config
++ CWD=/home/rlue/.config/
++ LASTREPO_LEN=19
++ [[ -n /home/rlue/.config/ ]]
++ '[' /home/rlue/.config/ = /home/rlue/.config/ ']'
++ GIT_REPO=/home/rlue/.config/
++ find_git_branch /home/rlue/.config/
++ head='ref: refs/heads/master'
++ [[ ref: refs/heads/master == ref:\ refs/heads/* ]]
++ GIT_BRANCH=master
++ find_git_stash /home/rlue/.config/
++ '[' -e /home/rlue/.config//.git/refs/stash ']'
++ GIT_STASH=
++ find_git_dirty
+++ git status --porcelain
++ local 'status= M .profile M .tmux.conf M mutt/mailcap'
++ [[ M .profile M .tmux.conf M mutt/mailcap != '' ]]
++ GIT_DIRTY='*'
++ GIT_FLAGS=($GIT_STASH)
++ TMUX_STATUS_DEFINITION
+++ basename /home/rlue/.config/
++ TMUX_STATUS='#[fg=green].config#[fg=white]::#[fg=blue]master '
++ '[' 0 -gt 0 ']'
++ '[' '*' = '*' ']'
+++ echo '#[fg=green].config#[fg=white]::#[fg=blue]master '
+++ sed s/=green/=red/
+++ sed s/=blue/=brightred/
++ TMUX_STATUS='#[fg=red].config#[fg=white]::#[fg=brightred]master '
++ tmux set-window-option status-left '#[fg=red].config#[fg=white]::#[fg=brightred]master'
—Ryan
More information about the Password-Store
mailing list