Windows용 Linux의 자동 완성 속도가 매우 느림

Windows용 Linux의 자동 완성 속도가 매우 느림

어떤 이유로 WSL의 자동 완성 기능은 매우 느립니다. 결과를 표시하는 데 항상 몇 초가 걸립니다(예: ll ~/Te<tab>2~3초 후에 인쇄 ll ~/Temp).

set -x원인을 찾아 사용해 보았지만 strace문제가 무엇인지 알 수 없습니다.

( set -x아래 출력 참조) 라인에서 멈췄다 + [[ ~/Te == \$* ]]가 다음에서 다시 멈춥니다.+ xspec=

사용하면 라인에서 strace일시 clone중지되고 실제로 해당 라인에서 소비된 약 1.4초를 표시합니다.

문제가 무엇인지 아시나요?

세트-x

+ _init_completion -s
+ local exclude= flag outx errx inx OPTIND=1
+ getopts n:e:o:i:s flag -s
+ case $flag in
+ split=false
+ exclude+==
+ getopts n:e:o:i:s flag -s
+ COMPREPLY=()
+ local 'redir=@(?([0-9])<|?([0-9&])>?(>)|>&)'
+ _get_comp_words_by_ref -n '=<>&' cur prev words cword
+ local exclude flag i OPTIND=1
+ words=()
+ local cur cword words
+ upargs=()
+ upvars=()
+ local upargs upvars vcur vcword vprev vwords
+ getopts c:i:n:p:w: flag -n '=<>&' cur prev words cword
+ case $flag in
+ exclude='=<>&'
+ getopts c:i:n:p:w: flag -n '=<>&' cur prev words cword
+ [[ 6 -ge 3 ]]
+ case ${!OPTIND} in
+ vcur=cur
+ let 'OPTIND += 1'
+ [[ 6 -ge 4 ]]
+ case ${!OPTIND} in
+ vprev=prev
+ let 'OPTIND += 1'
+ [[ 6 -ge 5 ]]
+ case ${!OPTIND} in
+ vwords=words
+ let 'OPTIND += 1'
+ [[ 6 -ge 6 ]]
+ case ${!OPTIND} in
+ vcword=cword
+ let 'OPTIND += 1'
+ [[ 6 -ge 7 ]]
+ __get_cword_at_cursor_by_ref '=<>&' words cword cur
+ words=()
+ local cword words
+ __reassemble_comp_words_by_ref '=<>&' words cword
+ local exclude i j line ref
+ [[ -n =<>& ]]
+ exclude='=<>&'
+ eval cword=1
++ cword=1
+ [[ -n =<>& ]]
+ line='./rsync_tmbackup.sh ~/Te'
+ (( i=0, j=0 ))
+ (( i < 2 ))
+ [[ 0 -gt 0 ]]
+ ref='words[0]'
+ eval 'words[0]=${!ref}${COMP_WORDS[i]}'
++ words[0]=./rsync_tmbackup.sh
+ line=' ~/Te'
+ [[ 0 == 1 ]]
+ (( i++, j++ ))
+ (( i < 2 ))
+ [[ 1 -gt 0 ]]
+ [[ ~/Te == +([=<>&]) ]]
+ ref='words[1]'
+ eval 'words[1]=${!ref}${COMP_WORDS[i]}'
++ words[1]='~/Te'
+ line=
+ [[ 1 == 1 ]]
+ eval cword=1
++ cword=1
+ (( i++, j++ ))
+ (( i < 2 ))
+ [[ 2 == 1 ]]
+ local i cur index=24 'lead=./rsync_tmbackup.sh ~/Te'
+ [[ 24 -gt 0 ]]
+ [[ -n ./rsync_tmbackup.sh ~/Te ]]
+ [[ -n ./rsync_tmbackup.sh~/Te ]]
+ cur='./rsync_tmbackup.sh ~/Te'
+ (( i = 0 ))
+ (( i <= cword ))
+ [[ 24 -ge 19 ]]
+ [[ ./rsync_tmbackup.sh != \.\/\r\s\y\n\c\_\t\m\b\a\c\k\u\p\.\s\h ]]
+ [[ 0 -lt 1 ]]
+ local old_size=24
+ cur=' ~/Te'
+ local new_size=5
+ index=5
+ (( ++i  ))
+ (( i <= cword ))
+ [[ 5 -ge 4 ]]
+ [[  ~/T != \~\/\T\e ]]
+ cur='~/Te'
+ (( index-- ))
+ [[ 4 -ge 4 ]]
+ [[ ~/Te != \~\/\T\e ]]
+ [[ 1 -lt 1 ]]
+ (( ++i  ))
+ (( i <= cword ))
+ [[ -n ~/Te ]]
+ [[ ! -n ~/Te ]]
+ [[ 4 -lt 0 ]]
+ local words cword cur
+ _upvars -a2 words ./rsync_tmbackup.sh '~/Te' -v cword 1 -v cur '~/Te'
+ ((  10  ))
+ ((  10  ))
+ case $1 in
+ [[ -n 2 ]]
+ printf %d 2
+ [[ -n words ]]
+ unset -v words
+ eval 'words=("${@:3:2}")'
++ words=("${@:3:2}")
+ shift 4
+ ((  6  ))
+ case $1 in
+ [[ -n cword ]]
+ unset -v cword
+ eval 'cword="$3"'
++ cword=1
+ shift 3
+ ((  3  ))
+ case $1 in
+ [[ -n cur ]]
+ unset -v cur
+ eval 'cur="$3"'
++ cur='~/Te'
+ shift 3
+ ((  0  ))
+ [[ -n cur ]]
+ upvars+=("$vcur")
+ upargs+=(-v $vcur "$cur")
+ [[ -n cword ]]
+ upvars+=("$vcword")
+ upargs+=(-v $vcword "$cword")
+ [[ -n prev ]]
+ [[ 1 -ge 1 ]]
+ upvars+=("$vprev")
+ upargs+=(-v $vprev "${words[cword - 1]}")
+ [[ -n words ]]
+ upvars+=("$vwords")
+ upargs+=(-a${#words[@]} $vwords "${words[@]}")
+ ((  4  ))
+ local cur cword prev words
+ _upvars -v cur '~/Te' -v cword 1 -v prev ./rsync_tmbackup.sh -a2 words ./rsync_tmbackup.sh '~/Te'
+ ((  13  ))
+ ((  13  ))
+ case $1 in
+ [[ -n cur ]]
+ unset -v cur
+ eval 'cur="$3"'
++ cur='~/Te'
+ shift 3
+ ((  10  ))
+ case $1 in
+ [[ -n cword ]]
+ unset -v cword
+ eval 'cword="$3"'
++ cword=1
+ shift 3
+ ((  7  ))
+ case $1 in
+ [[ -n prev ]]
+ unset -v prev
+ eval 'prev="$3"'
++ prev=./rsync_tmbackup.sh
+ shift 3
+ ((  4  ))
+ case $1 in
+ [[ -n 2 ]]
+ printf %d 2
+ [[ -n words ]]
+ unset -v words
+ eval 'words=("${@:3:2}")'
++ words=("${@:3:2}")
+ shift 4
+ ((  0  ))
+ _variables
+ [[ ~/Te =~ ^(\$\{?)([A-Za-z0-9_]*)$ ]]
+ return 1
+ [[ ~/Te == @(?([0-9])<|?([0-9&])>?(>)|>&)* ]]
+ [[ ./rsync_tmbackup.sh == @(?([0-9])<|?([0-9&])>?(>)|>&) ]]
+ local i skip
+ (( i=1 ))
+ (( i < 2 ))
+ [[ ~/Te == @(?([0-9])<|?([0-9&])>?(>)|>&)* ]]
+ i=2
+ (( 1 ))
+ (( i < 2 ))
+ [[ 1 -le 0 ]]
+ prev=./rsync_tmbackup.sh
+ [[ -n false ]]
+ _split_longopt
+ [[ ~/Te == --?*=* ]]
+ return 1
+ return 0
+ false
+ _filedir
+ local i 'IFS=
' xspec
+ _tilde '~/Te'
+ local result=0
+ [[ ~/Te == \~* ]]
+ [[ ~/Te != */* ]]
+ return 0
+ local -a toks
+ local quoted x tmp
+ _quote_readline_by_ref '~/Te' quoted
+ '[' -z '~/Te' ']'
+ [[ ~/Te == \'* ]]
+ [[ ~/Te == \~* ]]
+ printf -v quoted '~%q' /Te
+ [[ ~/Te == *\\* ]]
+ [[ ~/Te == \$* ]]
++ compgen -d -- '~/Te'
+ x='~/Temp'
+ read -r tmp
+ toks+=("$tmp")
+ read -r tmp
+ [[ '' != -d ]]
+ xspec=
++ compgen -f -X '' -- '~/Te'
+ x='~/Temp'
+ read -r tmp
+ toks+=("$tmp")
+ read -r tmp
+ [[ -n '' ]]
+ [[ 2 -ne 0 ]]
+ compopt -o filenames
+ COMPREPLY+=("${toks[@]}")
mp

추적 -T -f -s9999 -p31972

write(2, "\10\33[K", 4)                 = 4 <0.000098>
read(0, "\177", 1)                      = 1 <0.138708>
write(2, "\10\33[K", 4)                 = 4 <0.000326>
read(0, "\t", 1)                        = 1 <0.527121>
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0 <0.000017>
open(".", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3 <0.000082>
fstat(3, {st_mode=S_IFDIR|0777, st_size=4096, ...}) = 0 <0.000029>
brk(0x1130b000)                         = 0x1130b000 <0.000049>
getdents(3, /* d_reclen < sizeof(struct dirent) *//* 1 entries */, 32768) = 163 <0.000048>
getdents(3, /* 0 entries */, 32768)     = 0 <0.000021>
brk(0x112fb000)                         = 0x112fb000 <0.000031>
close(3)                                = 0 <0.000035>
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0 <0.000015>
open(".", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3 <0.000066>
fstat(3, {st_mode=S_IFDIR|0777, st_size=4096, ...}) = 0 <0.000023>
brk(0x1130b000)                         = 0x1130b000 <0.000038>
getdents(3, /* d_reclen < sizeof(struct dirent) *//* 1 entries */, 32768) = 163 <0.000039>
getdents(3, /* 0 entries */, 32768)     = 0 <0.000020>
brk(0x112fb000)                         = 0x112fb000 <0.000028>
close(3)                                = 0 <0.000033>
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0 <0.000014>
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0 <0.000014>
open("/dev/null", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3 <0.000053>
fcntl(1, F_GETFD)                       = 0 <0.000014>
fcntl(1, F_DUPFD, 10)                   = 10 <0.000024>
fcntl(1, F_GETFD)                       = 0 <0.000014>
fcntl(10, F_SETFD, FD_CLOEXEC)          = 0 <0.000015>
dup2(3, 1)                              = 1 <0.000026>
close(3)                                = 0 <0.000019>
fcntl(2, F_DUPFD, 10)                   = 11 <0.000023>
fcntl(2, F_GETFD)                       = 0 <0.000014>
fcntl(11, F_SETFD, FD_CLOEXEC)          = 0 <0.000014>
dup2(1, 2)                              = 2 <0.000025>
write(1, "2", 1)                        = 1 <0.000035>
dup2(11, 2)                             = 2 <0.000025>
fcntl(11, F_GETFD)                      = 0x1 (flags FD_CLOEXEC) <0.000014>
close(11)                               = 0 <0.000019>
dup2(10, 1)                             = 1 <0.000034>
fcntl(10, F_GETFD)                      = 0x1 (flags FD_CLOEXEC) <0.000014>
close(10)                               = 0 <0.000020>
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0 <0.000016>
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0 <0.000014>
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0 <0.000014>
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0 <0.000014>
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0 <0.000014>
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0 <0.000014>
open("/dev/null", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3 <0.000052>
fcntl(1, F_GETFD)                       = 0 <0.000014>
fcntl(1, F_DUPFD, 10)                   = 10 <0.000036>
fcntl(1, F_GETFD)                       = 0 <0.000014>
fcntl(10, F_SETFD, FD_CLOEXEC)          = 0 <0.000014>
dup2(3, 1)                              = 1 <0.000058>
close(3)                                = 0 <0.000019>
fcntl(2, F_DUPFD, 10)                   = 11 <0.000038>
fcntl(2, F_GETFD)                       = 0 <0.000013>
fcntl(11, F_SETFD, FD_CLOEXEC)          = 0 <0.000013>
dup2(1, 2)                              = 2 <0.000024>
write(1, "2", 1)                        = 1 <0.000025>
dup2(11, 2)                             = 2 <0.000024>
fcntl(11, F_GETFD)                      = 0x1 (flags FD_CLOEXEC) <0.000026>
close(11)                               = 0 <0.000037>
dup2(10, 1)                             = 1 <0.000041>
fcntl(10, F_GETFD)                      = 0x1 (flags FD_CLOEXEC) <0.000019>
close(10)                               = 0 <0.000020>
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0 <0.000016>
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0 <0.000016>
pipe([3, 4])                            = 0 <0.000050>
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0 <0.000019>
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 <0.000014>
rt_sigprocmask(SIG_BLOCK, [INT CHLD], [], 8) = 0 <0.000016>
pipe([5, 6])                            = 0 <0.000048>
clone(strace: Process 13930 attached
child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f98e14709d0) = 13930 <1.384199>
[pid 13930] rt_sigprocmask(SIG_SETMASK, [],  <unfinished ...>
[pid 31972] setpgid(13930, 31972 <unfinished ...>
[pid 13930] <... rt_sigprocmask resumed> NULL, 8) = 0 <0.000166>
[pid 31972] <... setpgid resumed> )     = 0 <0.000170>
[pid 13930] rt_sigaction(SIGTSTP, {SIG_IGN, [], SA_RESTORER, 0x7f98e0a254b0},  <unfinished ...>
[pid 31972] rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 <0.000015>
[pid 13930] <... rt_sigaction resumed> {SIG_IGN, [], SA_RESTORER, 0x7f98e0a254b0}, 8) = 0 <0.000185>
[pid 31972] rt_sigaction(SIGCHLD, {0x447ad0, [], SA_RESTORER|SA_RESTART, 0x7f98e0a254b0}, {0x447ad0, [], SA_RESTORER|SA_RESTART, 0x7f98e0a254b0}, 8) = 0 <0.000015>
[pid 13930] rt_sigaction(SIGTTIN, {SIG_IGN, [], SA_RESTORER, 0x7f98e0a254b0},  <unfinished ...>
[pid 31972] close(5 <unfinished ...>
[pid 13930] <... rt_sigaction resumed> {SIG_IGN, [], SA_RESTORER, 0x7f98e0a254b0}, 8) = 0 <0.000197>
[pid 31972] <... close resumed> )       = 0 <0.000212>
[pid 31972] close(6 <unfinished ...>
[pid 13930] rt_sigaction(SIGTTOU, {SIG_IGN, [], SA_RESTORER, 0x7f98e0a254b0},  <unfinished ...>
[pid 31972] <... close resumed> )       = 0 <0.000211>
[pid 31972] close(4 <unfinished ...>
[pid 13930] <... rt_sigaction resumed> {SIG_IGN, [], SA_RESTORER, 0x7f98e0a254b0}, 8) = 0 <0.000312>
[pid 31972] <... close resumed> )       = 0 <0.000203>
[pid 13930] setpgid(13930, 31972 <unfinished ...>
[pid 31972] read(3,  <unfinished ...>
[pid 13930] <... setpgid resumed> )     = 0 <0.000193>
[pid 13930] close(5)                    = 0 <0.000038>
[pid 13930] close(6)                    = 0 <0.000051>
[pid 13930] rt_sigaction(SIGINT, {SIG_DFL, [], SA_RESTORER, 0x7f98e0a254b0}, {0x4aceb0, [], SA_RESTORER, 0x7f98e0a254b0}, 8) = 0 <0.000015>
[pid 13930] rt_sigaction(SIGQUIT, {SIG_DFL, [], SA_RESTORER, 0x7f98e0a254b0}, {SIG_IGN, [], SA_RESTORER, 0x7f98e0a254b0}, 8) = 0 <0.000015>
[pid 13930] rt_sigaction(SIGTERM, {SIG_DFL, [], SA_RESTORER, 0x7f98e0a254b0}, {0x4aceb0, [], SA_RESTORER, 0x7f98e0a254b0}, 8) = 0 <0.000014>
[pid 13930] rt_sigaction(SIGCHLD, {SIG_DFL, [], SA_RESTORER|SA_RESTART, 0x7f98e0a254b0}, {0x447ad0, [], SA_RESTORER|SA_RESTART, 0x7f98e0a254b0}, 8) = 0 <0.000014>
[pid 13930] rt_sigaction(SIGCHLD, {0x447ad0, [], SA_RESTORER|SA_RESTART, 0x7f98e0a254b0}, {SIG_DFL, [], SA_RESTORER|SA_RESTART, 0x7f98e0a254b0}, 8) = 0 <0.000014>
[pid 13930] rt_sigaction(SIGINT, {0x45f790, [], SA_RESTORER, 0x7f98e0a254b0}, {SIG_DFL, [], SA_RESTORER, 0x7f98e0a254b0}, 8) = 0 <0.000018>
[pid 13930] dup2(4, 1)                  = 1 <0.000026>
[pid 13930] close(4)                    = 0 <0.000017>
[pid 13930] close(3)                    = 0 <0.000018>
[pid 13930] rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 <0.000013>
[pid 13930] stat("/home", {st_mode=S_IFDIR|0755, st_size=512, ...}) = 0 <0.000045>
[pid 13930] stat("/home/laurent", {st_mode=S_IFDIR|0755, st_size=512, ...}) = 0 <0.000047>
[pid 13930] open("/home/laurent/", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3 <0.000174>
[pid 13930] fstat(3, {st_mode=S_IFDIR|0755, st_size=512, ...}) = 0 <0.000018>
[pid 13930] brk(0x1130b000)             = 0x1130b000 <0.000036>
[pid 13930] getdents(3, /* d_reclen < sizeof(struct dirent) *//* 1 entries */, 32768) = 1055 <0.000041>
[pid 13930] getdents(3, /* 0 entries */, 32768) = 0 <0.000031>
[pid 13930] brk(0x112fb000)             = 0x112fb000 <0.000043>
[pid 13930] close(3)                    = 0 <0.000041>
[pid 13930] stat("/home/laurent/Temp", {st_mode=S_IFDIR|0777, st_size=4096, ...}) = 0 <0.000114>
[pid 13930] write(1, "~/Temp\n", 7)     = 7 <0.000030>
[pid 31972] <... read resumed> "~/Temp\n", 128) = 7 <0.004531>
[pid 31972] read(3,  <unfinished ...>
[pid 13930] exit_group(0)               = ?
[pid 31972] <... read resumed> "", 128) = 0 <0.000208>
[pid 31972] --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=13930, si_uid=1000, si_status=0, si_utime=0, si_stime=0} ---
[pid 13930] +++ exited with 0 +++
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WNOHANG|WSTOPPED|WCONTINUED, NULL) = 13930 <0.000015>
wait4(-1, 0x7fffc3fb8170, WNOHANG|WSTOPPED|WCONTINUED, NULL) = -1 ECHILD (No child processes) <0.000017>
rt_sigreturn({mask=[]})                 = 0 <0.000021>
close(3)                                = 0 <0.000039>
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0 <0.000014>
rt_sigprocmask(SIG_BLOCK, [CHLD TSTP TTIN TTOU], [CHLD], 8) = 0 <0.000017>
ioctl(255, TIOCSPGRP, [31972])          = 0 <0.000022>
rt_sigprocmask(SIG_SETMASK, [CHLD], NULL, 8) = 0 <0.000014>
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 <0.000017>
time(NULL)                              = 1496570476 <0.000013>
open("/tmp/sh-thd-1052277775701132528", O_WRONLY|O_CREAT|O_EXCL|O_TRUNC, 0600) = 3 <0.000451>
write(3, "~/Temp", 6)                   = 6 <0.000093>
write(3, "\n", 1)                       = 1 <0.000051>
open("/tmp/sh-thd-1052277775701132528", O_RDONLY) = 4 <0.000979>
close(3)                                = 0 <0.000057>
unlink("/tmp/sh-thd-1052277775701132528") = 0 <0.000328>
fcntl(0, F_GETFD)                       = 0 <0.000019>
fcntl(0, F_DUPFD, 10)                   = 10 <0.000028>
fcntl(0, F_GETFD)                       = 0 <0.000017>
fcntl(10, F_SETFD, FD_CLOEXEC)          = 0 <0.000019>
dup2(4, 0)                              = 0 <0.000036>
close(4)                                = 0 <0.000025>
ioctl(0, TCGETS, 0x7fffc3fb88f0)        = -1 ENOTTY (Inappropriate ioctl for device) <0.000040>
lseek(0, 0, SEEK_CUR)                   = 0 <0.000018>
read(0, "~/Temp\n", 128)                = 7 <0.000043>
ioctl(0, TCGETS, 0x7fffc3fb88f0)        = -1 ENOTTY (Inappropriate ioctl for device) <0.000015>
lseek(0, 0, SEEK_CUR)                   = 7 <0.000015>
read(0, "", 128)                        = 0 <0.000028>
dup2(10, 0)                             = 0 <0.000135>
fcntl(10, F_GETFD)                      = 0x1 (flags FD_CLOEXEC) <0.000019>
close(10)                               = 0 <0.000020>
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0 <0.000014>
pipe([3, 4])                            = 0 <0.000049>
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0 <0.000018>
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 <0.000016>
rt_sigprocmask(SIG_BLOCK, [INT CHLD], [], 8) = 0 <0.000014>
pipe([5, 6])                            = 0 <0.000065>
clone(strace: Process 13931 attached
child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f98e14709d0) = 13931 <1.379717>
[pid 13931] rt_sigprocmask(SIG_SETMASK, [],  <unfinished ...>
[pid 31972] setpgid(13931, 31972 <unfinished ...>
[pid 13931] <... rt_sigprocmask resumed> NULL, 8) = 0 <0.000206>
[pid 31972] <... setpgid resumed> )     = 0 <0.000197>
[pid 13931] rt_sigaction(SIGTSTP, {SIG_IGN, [], SA_RESTORER, 0x7f98e0a254b0},  <unfinished ...>
[pid 31972] rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 <0.000018>
[pid 13931] <... rt_sigaction resumed> {SIG_IGN, [], SA_RESTORER, 0x7f98e0a254b0}, 8) = 0 <0.000193>
[pid 31972] rt_sigaction(SIGCHLD, {0x447ad0, [], SA_RESTORER|SA_RESTART, 0x7f98e0a254b0}, {0x447ad0, [], SA_RESTORER|SA_RESTART, 0x7f98e0a254b0}, 8) = 0 <0.000016>
[pid 31972] close(5 <unfinished ...>
[pid 13931] rt_sigaction(SIGTTIN, {SIG_IGN, [], SA_RESTORER, 0x7f98e0a254b0},  <unfinished ...>
[pid 31972] <... close resumed> )       = 0 <0.000164>
[pid 31972] close(6 <unfinished ...>
[pid 13931] <... rt_sigaction resumed> {SIG_IGN, [], SA_RESTORER, 0x7f98e0a254b0}, 8) = 0 <0.000236>
[pid 31972] <... close resumed> )       = 0 <0.000160>
[pid 31972] close(4 <unfinished ...>
[pid 13931] rt_sigaction(SIGTTOU, {SIG_IGN, [], SA_RESTORER, 0x7f98e0a254b0},  <unfinished ...>
[pid 31972] <... close resumed> )       = 0 <0.000128>
[pid 31972] read(3,  <unfinished ...>
[pid 13931] <... rt_sigaction resumed> {SIG_IGN, [], SA_RESTORER, 0x7f98e0a254b0}, 8) = 0 <0.000199>
[pid 13931] setpgid(13931, 31972)       = 0 <0.000021>
[pid 13931] close(5)                    = 0 <0.000024>
[pid 13931] close(6)                    = 0 <0.000033>
[pid 13931] rt_sigaction(SIGINT, {SIG_DFL, [], SA_RESTORER, 0x7f98e0a254b0}, {0x4aceb0, [], SA_RESTORER, 0x7f98e0a254b0}, 8) = 0 <0.000017>
[pid 13931] rt_sigaction(SIGQUIT, {SIG_DFL, [], SA_RESTORER, 0x7f98e0a254b0}, {SIG_IGN, [], SA_RESTORER, 0x7f98e0a254b0}, 8) = 0 <0.000017>
[pid 13931] rt_sigaction(SIGTERM, {SIG_DFL, [], SA_RESTORER, 0x7f98e0a254b0}, {0x4aceb0, [], SA_RESTORER, 0x7f98e0a254b0}, 8) = 0 <0.000014>
[pid 13931] rt_sigaction(SIGCHLD, {SIG_DFL, [], SA_RESTORER|SA_RESTART, 0x7f98e0a254b0}, {0x447ad0, [], SA_RESTORER|SA_RESTART, 0x7f98e0a254b0}, 8) = 0 <0.000016>
[pid 13931] rt_sigaction(SIGCHLD, {0x447ad0, [], SA_RESTORER|SA_RESTART, 0x7f98e0a254b0}, {SIG_DFL, [], SA_RESTORER|SA_RESTART, 0x7f98e0a254b0}, 8) = 0 <0.000019>
[pid 13931] rt_sigaction(SIGINT, {0x45f790, [], SA_RESTORER, 0x7f98e0a254b0}, {SIG_DFL, [], SA_RESTORER, 0x7f98e0a254b0}, 8) = 0 <0.000014>
[pid 13931] dup2(4, 1)                  = 1 <0.000028>
[pid 13931] close(4)                    = 0 <0.000020>
[pid 13931] close(3)                    = 0 <0.000021>
[pid 13931] rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 <0.000019>
[pid 13931] stat("/home", {st_mode=S_IFDIR|0755, st_size=512, ...}) = 0 <0.000048>
[pid 13931] stat("/home/laurent", {st_mode=S_IFDIR|0755, st_size=512, ...}) = 0 <0.000046>
[pid 13931] open("/home/laurent/", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3 <0.000181>
[pid 13931] fstat(3, {st_mode=S_IFDIR|0755, st_size=512, ...}) = 0 <0.000020>
[pid 13931] brk(0x1130b000)             = 0x1130b000 <0.000040>
[pid 13931] getdents(3, /* d_reclen < sizeof(struct dirent) *//* 1 entries */, 32768) = 1055 <0.000039>
[pid 13931] getdents(3, /* 0 entries */, 32768) = 0 <0.000034>
[pid 13931] brk(0x112fb000)             = 0x112fb000 <0.000036>
[pid 13931] close(3)                    = 0 <0.000054>
[pid 13931] write(1, "~/Temp\n", 7 <unfinished ...>
[pid 31972] <... read resumed> "~/Temp\n", 128) = 7 <0.004304>
[pid 13931] <... write resumed> )       = 7 <0.000231>
[pid 31972] read(3,  <unfinished ...>
[pid 13931] exit_group(0)               = ?
[pid 31972] <... read resumed> "", 128) = 0 <0.000281>
[pid 31972] --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=13931, si_uid=1000, si_status=0, si_utime=0, si_stime=0} ---
[pid 13931] +++ exited with 0 +++
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WNOHANG|WSTOPPED|WCONTINUED, NULL) = 13931 <0.000020>
wait4(-1, 0x7fffc3fb8090, WNOHANG|WSTOPPED|WCONTINUED, NULL) = -1 ECHILD (No child processes) <0.000023>
rt_sigreturn({mask=[]})                 = 0 <0.000026>
close(3)                                = 0 <0.000048>
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0 <0.000028>
rt_sigprocmask(SIG_BLOCK, [CHLD TSTP TTIN TTOU], [CHLD], 8) = 0 <0.000035>
ioctl(255, TIOCSPGRP, [31972])          = 0 <0.000039>
rt_sigprocmask(SIG_SETMASK, [CHLD], NULL, 8) = 0 <0.000024>
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 <0.000020>
time(NULL)                              = 1496570477 <0.000039>
open("/tmp/sh-thd-2104555551446992382", O_WRONLY|O_CREAT|O_EXCL|O_TRUNC, 0600) = 3 <0.000467>
write(3, "~/Temp", 6)                   = 6 <0.000106>
write(3, "\n", 1)                       = 1 <0.000062>
open("/tmp/sh-thd-2104555551446992382", O_RDONLY) = 4 <0.000707>
close(3)                                = 0 <0.000050>
unlink("/tmp/sh-thd-2104555551446992382") = 0 <0.000295>
fcntl(0, F_GETFD)                       = 0 <0.000018>
fcntl(0, F_DUPFD, 10)                   = 10 <0.000025>
fcntl(0, F_GETFD)                       = 0 <0.000014>
fcntl(10, F_SETFD, FD_CLOEXEC)          = 0 <0.000019>
dup2(4, 0)                              = 0 <0.000031>
close(4)                                = 0 <0.000024>
ioctl(0, TCGETS, 0x7fffc3fb8810)        = -1 ENOTTY (Inappropriate ioctl for device) <0.000019>
lseek(0, 0, SEEK_CUR)                   = 0 <0.000015>
read(0, "~/Temp\n", 128)                = 7 <0.000042>
ioctl(0, TCGETS, 0x7fffc3fb8810)        = -1 ENOTTY (Inappropriate ioctl for device) <0.000017>
lseek(0, 0, SEEK_CUR)                   = 7 <0.000014>
read(0, "", 128)                        = 0 <0.000028>
dup2(10, 0)                             = 0 <0.000120>
fcntl(10, F_GETFD)                      = 0x1 (flags FD_CLOEXEC) <0.000014>
close(10)                               = 0 <0.000019>
open("/dev/null", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3 <0.000057>
fcntl(2, F_GETFD)                       = 0 <0.000017>
fcntl(2, F_DUPFD, 10)                   = 10 <0.000027>
fcntl(2, F_GETFD)                       = 0 <0.000017>
fcntl(10, F_SETFD, FD_CLOEXEC)          = 0 <0.000017>
dup2(3, 2)                              = 2 <0.000031>
close(3)                                = 0 <0.000024>
dup2(10, 2)                             = 2 <0.000038>
fcntl(10, F_GETFD)                      = 0x1 (flags FD_CLOEXEC) <0.000017>
close(10)                               = 0 <0.000025>
stat("~/Temp", 0x7fffc3fb9a80)          = -1 ENOENT (No such file or directory) <0.000070>
stat("/home", {st_mode=S_IFDIR|0755, st_size=512, ...}) = 0 <0.000050>
stat("/home/laurent", {st_mode=S_IFDIR|0755, st_size=512, ...}) = 0 <0.000041>
stat("/home/laurent/Temp", {st_mode=S_IFDIR|0777, st_size=4096, ...}) = 0 <0.000130>
lstat("/home/laurent/Temp", {st_mode=S_IFLNK|0777, st_size=11, ...}) = 0 <0.000038>
stat("/home/laurent/Temp", {st_mode=S_IFDIR|0777, st_size=4096, ...}) = 0 <0.000104>
write(2, "mp", 2)                       = 2 <0.000056>
read(0,

답변1

PATH 변수를 확인하세요. 내 항목에는 다음과 같은 Windows의 많은 항목이 포함되어 있습니다.

...:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0:...

WINDOWS중복된 항목을 제거하세요. 여기에는 경로가 필요하지 않습니다 . 내 것 같아야 해

export PATH=/home/bebbo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

그리고 연기도 훌륭해요.

추신: 왜 사용합니까?

sudo updatedb

돕다? 한동안 인터넷 주식의 영향력과 속도가 빨라졌기 때문이다.

답변2

https://wpdev.uservoice.com/forums/266908-command-prompt-console-windows-subsystem-for-l/suggestions/13386252-filesystem-slow-compared-with-native-ubuntu-system

우리는 다음 버전의 Windows에서 파일 시스템 성능을 개선하고 후속 버전에서 더 심층적인 변경을 적용하기 위해 열심히 노력하고 있습니다.

2018년 2월부터 느린 FS는 버그로 인정되었으며 앞으로 더 나아질 것이라고 약속합니다. 하지만 분명히 Windows도 변경해야 합니다.

2019년 중반부터 그들은 WSL의 문제를 해결하려는 시도를 포기했으며 WSL2는 더 높은 성능을 제공하는 (가벼운) 가상 머신을 제공할 것입니다.

답변3

최신 Windows 업데이트 2020-04를 적용한 후cmd.exe

wsl --upgrade <DistributionName>

시간이 좀 걸립니다. 이 작업이 완료되면 파일 시스템이 더 빨라집니다.

관련 정보