1 / 23

고급 내장형 시스템 Lab3: Compression-Aware FTL

고급 내장형 시스템 Lab3: Compression-Aware FTL. 이성진 (chamdoo@davinci.snu.ac.kr). 서울대학교 컴퓨터공학부 임베디드 시스템 연구실. 본 실습의 목표. 본 실습에서는 플래시 저장장치서 데이터 압축 (data compression) 기능의 구현을 목표함 (1) 내구성 측면에서의 이득 확인 (2) 플래시 변환 계층에서의 설계상의 이슈 (3) 소프트웨어 단계에서의 최적화 이슈. Data Compression 소개. Data Compression 의 장점

Télécharger la présentation

고급 내장형 시스템 Lab3: Compression-Aware FTL

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 고급 내장형 시스템Lab3: Compression-Aware FTL 이성진 (chamdoo@davinci.snu.ac.kr) 서울대학교 컴퓨터공학부 임베디드 시스템 연구실

  2. 본 실습의 목표 • 본 실습에서는 플래시 저장장치서 데이터 압축 (data compression) 기능의 구현을 목표함 • (1) 내구성 측면에서의 이득 확인 • (2) 플래시 변환 계층에서의 설계상의 이슈 • (3) 소프트웨어 단계에서의 최적화 이슈 Mini Project: Compression-Aware FTL

  3. Data Compression 소개 • Data Compression의 장점 • 성능 향상 : 데이터의 크기를 줄임으로써, 저장장치에 직접 읽고 쓰는 양이 줄어들게 됨 • 수명 개선: 데이터의크기를 줄임으로써, 저장장치에 쓰는 양이 적어지므로, 쓰고 지우는 과정이 줄어들게 됨 • Data Compression의단점 • Compressioncost : Data compression을위한 부가적인 비용이 들게 됨 • Hardware-accelerate compression 기능을 활용하여 계산 비용을 줄일 수 있음 (본 실습에서는 software 기반의 compression 만 고려함) Mini Project: Compression-Aware FTL

  4. Data Compression Overview Host Compressor Module • BlueFTL • 압축된 데이터를 고려한 주소 사상 기능 필요 • 압축된 데이터를 고려한 가비지 컬렉션 기능 필요 • 데이터 버퍼링 기능 필요 • 기타 최적화 기능 필요 Data Compression 기능 Data Decompression 기능 BlueSSD (Emulation) block block block block block block block block block block block block … … … … … … block block block block block block Flash bus Flash bus Flash bus Flash chip Flash chip Flash chip Flash chip Flash chip Flash chip Mini Project: Compression-Aware FTL

  5. DataCompression 단위 (1) 1301 request BlueFTL Compressor Physical Flash memory Internal Fragment • 페이지 단위 압축의 문제점 • 플래시의 기본적인 읽기/쓰기 연산의 단위는 페이지임 • 페이지 단위로 데이터를 압축할 데이터의 량은 감소하지만 실제 쓰기 연산 횟수는 감소 시키지 못함 • 내부 단편화 (Internal Fragmentation) 문제 Mini Project: Compression-Aware FTL

  6. DataCompression 단위 (2) 1301 1302 1303 1304 Compression Chunk BlueFTL Compressor Physical Flash memory Write Buffer Internal Fragment • 다수의페이지를 하나의 compression chunk로 묶어서 기록 • 다수의 논리 페이지를 하나의 덩어리로 묶어 더 적은 개수의 물리 페이지에 기록함 (이러한 데이터 덩어리를 compression chunk라 함) • 기록 요청된 페이지의 개수 대비 실제 쓰여지는 페이지의 개수를 감소시킬 수 있음 Mini Project: Compression-Aware FTL

  7. DataCompression 단위 (3) 1301 1302 1303 1304 1301 1302 1303 1304 BlueFTL BlueFTL Compressor Compressor Physical Flash memory Physical Flash memory Write Buffer Compression chunk Read (여기서는 2 page) <데이터 쓰기> <데이터 읽기 > Mini Project: Compression-Aware FTL • 다수의 페이지를 묶어서 기록할 경우 아래와 같은 기술적 이슈가 발생함 • 쓰기 시 요청된 페이지 데이터를 임시로 보관할 쓰기 버퍼가 필요함 • 읽기 시 compression chunk 내 페이지를 항상 모두 읽어야 함

  8. 비효율적 DataCompression 1301 1302 1303 1304 1301 1302 1303 1304 BlueFTL BlueFTL Compressor Compressor 메타 데이터 Physical Flash memory Physical Flash memory Write Buffer Write Buffer <compression> <최적화> Mini Project: Compression-Aware FTL • Compression이 효과적이지 않을 수 있음 • Compression이 이루어 져도, 크기가 줄지 않을 수 있음 • 메타데이터 (Headinformation)으로 인해 크기가 더 커질 수 있음 • Compression을하지 않는 것이 최적화 방법!

  9. 쓰기 버퍼 (Write Buffer) request 2345 2346 2347 2348 Compression Algorithm (LZRW3) Compression Chunk Write Buffer • 쓰기 버퍼 (write buffer)의기능 • 4개의 페이지를 한번에 flush하여 플래시 메모리에 저장하기 위함 • Flush시에는 header information과 함께 데이터를 보냄 Mini Project: Compression-Aware FTL

  10. Chunk Table (1) Data Chunk Table • 기능 • Compression Chunk들의 관리를 위해 필요함 • 구성 : 3가지 정보 유지 • Valid page counter: compression chunk에유효한 logical 페이지수 • Number of physical pages: compression chunk에 할당된물리 페이지 수 • Compression indicator : 데이터의 compression 여부를 나타냄(compression된 경우 ‘1’, 아닌 경우 ‘0’으로 표기 ) Mini Project: Compression-Aware FTL

  11. Chunk Table (2) 하나의 compression chunk Data Chunk Table 1235 1236 1237 Flash Memory … … Compression Chunk • 특징 • 전체 entry는 물리적 페이지의주소 개수 만큼 유지해야 함 • 하나의 compression chunk가 여러 페이지에 걸쳐있는 경우, 각 entry는 동일한 값을 가짐 Mini Project: Compression-Aware FTL

  12. Compression 동작 과정 (1) Write Buffer Data Chunk Table Mapping Table 1301 1302 1307 1309 Compression algorithm (LZRW3) 쓰기 버퍼에 4개의 페이지를 모은 후, 쓰기버퍼에 모인 데이터 전체를 compress … … … … … … … … 1311 1312 Flash Memory … … Compression Chunk Mini Project: Compression-Aware FTL Write operation : 모두 새로운 데이터 쓰기 요청일 경우

  13. Compression 동작 과정 (2) Write Buffer Data Chunk Table Mapping Table 1503 1307 1309 1520 Compression algorithm (LZRW3) 쓰기 버퍼에 4개의 페이지를 모은 후, 쓰기버퍼에 모인 데이터 전체를 compress … … … … … update … 2122 2 2122 2 update … … 1311 1312 2122 2123 2124 Flash Memory … … … Compression Chunk Compression Chunk Mini Project: Compression-Aware FTL Write operation : 데이터를 update하는 요청이 있는 경우

  14. Compression 동작 과정 (2) Write Buffer Data Chunk Table Mapping Table 1503 1307 1309 1520 Compression algorithm (LZRW3) 쓰기 버퍼에 4개의 페이지를 모은 후, 쓰기버퍼에 모인 데이터 전체를 compress … … … … … update … 2122 2 2122 2 update … … 1311 1312 2122 2123 2124 Flash Memory … … … Compression Chunk Compression Chunk Mini Project: Compression-Aware FTL Write operation : datacompression 을하지 않는 경우

  15. Decompression 동작 과정 Data Chunk Table Mapping Table 301 302 507 508 Compression algorithm (LZRW3) Compression chunk 전체 decompress후, 요청이 들어온 페이지만 host에게 전달 … … … … … … … … … … … … 2311 2312 Flash Memory … … Compression Chunk Mini Project: Compression-Aware FTL Read operation : LBN 302번 읽기 요청일 경우

  16. 가비지 컬렉션 • 사용된 블록 중 다음 블록을 교체 대상으로 선정 • (1) 빈 블록이 아닌 블록 • (2) Compression chunk 내 유효 페이지 수가 가장 적은 블록 • 페이지 이주에 따른 부하가 상대적으로 적은 블록 • 페이지 기반 FTL 의 greedy 정책과 유사한 방식임 Mini Project: Compression-Aware FTL

  17. 교체할 블록 선정 예 플래시 페이지 무효한 압축된 페이지 유효한 압축된 페이지 이주 비용 측면에서 가장 저렴한 블록임 Compression Chunk 1 Compression Chunk 2 Block 1 Block 2 Block 3 Mini Project: Compression-Aware FTL

  18. 페이지 이주 (블록 합병) 과정 • 선택된 교체 블록 내의 유효한 페이지를 빈 블록에 복사 • (1) Compression chunk를 압축 해제하여 유효한 데이터만 임시로 버퍼에 저장함 • (2) 압축 해제된 페이지 4개를 다시 압축하여 새로운 compression chunk를 생성함 • (3) 새로 만든 compression chunk를 빈 블록에 기록 • (4) 일반적인 쓰기 연산과 동일하게 페이지 사상 테이블과 chunk table을 알맞게 갱신함 Mini Project: Compression-Aware FTL

  19. 페이지 이주 (블록 합병) 과정 예 (3) 기록 (2) 재압축 Free Block (1) 압축해제 후 임시 버퍼에 저장 삭제 삭제 Block 1 Block 2 Block 3 Block 1, Block 2, Block 3이 순차적으로 Victim 으로 선택되어 합병된다고 가정함 Mini Project: Compression-Aware FTL

  20. 참고자료 • 세부적인 설명은 다음 논문을 참고 • “Improving Performance and Lifetime of Solid-State Drives Using Hardware-Accelerated Compression,” IEEE Transactions on Consumer Electronics, Vol. 57, Issue 4, pp. 1732-1739, December 2011. Mini Project: Compression-Aware FTL

  21. 관련코드 • 개선된 코드를 다운 받은 후 사용 • Data compression을 위해 새로 수정된 코드를 올려놓았음 • 압축 알고리즘 • LZRW3 알고리즘 사용하여 관련 코드는 제공함 • lzrw3.c / lzrw3.h • 홈페이지의 공지 글 확인 Mini Project: Compression-Aware FTL

  22. 평가 방법 • STEP1: FTL 초기화 확인 • 파일 시스템 초기화가 정상적으로 이루어지는지 확인 • mkfs 및 mount 과정이 정상적으로 수행되는지 확인 • STEP2: FTL 데이터 기록 확인 • 대량의 압축된 데이터 기록 후 압축이 정상적으로 해제되는지 확인 • 페이지 캐시의 영향이 없도록 평가 전 페이지 캐시를 비움 • sudo –c “echo 3 > /proc/sys/vm/drop_caches” • STEP3: FTL 동작 및 성능 평가 • bonnie++.sh, run_postmark.sh, run_tiobench.sh: 성능 평가 • /home/ssd/blueftl_lab1/benchmark 디렉터리 참고 Mini Project: Compression-Aware FTL

  23. 과제 제출 • 제출 자료 • 구현한 소스 코드와 결과 보고서 제출 • 제출 방법 • 다음 이메일 주소로 제출: • 한상욱 / shanehahn@davinci.snu.ac.kr • 기타 문의 사항: • 이성진 / chamdoo@davinci.snu.ac.kr • 제출 시간 • 2012년 6월 12일 (화) 오후 2시까지 Mini Project: Compression-Aware FTL

More Related