Suche senden
Hochladen
Redis edu 3
•
41 gefällt mir
•
3,492 views
DaeMyung Kang
Folgen
Melden
Teilen
Melden
Teilen
1 von 40
Jetzt herunterladen
Downloaden Sie, um offline zu lesen
Empfohlen
Redis basicandroadmap
Redis basicandroadmap
DaeMyung Kang
Redis trouble shooting
Redis trouble shooting
DaeMyung Kang
Techplanetreview redis
Techplanetreview redis
DaeMyung Kang
Cache governance
Cache governance
DaeMyung Kang
Redis on AWS
Redis on AWS
DaeMyung Kang
Redis Overview
Redis Overview
kalzas
Redis
Redis
knight1128
Redis acc 2015
Redis acc 2015
DaeMyung Kang
Weitere ähnliche Inhalte
Was ist angesagt?
이것이 레디스다.
이것이 레디스다.
Kris Jeong
Redis
Redis
DaeMyung Kang
Redis 2017
Redis 2017
DaeMyung Kang
Redis edu 1
Redis edu 1
DaeMyung Kang
Node Js와 Redis를 사용한 구조화된 데이터
Node Js와 Redis를 사용한 구조화된 데이터
jinho park
Redis From 2.8 to 4.x(unstable)
Redis From 2.8 to 4.x(unstable)
DaeMyung Kang
Redis From 2.8 to 4.x
Redis From 2.8 to 4.x
DaeMyung Kang
카산드라를 설치해서 테스트 해보자 with virtualbox
카산드라를 설치해서 테스트 해보자 with virtualbox
떠리 이
[2B5]nBase-ARC Redis Cluster
[2B5]nBase-ARC Redis Cluster
NAVER D2
Cassandra 멘붕기 | Devon 2012
Cassandra 멘붕기 | Devon 2012
Daum DNA
Redis edu 4
Redis edu 4
DaeMyung Kang
Cassandra education material
Cassandra education material
Youngki Kim
[스마트스터디]모바일 애플리케이션 서비스에서의 로그 수집과 분석
[스마트스터디]모바일 애플리케이션 서비스에서의 로그 수집과 분석
smartstudy_official
서버인프라 구축 입문 basis of composing server and infra
서버인프라 구축 입문 basis of composing server and infra
Hwanseok Park
Node.js를 사용한 Big Data 사례연구
Node.js를 사용한 Big Data 사례연구
ByungJoon Lee
서버/인프라를 지탱하는 기술
서버/인프라를 지탱하는 기술
재훈 정
Mongodb 특징 분석
Mongodb 특징 분석
Daeyong Shin
실무로 배우는 시스템 성능 최적화 - 4부. 프로세스 이해하기
실무로 배우는 시스템 성능 최적화 - 4부. 프로세스 이해하기
Minchul Jung
분산저장시스템 개발에 대한 12가지 이야기
분산저장시스템 개발에 대한 12가지 이야기
NAVER D2
다중성 확보, 시스템 안정화
다중성 확보, 시스템 안정화
Choonghyun Yang
Was ist angesagt?
(20)
이것이 레디스다.
이것이 레디스다.
Redis
Redis
Redis 2017
Redis 2017
Redis edu 1
Redis edu 1
Node Js와 Redis를 사용한 구조화된 데이터
Node Js와 Redis를 사용한 구조화된 데이터
Redis From 2.8 to 4.x(unstable)
Redis From 2.8 to 4.x(unstable)
Redis From 2.8 to 4.x
Redis From 2.8 to 4.x
카산드라를 설치해서 테스트 해보자 with virtualbox
카산드라를 설치해서 테스트 해보자 with virtualbox
[2B5]nBase-ARC Redis Cluster
[2B5]nBase-ARC Redis Cluster
Cassandra 멘붕기 | Devon 2012
Cassandra 멘붕기 | Devon 2012
Redis edu 4
Redis edu 4
Cassandra education material
Cassandra education material
[스마트스터디]모바일 애플리케이션 서비스에서의 로그 수집과 분석
[스마트스터디]모바일 애플리케이션 서비스에서의 로그 수집과 분석
서버인프라 구축 입문 basis of composing server and infra
서버인프라 구축 입문 basis of composing server and infra
Node.js를 사용한 Big Data 사례연구
Node.js를 사용한 Big Data 사례연구
서버/인프라를 지탱하는 기술
서버/인프라를 지탱하는 기술
Mongodb 특징 분석
Mongodb 특징 분석
실무로 배우는 시스템 성능 최적화 - 4부. 프로세스 이해하기
실무로 배우는 시스템 성능 최적화 - 4부. 프로세스 이해하기
분산저장시스템 개발에 대한 12가지 이야기
분산저장시스템 개발에 대한 12가지 이야기
다중성 확보, 시스템 안정화
다중성 확보, 시스템 안정화
Ähnlich wie Redis edu 3
[OpenTRS-001] Hotel California
[OpenTRS-001] Hotel California
Theori
[110730/아꿈사발표자료] mongo db 완벽 가이드 : 7장 '고급기능'
[110730/아꿈사발표자료] mongo db 완벽 가이드 : 7장 '고급기능'
sung ki choi
[14.10.20] 아! 그거...모르겠습니다 - TLS(devrookie)
[14.10.20] 아! 그거...모르겠습니다 - TLS(devrookie)
해강
(Lisp)
(Lisp)
EunPyoung Kim
[234]멀티테넌트 하둡 클러스터 운영 경험기
[234]멀티테넌트 하둡 클러스터 운영 경험기
NAVER D2
150120 Rack 어플리케이션 개요
150120 Rack 어플리케이션 개요
Shim Won
7가지 동시성 모델 4장
7가지 동시성 모델 4장
HyeonSeok Choi
간단한 쉘 스크립트 작성하기
간단한 쉘 스크립트 작성하기
licubeclub
Node.js DBMS short summary
Node.js DBMS short summary
HoChul Shin
SPARK SQL
SPARK SQL
Juhui Park
Gcd ppt
Gcd ppt
Sangon Lee
log-monitoring-architecture.pdf
log-monitoring-architecture.pdf
Sungkyun Kim
HDFS Overview
HDFS Overview
JEONGPHIL HAN
Hadoop발표자료
Hadoop발표자료
Vong Sik Kong
시즌 2: 멀티쓰레드 프로그래밍이 왜이리 힘드나요?
시즌 2: 멀티쓰레드 프로그래밍이 왜이리 힘드나요?
내훈 정
[211] HBase 기반 검색 데이터 저장소 (공개용)
[211] HBase 기반 검색 데이터 저장소 (공개용)
NAVER D2
OLAP for Big Data (Druid vs Apache Kylin vs Apache Lens)
OLAP for Big Data (Druid vs Apache Kylin vs Apache Lens)
SANG WON PARK
No sql 이해 및 활용 공개용
No sql 이해 및 활용 공개용
YOUNGGYU CHUN
Assembly 스터디 2
Assembly 스터디 2
Jinkyoung Kim
Intro KaKao ADT (Almighty Data Transmitter)
Intro KaKao ADT (Almighty Data Transmitter)
I Goo Lee
Ähnlich wie Redis edu 3
(20)
[OpenTRS-001] Hotel California
[OpenTRS-001] Hotel California
[110730/아꿈사발표자료] mongo db 완벽 가이드 : 7장 '고급기능'
[110730/아꿈사발표자료] mongo db 완벽 가이드 : 7장 '고급기능'
[14.10.20] 아! 그거...모르겠습니다 - TLS(devrookie)
[14.10.20] 아! 그거...모르겠습니다 - TLS(devrookie)
(Lisp)
(Lisp)
[234]멀티테넌트 하둡 클러스터 운영 경험기
[234]멀티테넌트 하둡 클러스터 운영 경험기
150120 Rack 어플리케이션 개요
150120 Rack 어플리케이션 개요
7가지 동시성 모델 4장
7가지 동시성 모델 4장
간단한 쉘 스크립트 작성하기
간단한 쉘 스크립트 작성하기
Node.js DBMS short summary
Node.js DBMS short summary
SPARK SQL
SPARK SQL
Gcd ppt
Gcd ppt
log-monitoring-architecture.pdf
log-monitoring-architecture.pdf
HDFS Overview
HDFS Overview
Hadoop발표자료
Hadoop발표자료
시즌 2: 멀티쓰레드 프로그래밍이 왜이리 힘드나요?
시즌 2: 멀티쓰레드 프로그래밍이 왜이리 힘드나요?
[211] HBase 기반 검색 데이터 저장소 (공개용)
[211] HBase 기반 검색 데이터 저장소 (공개용)
OLAP for Big Data (Druid vs Apache Kylin vs Apache Lens)
OLAP for Big Data (Druid vs Apache Kylin vs Apache Lens)
No sql 이해 및 활용 공개용
No sql 이해 및 활용 공개용
Assembly 스터디 2
Assembly 스터디 2
Intro KaKao ADT (Almighty Data Transmitter)
Intro KaKao ADT (Almighty Data Transmitter)
Mehr von DaeMyung Kang
Count min sketch
Count min sketch
DaeMyung Kang
Ansible
Ansible
DaeMyung Kang
Why GUID is needed
Why GUID is needed
DaeMyung Kang
How to use redis well
How to use redis well
DaeMyung Kang
The easiest consistent hashing
The easiest consistent hashing
DaeMyung Kang
How to name a cache key
How to name a cache key
DaeMyung Kang
Integration between Filebeat and logstash
Integration between Filebeat and logstash
DaeMyung Kang
How to build massive service for advance
How to build massive service for advance
DaeMyung Kang
Massive service basic
Massive service basic
DaeMyung Kang
Data Engineering 101
Data Engineering 101
DaeMyung Kang
How To Become Better Engineer
How To Become Better Engineer
DaeMyung Kang
Kafka timestamp offset_final
Kafka timestamp offset_final
DaeMyung Kang
Kafka timestamp offset
Kafka timestamp offset
DaeMyung Kang
Data pipeline and data lake
Data pipeline and data lake
DaeMyung Kang
Redis acl
Redis acl
DaeMyung Kang
Coffee store
Coffee store
DaeMyung Kang
Scalable webservice
Scalable webservice
DaeMyung Kang
Number system
Number system
DaeMyung Kang
webservice scaling for newbie
webservice scaling for newbie
DaeMyung Kang
Internet Scale Service Arichitecture
Internet Scale Service Arichitecture
DaeMyung Kang
Mehr von DaeMyung Kang
(20)
Count min sketch
Count min sketch
Ansible
Ansible
Why GUID is needed
Why GUID is needed
How to use redis well
How to use redis well
The easiest consistent hashing
The easiest consistent hashing
How to name a cache key
How to name a cache key
Integration between Filebeat and logstash
Integration between Filebeat and logstash
How to build massive service for advance
How to build massive service for advance
Massive service basic
Massive service basic
Data Engineering 101
Data Engineering 101
How To Become Better Engineer
How To Become Better Engineer
Kafka timestamp offset_final
Kafka timestamp offset_final
Kafka timestamp offset
Kafka timestamp offset
Data pipeline and data lake
Data pipeline and data lake
Redis acl
Redis acl
Coffee store
Coffee store
Scalable webservice
Scalable webservice
Number system
Number system
webservice scaling for newbie
webservice scaling for newbie
Internet Scale Service Arichitecture
Internet Scale Service Arichitecture
Redis edu 3
1.
REDIS charsyam@naver.com 장애관리
2.
First of All. Single
Thread
3.
Single Thread 의 의미
4.
Don‘t execute Long Tasks.
5.
O(n) Commands
6.
O(n) Commands KEYS FLUSHALL/FLUSHDB DEL big
size of collections
7.
KEYS * di =
dictGetSafeIterator(c->db->dict); allkeys = (pattern[0] == '*' && pattern[1] == '0'); while((de = dictNext(di)) != NULL) { …… stringmatchlen(pattern,plen,key,sdslen(key),0) }
8.
FlushAll Cache Item Count
Time Memcache 1,000,000 1~2ms Redis 1,000,000 1000ms(1 second)
9.
FlushAll-Redis for (i =
0; i < ht->size && ht->used > 0; i++) { dictEntry *he, *nextHe; if ((he = ht->table[i]) == NULL) continue; while(he) { nextHe = he->next; dictFreeKey(d, he); dictFreeVal(d, he); zfree(he); ht->used--; he = nextHe; } }
10.
FlushAll-Memcache if (exptime >
0) settings.oldest_live = realtime(exptime) - 1; else /* exptime == 0 */ settings.oldest_live = current_time - 1;
11.
FlushAll-Memcache if (settings.oldest_live !=
0 && settings.oldest_live <= current_time && it->time <= settings.oldest_live) { do_item_unlink(it, hv); do_item_remove(it); it = NULL; }
12.
Del Collections Item Count
Time list 1,000,000 1000ms(1 second)set Sorted set hash
13.
RDB
14.
RDB is Redis Snapshot
15.
RDB Fork(), Cow(Copy on
Write) Heavy Write 시에 메모리 이슈가 발생 할 수 있음. Redis의 Replication은 무조건 Fork() 를 하므로 주의
16.
RDB 17.1 GB 34.2 GB 68.4 GB 117 GB 메모리 사이즈에 따라서
생성 속도가 다름. 클 수록 느림…
17.
Twice Memory
18.
Twice Memory
19.
Twice Memory
20.
Write Error Case 읽기는
가능한데, 쓰기만 실패
21.
Write Error Case stop-writes-on-bgsave-error RDB
생성 옵션이 켜져 있을 때, RDB 생성이 어떤 이유로 실패하면, 위의 옵 션으로 인해서 Write 작업이 금지됨. Info는 되지만, Ping은 실패함
22.
Write Error Case “MISCONF
Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled. Please check Redis logs for details about the error.”
23.
Write Error Case if
(server.stop_writes_on_bgsave_err && server.saveparamslen > 0 && server.lastbgsave_status == REDIS_ERR && c->cmd->flags & REDIS_CMD_WRITE) { flagTransaction(c); addReply(c, shared.bgsaveerr); return REDIS_OK; }
24.
Write Error Case config
set stop-writes-on-bgsave-error no Redis.conf에서 옵션 off(2.6.12 이상)
25.
AOF
26.
AOF is Appended only
File
27.
AOF *3 $3 Set $1 A $3 abc ……
28.
AOF Rewrite - AOF
파일의 상태가 특정 조건(파일 사이즈가 얼마 이상일 경우)일 때 - AOF 파일을 현재 상태에 맞춰서 새 롭게 생성 - AOF Rewrite도 Fork() 사용하므로 RDB 와 같은 이슈가 발생
29.
메모리 파편화 Redis 는
매번 메모리 할당을 하므로, 부하가 많을 경우, 튀는 경우가 발생. 실제로 Redis -> Arcus 는 전환시에 별 문제가 없었지만, Arcus -> Redis 는 전환시에 튀는 경우가 발생
30.
Slab Allocator Slab 0
Slab 1 Slab 2 … … Slab N 1mb 1mb 1mb 1mb 1mb 1mb 1mb 1mb Slab Page List Free Item List
31.
LRU List Slab 0
Slab 1 Slab 2 … … Slab NHead Slab 0 Slab 1 Slab 2 … … Slab NTail Item Item Item 밑에 있는 아이템일 수록 사용한지 오래됨.
32.
Eviction Memcached는 slab별 LRU
만 지원 Redis 는 LRU, Random 등을 지원 Twitter에서 사용하는 Twemcache 의 경우는 Eviction 전략만 추가한 Memcached의 변종?
33.
LRU 관리 Memcached는 이전에는
LRU 관리에 이슈가 있었음. LRU List를 뒤에서 부터 검색해서 메모 리를 확보함 다양한 Expire 값을 설정하면, Expire 가 짧은 아이템이 앞으로가, 뒤에서 찾 지못하고 메모리 할당의 가능성이 큼.
34.
LRU 관리 Arcus는 뒤에서
부터 LRU List를 검색 하더라도, 처음까지 전부 체크함. 모두 한번에 체크하는 것은 아니라, 매 텀마다, 이전 기록을 바탕으로 검색
35.
LRU 관리 최근 버전의
Memcache 는 LRU_Crawler라는 스레드가 추가됨. Memcached는 독립 스레드에서, Arcus 는 해당 LRU동작을 확장
36.
LRU 관리 Redis 도
매 커맨드가 실행되기 전에 약 100여개 정도 랜덤하게 Eviction 정책 에 따라서 Key를 지움.
37.
메모리 파편화 Memcached는 메모리
관리를 직접하 므로 문제가 덜함. Redis 는 Jemalloc등을 사용하지만, 메 모리 할당을 직접 처리할 수 없으므로 메모리 파편화가 심해질 수 있다.
38.
메모리 파편화
39.
메모리 파편화 Memcache는 메모리를
자신이 관리하 므로, 실제 메모리 부족 시, 기존 데이 터를 지울 수 있다. Redis는 Jemalloc에서는 메모리 Max 를 알지 못하므로, 그냥 새로운 Chunk 를 할당하게 된다.
40.
Thank you.
Jetzt herunterladen