SlideShare a Scribd company logo
Tech Planet 리뷰
Redis Session
From Line
charsyam@naver.com
시작하기 전에…
• 테크플래닛 2015에서 본 세션에 대한 리뷰입니다.
– 즉 제가 발표한 내용이 아닙니다.
• 해당 내용은 LINE 에서 발표해 주신 내용입니다.
• 강의자료는 여기서 보실 수 있습니다.
– http://readme.skplanet.com/wp-content/uploads/1-6-
%EC%84%9C%EC%9B%90%ED%95%84_LINE_LINE-Redis-
Clusters.pdf
목차
1. MaxMemory와 Dict Expand 이슈
2. CPU affinity
MaxMemory와 Dict Expand 이슈
Redis Dict 다시 살펴보기
Redis Dict – Redis 기본 자료 구조.
Redis Dict – Hash Table의 확장 #2
Redis Dict – Hash Table의 확장 #3
Redis Dict – Hash Table의 확장 #3
2배씩 늘어납니다.
zmalloc
zmalloc
• 그냥 일반적인 malloc(jemalloc, malloc, tcmalloc) 에 현재
메모리를 얼마나 할당하고 있는지 사용량만 저장함
• used_memory 변수가 증가됨.
freeMemoryIfNeeded
freeMemoryIfNeeded
• Redis 커맨드를 처리하는 processCommand 안에서
maxmemory 설정이 있으면 항상 해당 작업을 호출한다.
• used_memory + Need_memory < maxmemory 가 되도록
메모리 해제 정책에 따라서 메모리 해제를 진행함.
– 언제까지?
– 위의 공식이 성립할때까지…
다시 돌아가서…
아이템이 10억 개.
10억 * 4bytes * 2배
= 8,000,000,000
= 8G
메모리 8G가 갑자기 추가됩니다.
Maxmemory 가 12G 이고,
usedmemory 가 8G이면?
4G 정도를 free 해야한다.
시간이 얼마나 걸릴까?
실제로 저도 이런 이슈를
겪어보지는 못했습니다.
다만 원인은 이해가 갑니다.
앞의 내용 때문이죠.
해결책은?
LINE은 미리 시작 hash table 크기를
엄청 키워놓고 시작…
최상 위의 db[i].dict 을 dictExpand
를 통해서 미리 키워둔다.
CPU Affinity
NIC Interrupt CPU 와
Redis Process 가 명시적으로
할당되는 CPU를 따로 설정
High Load 상황에서 CPU Usage가
20~30% 까지도 차이가 남.
라인 규모로 Heavy 하게 쓸때
도움이 될듯.
Q & A

More Related Content

PDF
Redis acc 2015
PDF
Redis basicandroadmap
PDF
Cache governance
PDF
Redis on AWS
PDF
Redis edu 3
PDF
Redis 2017
PDF
Redis trouble shooting
PPT
Redis Overview
Redis acc 2015
Redis basicandroadmap
Cache governance
Redis on AWS
Redis edu 3
Redis 2017
Redis trouble shooting
Redis Overview

What's hot (20)

PDF
Redis From 2.8 to 4.x(unstable)
PDF
Redis From 2.8 to 4.x
PPTX
Redis
PPTX
이것이 레디스다.
PDF
[2B5]nBase-ARC Redis Cluster
PDF
Redis edu 1
PDF
PDF
Redis edu 4
PDF
[스마트스터디]모바일 애플리케이션 서비스에서의 로그 수집과 분석
PPTX
Node Js와 Redis를 사용한 구조화된 데이터
PPT
서버/인프라를 지탱하는 기술
PDF
서버인프라 구축 입문 basis of composing server and infra
PDF
서버인프라를지탱하는기술2_1-2
PPTX
분산저장시스템 개발에 대한 12가지 이야기
PDF
[OpenInfra Days Korea 2018] Day 2 - CEPH 운영자를 위한 Object Storage Performance T...
PPTX
HTTP 완벽가이드 7장 캐시
PDF
[252] 증분 처리 플랫폼 cana 개발기
PPTX
About memcached
PDF
3.[d2 오픈세미나]분산시스템 개발 및 교훈 n base arc
PDF
다중성 확보, 시스템 안정화
Redis From 2.8 to 4.x(unstable)
Redis From 2.8 to 4.x
Redis
이것이 레디스다.
[2B5]nBase-ARC Redis Cluster
Redis edu 1
Redis edu 4
[스마트스터디]모바일 애플리케이션 서비스에서의 로그 수집과 분석
Node Js와 Redis를 사용한 구조화된 데이터
서버/인프라를 지탱하는 기술
서버인프라 구축 입문 basis of composing server and infra
서버인프라를지탱하는기술2_1-2
분산저장시스템 개발에 대한 12가지 이야기
[OpenInfra Days Korea 2018] Day 2 - CEPH 운영자를 위한 Object Storage Performance T...
HTTP 완벽가이드 7장 캐시
[252] 증분 처리 플랫폼 cana 개발기
About memcached
3.[d2 오픈세미나]분산시스템 개발 및 교훈 n base arc
다중성 확보, 시스템 안정화
Ad

Similar to Techplanetreview redis (20)

PPTX
서버 아키텍처 이해를 위한 프로세스와 쓰레드
PDF
Memcached의 확장성 개선
PDF
실전 DataSnap!
PDF
Web Analytics at Scale with Elasticsearch @ naver.com - Part 1
PDF
Domain driven design ch3
PDF
[2010 네이트 앱스토어 개발자 세미나] 앱스 제작 사례 (2) 소셜게임 서버 구성 전략
PDF
if kakao dev 2019_Ground X_Session 04
PPTX
SQL-on-Hadoop with Apache Tajo, and application case of SK Telecom
PDF
요즘 웹 배포
PDF
HTML5 스펙 소개
PDF
스프링 데이터 레디스 엘라스틱 발표자료
PDF
[오픈소스컨설팅]Java Performance Tuning
PDF
2024년 6월 24일 개발 이야기 - 메시지 큐 기반 아키텍처가 요즘 인기가 떨어지는 이유는 뭔가요?
PDF
MariaDB Other Features
PDF
김찬웅_그룹웨어에 새 에너지를_NDC15
PPTX
Image Deep Learning 실무적용
PDF
[오픈소스컨설팅]Performance Tuning How To
PPTX
Introduction to scalability
PDF
NET 최선단 기술에 의한 고성능 웹 애플리케이션
PDF
메이븐 기본 이해
서버 아키텍처 이해를 위한 프로세스와 쓰레드
Memcached의 확장성 개선
실전 DataSnap!
Web Analytics at Scale with Elasticsearch @ naver.com - Part 1
Domain driven design ch3
[2010 네이트 앱스토어 개발자 세미나] 앱스 제작 사례 (2) 소셜게임 서버 구성 전략
if kakao dev 2019_Ground X_Session 04
SQL-on-Hadoop with Apache Tajo, and application case of SK Telecom
요즘 웹 배포
HTML5 스펙 소개
스프링 데이터 레디스 엘라스틱 발표자료
[오픈소스컨설팅]Java Performance Tuning
2024년 6월 24일 개발 이야기 - 메시지 큐 기반 아키텍처가 요즘 인기가 떨어지는 이유는 뭔가요?
MariaDB Other Features
김찬웅_그룹웨어에 새 에너지를_NDC15
Image Deep Learning 실무적용
[오픈소스컨설팅]Performance Tuning How To
Introduction to scalability
NET 최선단 기술에 의한 고성능 웹 애플리케이션
메이븐 기본 이해
Ad

More from DaeMyung Kang (20)

PPTX
Count min sketch
PDF
Ansible
PDF
Why GUID is needed
PDF
How to use redis well
PPTX
The easiest consistent hashing
PDF
How to name a cache key
PDF
Integration between Filebeat and logstash
PDF
How to build massive service for advance
PDF
Massive service basic
PDF
Data Engineering 101
PDF
How To Become Better Engineer
PPTX
Kafka timestamp offset_final
PPTX
Kafka timestamp offset
PPTX
Data pipeline and data lake
PDF
Redis acl
PDF
Coffee store
PDF
Scalable webservice
PDF
Number system
PDF
webservice scaling for newbie
PDF
Internet Scale Service Arichitecture
Count min sketch
Ansible
Why GUID is needed
How to use redis well
The easiest consistent hashing
How to name a cache key
Integration between Filebeat and logstash
How to build massive service for advance
Massive service basic
Data Engineering 101
How To Become Better Engineer
Kafka timestamp offset_final
Kafka timestamp offset
Data pipeline and data lake
Redis acl
Coffee store
Scalable webservice
Number system
webservice scaling for newbie
Internet Scale Service Arichitecture

Techplanetreview redis