TCP 송수신 버퍼 튜닝과 처리량

같은 애플리케이션, 같은 네트워크 대역폭인데 서버 위치나 커널 파라미터만 바뀌었을 뿐인데 처리량이 절반으로 떨어지는 경우가 있다. 원인이 대역폭이 아니라 TCP 송수신 버퍼 크기인 경우가 많다. TCP는 상대가 확인응답(ACK)을 보내기 전까지…

Continue ReadingTCP 송수신 버퍼 튜닝과 처리량

cgroups v2 Memory 컨트롤러로 메모리 고갈 상황 재현하기

컨테이너 하나에 메모리 제한 512Mi를 걸어놓고 배포했는데, 실제 트래픽이 몰리면 그 한도를 넘길 때 서비스가 어떻게 반응할지 로컬에서 미리 확인해보고 싶을 때가 있다. 스왑이 있으면 조용히 스왑아웃되다 끝날 수도 있고,…

Continue Readingcgroups v2 Memory 컨트롤러로 메모리 고갈 상황 재현하기

Ubuntu 업데이트 오류를 ​​수정하는 방법

Ubuntu는 안정적인 배포판이지만 apt update/apt install 도중 여러 이유로 실패하는 경우가 잦다. 원인은 크게 세 가지로 나뉜다 — 다른 프로세스가 dpkg 락을 잡고 있는 경우, 이전 설치 작업이 중간에 끊겨…

Continue ReadingUbuntu 업데이트 오류를 ​​수정하는 방법

VSCODE ssh 연결 실패 해결방법(could not establish connection to “tmp”)

VS Code Remote-SSH로 원격 서버에 붙으려 하면 "Could not establish connection to ..."와 함께 "프로세스에서 없는 파이프에 쓰려고 했습니다"(Windows의 ERROR_PIPE_NOT_CONNECTED)가 뜨는 경우가 있다. SSH 자식 프로세스가 이미 죽어 파이프에 쓸…

Continue ReadingVSCODE ssh 연결 실패 해결방법(could not establish connection to “tmp”)

‘atomic_inc’ from incompatible pointer type [-Werror=incompatible-pointer-types]

벤더 커널을 빌드하다가 아래와 같은 에러를 만났다. /home/worker/.../kernel-source/include/linux/cred.h:258:28: error: passing argument 1 of 'atomic_inc' from incompatible pointer type [-Werror=incompatible-pointer-types] 258 | atomic_inc(&new->usage); | ^~~~~~~~~~~ | | | atomic_long_t * {aka…

Continue Reading‘atomic_inc’ from incompatible pointer type [-Werror=incompatible-pointer-types]

asm/types.h: No such file or directory 문제 (Yocto pseudo-native)

Yocto 빌드 중 pseudo-native의 do_compile 단계에서 이런 에러를 만날 때가 있다. gcc -c -isystem .../recipe-sysroot-native/usr/include -isystem .../recipe-sysroot-native/usr/include -m32 ... pseudo_util.c In file included from /usr/include/linux/stat.h:5, from /usr/include/bits/statx.h:31, from /usr/include/sys/stat.h:465, from…

Continue Readingasm/types.h: No such file or directory 문제 (Yocto pseudo-native)

tmux 세션 관리와 스크립팅으로 원격 작업 환경 구성하기

SSH 연결이 끊기면(노트북을 덮거나, 와이파이 끊김, VPN 타임아웃) 터미널에 붙어 있던 셸과 프로세스가 통째로 죽는다. nohup/disown으로 프로세스는 살릴 수 있어도 다시 접속해서 출력을 보거나 개입할 방법은 없다. tmux(terminal multiplexer)는 터미널…

Continue Readingtmux 세션 관리와 스크립팅으로 원격 작업 환경 구성하기