KDE에서 일부 프로그램을 실행하고 아무것도 하지 않으면 여전히 Xorg와 Plasmashell이 각각 CPU 코어의 약 11%를 차지합니다. kwin_x11
6%가 더 필요합니다. 다른 백그라운드 작업과 함께 유휴 상태에서 총 시스템 로드의 12% 영역에 도달했습니다. 이는 내 노트북의 팬이 최저 수준으로 떨어지지 않는다는 것을 의미합니다.
겉보기에 아무 일도 일어나지 않는데 이 부하를 일으키는 원인이 무엇인지 어떻게 알 수 있습니까?
스트레스
Xorg의 strace
저는 루트로 접속 strace
해서 Xorg
약 3초간 실행시켰습니다. 이번에는 8273줄의 출력을 검색했습니다. 이는 다음 블록과 중복된 것으로 보입니다.
strace: Process 1255 attached
strace: [ Process PID=1255 runs in x32 mode. ]
strace: [ Process PID=1255 runs in 64 bit mode. ]
writev(58, [{iov_base="Z\3Mg\37+\7\2\"+\7\2\2\235z\0\0\0\0\0008\4\200\7\200\7\0\0008\4\200\7", iov_len=32}], 1) = 32
ioctl(24, DRM_IOCTL_I915_GEM_EXECBUFFER2, 0x7ffd622230e0) = 0
ioctl(24, DRM_IOCTL_I915_GEM_THROTTLE or DRM_IOCTL_RADEON_CP_RESUME, 0) = 0
ioctl(24, DRM_IOCTL_I915_GEM_MADVISE, 0x7ffd62223034) = 0
ioctl(24, DRM_IOCTL_I915_GEM_BUSY, 0x7ffd62222fd0) = 0
ioctl(24, DRM_IOCTL_I915_GEM_MADVISE, 0x7ffd62223040) = 0
getpid() = 1255
epoll_wait(3, [{EPOLLIN, {u32=48152672, u64=48152672}}], 256, 630) = 1
setitimer(ITIMER_REAL, {it_interval={tv_sec=0, tv_usec=5000}, it_value={tv_sec=0, tv_usec=5000}}, NULL) = 0
recvmsg(56, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\224\2\6\0\347_\305\1\16\0\300\1\0\0\0\0\200\0078\4\0\36 \224\4\4\0\347_\305\1"..., iov_len=16384}], msg_iovlen=1, msg_control=[{cmsg_len=24, cmsg_level=SOL_SOCKET, cmsg_type=SCM_RIGHTS, cmsg_data=[106, 107]}], msg_controllen=24, msg_flags=0}, 0) = 40
ioctl(24, DRM_IOCTL_PRIME_FD_TO_HANDLE, 0x7ffd62223f3c) = 0
lseek(106, 0, SEEK_END) = 8388608
ioctl(24, DRM_IOCTL_I915_GEM_GET_TILING, 0x7ffd62223f70) = 0
getpid() = 1255
close(106) = 0
fcntl(107, F_DUPFD_CLOEXEC, 2048) = -1 EINVAL (Invalid argument)
mmap(NULL, 4, PROT_READ|PROT_WRITE, MAP_SHARED, 107, 0) = 0x7fca1cb29000
recvmsg(56, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
setitimer(ITIMER_REAL, {it_interval={tv_sec=0, tv_usec=0}, it_value={tv_sec=0, tv_usec=0}}, NULL) = 0
epoll_wait(3, [{EPOLLIN, {u32=48152672, u64=48152672}}], 256, 627) = 1
setitimer(ITIMER_REAL, {it_interval={tv_sec=0, tv_usec=5000}, it_value={tv_sec=0, tv_usec=5000}}, NULL) = 0
recvmsg(56, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\223\1\22\0\16\0\300\1\347_\305\1\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., iov_len=16384}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 80
ioctl(24, DRM_IOCTL_WAIT_VBLANK, 0x7ffd62224110) = 0
ioctl(24, DRM_IOCTL_WAIT_VBLANK, 0x7ffd62224050) = 0
ioctl(24, DRM_IOCTL_WAIT_VBLANK, 0x7ffd622240f0) = 0
writev(56, [{iov_base="\1 \313\322\0\0\0\0\1\1\0\0\0\0\0\0008\4\200\7\0\0\0\0\0\0\0\0\0\0\0\0", iov_len=32}], 1) = 32
recvmsg(56, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
setitimer(ITIMER_REAL, {it_interval={tv_sec=0, tv_usec=0}, it_value={tv_sec=0, tv_usec=0}}, NULL) = 0
epoll_wait(3, [{EPOLLIN, {u32=48175088, u64=48175088}}, {EPOLLIN, {u32=59512640, u64=59512640}}, {EPOLLIN, {u32=39795904, u64=39795904}}], 256, 623) = 3
read(24, "\1\0\0\0 \0\0\0\21\334\10\0\0\0\0\0c\37\0\0\346\36\t\0\232u\4\0\0\0\0\0", 1024) = 32
ioctl(24, DRM_IOCTL_GEM_CLOSE, 0x7ffd62222928) = 0
아래에서는 출력을 정렬하고 고유한 행(2341)만 가져왔습니다. 그런 다음 사람들이 무슨 일이 일어나고 있는지에 대한 개요를 볼 수 있도록 숫자 또는 문자열 매개변수만 다른 줄을 제거했습니다.
close(106) = 0
close(107) = 0
epoll_wait(3, [], 256, 0) = 0
epoll_wait(3, [{EPOLLIN, {u32=39795904, u64=39795904}}], 256, 0) = 1
epoll_wait(3, [{EPOLLIN, {u32=39795904, u64=39795904}}, {EPOLLIN, {u32=44232592, u64=44232592}}], 256, 299613) = 2
epoll_wait(3, [{EPOLLIN, {u32=39795904, u64=39795904}}, {EPOLLIN, {u32=44232592, u64=44232592}}, {EPOLLIN, {u32=48152672, u64=48152672}}], 256, 0) = 3
epoll_wait(3, [{EPOLLIN, {u32=44232592, u64=44232592}}, {EPOLLIN, {u32=39795904, u64=39795904}}, {EPOLLIN, {u32=59512640, u64=59512640}}, {EPOLLIN, {u32=48167840, u64=48167840}}, {EPOLLIN, {u32=48298384, u64=48298384}}, {EPOLLIN, {u32=48175088, u64=48175088}}], 256, 0) = 6
fcntl(107, F_DUPFD_CLOEXEC, 2048) = -1 EINVAL (Invalid argument)
getpid() = 1255
ioctl(24, DRM_IOCTL_GEM_CLOSE, 0x7ffd62222928) = 0
ioctl(24, DRM_IOCTL_I915_GEM_BUSY, 0x7ffd62222fd0) = 0
ioctl(24, DRM_IOCTL_I915_GEM_CREATE, 0x7ffd62223800) = 0
ioctl(24, DRM_IOCTL_I915_GEM_EXECBUFFER2, 0x7ffd622230e0) = 0
ioctl(24, DRM_IOCTL_I915_GEM_GET_TILING, 0x7ffd62223f70) = 0
ioctl(24, DRM_IOCTL_I915_GEM_MADVISE, 0x7ffd62222b84) = 0
ioctl(24, DRM_IOCTL_I915_GEM_PWRITE, 0x7ffd62223820) = 0
ioctl(24, DRM_IOCTL_I915_GEM_SET_DOMAIN, 0x7ffd622237f4) = 0
ioctl(24, DRM_IOCTL_I915_GEM_THROTTLE or DRM_IOCTL_RADEON_CP_RESUME, 0) = 0
ioctl(24, DRM_IOCTL_I915_GEM_THROTTLE or DRM_IOCTL_RADEON_CP_RESUME, 0) = ? ERESTARTSYS (To be restarted if SA_RESTART is set)
ioctl(24, DRM_IOCTL_MODE_DIRTYFB, 0x7ffd622240b0) = 0
ioctl(24, DRM_IOCTL_MODE_SETGAMMA, 0x7ffd62224250) = 0
ioctl(24, DRM_IOCTL_PRIME_FD_TO_HANDLE, 0x7ffd62223f3c) = 0
ioctl(24, DRM_IOCTL_WAIT_VBLANK, 0x7ffd62224050) = 0
ioctl(24, DRM_IOCTL_WAIT_VBLANKstrace: Process 1255 detached
lseek(106, 0, SEEK_END) = 10485760
mmap(NULL, 4, PROT_READ|PROT_WRITE, MAP_SHARED, 107, 0) = 0x7fca1cb29000
mremap(0x7fca1604b000, 126976, 20480, MREMAP_MAYMOVE) = 0x7fca1604b000
munmap(0x7fca16219000, 524288) = 0
read(24, "\1\0\0\0 \0\0\0000\334\10\0\0\0\0\0d\37\0\0\207L\4\0@X\7\0\0\0\0\0", 1024) = 32
read(27, "\0", 40) = 1
recvmsg(101, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(101, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="+\0\1\0", iov_len=16384}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 4
recvmsg(101, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\22\0\n\0\6\0\0\6'\0\0\0\37\0\0\0\10\21\4\0\20\0\0\0~/home/m"..., iov_len=16384}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 68
recvmsg(56, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(56, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\16\0\2\0!\0\300\1", iov_len=16384}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 8
recvmsg(56, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\16\0\2\0\6\0\0\6(\0\4\0\6\0\0\6\1\1\0\0\0\0\0\0", iov_len=16384}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 24
recvmsg(56, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\223\1\22\0\243-\304\1Y`\305\1\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., iov_len=16384}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 72
recvmsg(56, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\224\2\6\0z`\305\1\16\0\300\1\0\0\0\0\200\0078\4\0\36 \224\4\4\0z`\305\1"..., iov_len=16384}], msg_iovlen=1, msg_control=[{cmsg_len=24, cmsg_level=SOL_SOCKET, cmsg_type=SCM_RIGHTS, cmsg_data=[106, 107]}], msg_controllen=24, msg_flags=0}, 0) = 40
rt_sigreturn({mask=[]}) = 0
setitimer(ITIMER_REAL, {it_interval={tv_sec=0, tv_usec=0}, it_value={tv_sec=0, tv_usec=0}}, NULL) = 0
--- SIGALRM {si_signo=SIGALRM, si_code=SI_KERNEL} ---
strace: Process 1255 attached
strace: [ Process PID=1255 runs in 64 bit mode. ]
strace: [ Process PID=1255 runs in x32 mode. ]
writev(101, [{iov_base="\0026\353\7\241\250z\0\1\1\0\0\6\0\0\6\0\0\0\0\24\n4\1\224\2\27\1\4\0\1\0", iov_len=32}], 1) = 32
writev(56, [{iov_base="4d4058d4-7455-406b-b370-76d3c09f"..., iov_len=36}], 1) = 36
writev(56, [{iov_base="~/home/mu : bash \342\200\224 Konsole", iov_len=28}], 1) = 28
writev(56, [{iov_base="konsole\0konsole\0", iov_len=16}], 1) = 16
writev(56, [{iov_base="org.kde.konsole", iov_len=15}, {iov_base="\0", iov_len=1}], 2) = 16
writev(58, [{iov_base="~/home/mu : bash \342\200\224 Konsole", iov_len=28}], 1) = 28
writev(58, [{iov_base="k\246z\0", iov_len=4}], 1) = 4
Plasshell의 strace
부하도 매우 높습니다 . 다음부터 plasmashell
시작합니다 .strace
strace: Process 7633 attached
futex(0x7ffd1144c0f8, FUTEX_WAIT_PRIVATE, 0, NULL) = 0
futex(0x556189417398, FUTEX_WAKE_PRIVATE, 1) = 0
munmap(0x7f9c94603000, 4) = 0
ioctl(16, DRM_IOCTL_GEM_CLOSE, 0x7ffd1144bfc8) = 0
ioctl(16, DRM_IOCTL_I915_GEM_MADVISE, 0x7ffd1144c094) = 0
ioctl(16, DRM_IOCTL_I915_GEM_MADVISE, 0x7ffd1144c084) = 0
ioctl(16, DRM_IOCTL_I915_GEM_MADVISE, 0x7ffd1144c094) = 0
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="6\0\2\0\315\5\350\1\206\21\2\0\316\5\350\1\223\3\4\0\314\5\350\1kf\344\1\0\0\0\0"..., iov_len=64}], 1) = 64
futex(0x5561894173e8, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x556189417398, FUTEX_WAKE_PRIVATE, 1) = 1
poll([{fd=3, events=POLLIN}], 1, -1) = 1 ([{fd=3, revents=POLLIN}])
recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\1\0\336_\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 64
futex(0x5561894173ec, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x556189417398, FUTEX_WAKE_PRIVATE, 1) = 1
memfd_create("xshmfence", MFD_CLOEXEC|MFD_ALLOW_SEALING) = 31
ftruncate(31, 4) = 0
mmap(NULL, 4, PROT_READ|PROT_WRITE, MAP_SHARED, 31, 0) = 0x7f9c94603000
ioctl(16, DRM_IOCTL_I915_GEM_BUSY, 0x7ffd1144bd70) = 0
ioctl(16, DRM_IOCTL_I915_GEM_CREATE, 0x7ffd1144bde0) = 0
ioctl(16, DRM_IOCTL_I915_GEM_SET_TILING, 0x7ffd1144bd30) = 0
ioctl(16, DRM_IOCTL_I915_GEM_SET_DOMAIN, 0x7ffd1144bdd4) = 0
ioctl(16, DRM_IOCTL_PRIME_HANDLE_TO_FD, 0x7ffd1144bf1c) = 0
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
sendmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\224\2\6\0\320\5\350\1\16\0\340\1\0\0\0\0\200\0078\4\0\36 \224\4\4\0\320\5\350\1"..., iov_len=40}], msg_iovlen=1, msg_control=[{cmsg_len=24, cmsg_level=SOL_SOCKET, cmsg_type=SCM_RIGHTS, cmsg_data=[34, 31]}], msg_controllen=24, msg_flags=0}, 0) = 40
close(34) = 0
close(31) = 0
ioctl(16, DRM_IOCTL_I915_GEM_MADVISE, 0x7ffd1144bda0) = 0
ioctl(16, DRM_IOCTL_I915_GEM_SET_TILING, 0x7ffd1144bcf0) = 0
ioctl(16, DRM_IOCTL_I915_GEM_MADVISE, 0x7ffd1144bd10) = 0
ioctl(16, DRM_IOCTL_I915_GEM_MADVISE, 0x7ffd1144bda0) = 0
ioctl(16, DRM_IOCTL_I915_GEM_SET_TILING, 0x7ffd1144bcf0) = 0
getpid() = 7633
getpid() = 7633
ioctl(16, DRM_IOCTL_I915_GEM_EXECBUFFER2, 0x7ffd1144c380) = 0
ioctl(16, DRM_IOCTL_I915_GEM_WAIT or DRM_IOCTL_RADEON_GEM_OP, 0x7ffd1144c330) = 0
ioctl(16, DRM_IOCTL_I915_GEM_MADVISE, 0x7ffd1144c2f4) = 0
ioctl(16, DRM_IOCTL_I915_GEM_MADVISE, 0x7ffd1144c2d4) = 0
ioctl(16, DRM_IOCTL_I915_GEM_BUSY, 0x7ffd1144c270) = 0
ioctl(16, DRM_IOCTL_I915_GEM_MADVISE, 0x7ffd1144c2e0) = 0
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="\223\1\22\0\16\0\340\1\320\5\350\1\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., iov_len=72}], 1) = 72
getpid() = 7633
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="\16\0\2\0kf\344\1", iov_len=8}], 1) = 8
futex(0x556189417398, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x556189417398, FUTEX_WAKE_PRIVATE, 1) = 0
munmap(0x7f9c94603000, 4) = 0
ioctl(16, DRM_IOCTL_GEM_CLOSE, 0x7ffd1144bfc8) = 0
ioctl(16, DRM_IOCTL_I915_GEM_MADVISE, 0x7ffd1144c094) = 0
ioctl(16, DRM_IOCTL_I915_GEM_MADVISE, 0x7ffd1144c084) = 0
ioctl(16, DRM_IOCTL_I915_GEM_MADVISE, 0x7ffd1144c094) = 0
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="6\0\2\0\320\5\350\1\206\21\2\0\321\5\350\1\223\3\4\0\317\5\350\1\16\0\340\1\0\0\0\0"..., iov_len=64}], 1) = 64
futex(0x7ffd1144bf48, FUTEX_WAIT_PRIVATE, 0, NULL) = 0
futex(0x556189417398, FUTEX_WAKE_PRIVATE, 1) = 0
memfd_create("xshmfence", MFD_CLOEXEC|MFD_ALLOW_SEALING) = 31
ftruncate(31, 4) = 0
mmap(NULL, 4, PROT_READ|PROT_WRITE, MAP_SHARED, 31, 0) = 0x7f9c94603000
ioctl(16, DRM_IOCTL_I915_GEM_CREATE, 0x7ffd1144bde0) = 0
ioctl(16, DRM_IOCTL_I915_GEM_SET_TILING, 0x7ffd1144bd30) = 0
Plasmashell은 약 3초 만에 16008줄을 표시했으며, 입력에 매우 느리게 반응했습니다.
xrandr --현재
xrandr --current
Plasmashell이 전체 CPU 코어를 차지할 때의 출력은 다음과 같습니다.
Screen 0: minimum 320 x 200, current 3000 x 1920, maximum 8192 x 8192
LVDS-1 connected (normal left inverted right x axis y axis)
1366x768 60.02 +
1024x768 60.04 60.00
960x720 60.00
928x696 60.05
896x672 60.01
800x600 60.00 60.32 56.25
700x525 59.98
640x512 60.02
640x480 60.00 59.94
512x384 60.00
400x300 60.32 56.34
320x240 60.05
VGA-1 disconnected (normal left inverted right x axis y axis)
HDMI-1 disconnected (normal left inverted right x axis y axis)
DP-1 connected 1080x1920+1920+0 left (normal left inverted right x axis y axis) 509mm x 286mm
1920x1080 60.00*+
1600x900 60.00
1280x1024 75.02 60.02
1152x864 75.00
1024x768 75.03 60.00
800x600 75.00 60.32
640x480 75.00 59.94
720x400 70.08
HDMI-2 disconnected (normal left inverted right x axis y axis)
HDMI-3 disconnected (normal left inverted right x axis y axis)
DP-2 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 509mm x 286mm
1920x1080 60.00*+
1600x900 60.00
1280x1024 75.02 60.02
1152x864 75.00
1024x768 75.03 60.00
800x600 75.00 60.32
640x480 75.00 59.94
720x400 70.08
DP-3 disconnected (normal left inverted right x axis y axis)