Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4장. 웹 서버 / DB #22

Open
skydice opened this issue Apr 24, 2019 · 0 comments
Open

4장. 웹 서버 / DB #22

skydice opened this issue Apr 24, 2019 · 0 comments

Comments

@skydice
Copy link
Collaborator

skydice commented Apr 24, 2019

파이썬 3.7에 gc.freeze() 추가

파이썬 3.7에 추가됨
이로 인해 gunicorn에도 이 문제를 활용하기 위한 시도들이 있음

gc.freeze()
링크

  • fork()를 수행하기 전에 gc.freeze()를 함

  • fork() 후 활성화

  • GC 헤드를 메모리의 다른 위치로 옮김
    개체 당 두 개의 새로운 포인터 (16 바이트)를 도입했음. 이는 수 백만 개의 객체와 수 십개의 프로세스가 있을 경우 이슈가 생길 수 있음

아파치 튜닝

웹 서버 튜닝

웹 서버가 병목현상?

아파치의 병렬처리와 MPM

prefork와 worker, 프로세스와 쓰레드

프로그래밍 모델 관점에서 본 멀티프로세스/멀티쓰레드의 차이

성능 관점에서 본 멀티프로세스/멀티쓰레드 차이

하나의 클라이언트에 대한 하나의 프로세스/쓰레드

httpd.conf 설정

아파치의 안전판 MaxClients

prefork의 경우

부모/자식 프로세스 간 메모리를 공유하는 '카피 온 라이트'

카피 온 라이트로 공유 메모리 사이즈 확인

MaxRequestPerChild

worker의 경우

과부하로 MaxClients를 변경하기 전

Keep-Alive

아파치 이외의 선택방안 검토

lighttpd

MySQL 튜닝의 핵심

MySQL 튜닝의 핵심

튜닝의 단면으로의 분류

  • 서버 측
  • 서버 측 이외
  • 주변 시스템

메모리 관련 파라미터 튜닝

버퍼의 종류

  • 글로벌 버퍼
  • 쓰레드 버퍼

지나치게 할당하지 않기

메모리 관련 파라미터

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant