# 페이스북이 SQL을 가속하는 방법

> Clean Markdown view of GeekNews topic #2806. Use the original source for factual precision when an external source URL is present.

## Metadata

- GeekNews HTML: [https://news.hada.io/topic?id=2806](https://news.hada.io/topic?id=2806)
- GeekNews Markdown: [https://news.hada.io/topic/2806.md](https://news.hada.io/topic/2806.md)
- Type: news
- Author: [xguru](https://news.hada.io/@xguru)
- Published: 2020-09-09T10:15:00+09:00
- Updated: 2020-09-09T10:15:00+09:00
- Original source: [datanami.com](https://www.datanami.com/2020/08/31/how-facebook-accelerates-sql-at-extreme-scale/)
- Points: 9
- Comments: 0

## Topic Body

- Presto를 큰 규모로 사용중 : 4만대 서버, 매일 ~1 ExaByte 데이터 스캔, 80% 이상이 새로운 ETL

ㅤ→ Compute 와 Storage의 분리

- Presto는 잘 동작했지만 더 빠른 쿼리(1초 이하)를 위해 Raptor를 개발

ㅤ→ 로컬 SSD에 캐슁, 파일단위 메타스토어

ㅤ→ 다시 Compute 와 Storage가 결합됨 → 스케일링 및 관리가 어려워짐

- 작년 가을부터 Alluxio를 수정한 Raptor 대체제를 개발 시작 : Alluxio Local Cache

ㅤ→ Raptor와 비슷한 성능이지만 로컬 SSD에 캐쉬할 필요 없음

ㅤ→ Alluxio는 가상 분산 파일 시스템으로 여러 계산엔진을 여러개의 스토리지에 메모리 기반으로 연결해주는 중간 다리

- Alluxio Local Cache

ㅤ→ 2.2버전부터 공식 릴리즈에 포함

ㅤ→ 전체 Alluxio를 사용할 필요없이 Presto Server JVM안에 임베딩 가능한 라이브러리

- 페이스북 전체 Presto fleet에 Raptor 를 거의 걷어내고 Alluxio Local Cache를 설치

ㅤ→ 페이스북 데이터들은 ORC 파일포맷으로 HDFS 인터페이스를 통해 접근 가능

ㅤ→ 로컬 SSD도 사용하지만, 캐쉬에 없으면 원격 저장소도 접근 가능

ㅤ→ Presto 에 30%~50% 정도의 성능 향상

ㅤ→ Raptor 대비 원격 저장소 접근이 57% 감소

ㅤ→ Alluxio Cache의 히트율은 90% 이상

ㅤ→ 6개월안에 Raptor는 모두 제거 예정

## Comments



_No public comments on this page._
