in in Mo Mobi bile le De Devices ices FAST 2015 Daeho Jeong - - PowerPoint PPT Presentation

in in mo mobi bile le de devices ices
SMART_READER_LITE
LIVE PREVIEW

in in Mo Mobi bile le De Devices ices FAST 2015 Daeho Jeong - - PowerPoint PPT Presentation

Boost Bo sting ing Qu Quasi si-Asynchr Asynchronous onous I/O /O for Bet Better er Res espo ponsiv nsiveness eness in in Mo Mobi bile le De Devices ices FAST 2015 Daeho Jeong *+ , Youngjae Lee + , Jin-Soo Kim * Samsung Co.,


slide-1
SLIDE 1

FAST 2015

Daeho Jeong *+ , Youngjae Lee + , Jin-Soo Kim

* Samsung Co., Suwon, Korea + Sungkyunkwan University

Bo Boost sting ing Qu Quasi si-Asynchr Asynchronous

  • nous I/O

/O for Bet Better er Res espo ponsiv nsiveness eness in in Mo Mobi bile le De Devices ices

1

slide-2
SLIDE 2

Outline

2

 Introduction  Problem and Motivation  Linux Kernel I/O Path  Quasi-Asynchronous I/O  Boosting QASIOs  Evaluation  Conclusion

slide-3
SLIDE 3

Introduction

3

slide-4
SLIDE 4

Problem and Motivation

4

 Launching the contacts APP

slide-5
SLIDE 5

Problem and Motivation

5

 Burst Mode in the cameraAPP

 30 shots by touching and holding on the shot icon  When the image size is large, performance is degraded by 19%

 Installing the angry birds APP

 4GB file is written in the background  Average installation time increases by 35%

slide-6
SLIDE 6

Problem and Motivation

6

 During installing or launching an app

 Many synchronous I/Os, such as read()’s or write()’s followed

by fsync() are issued

 Priority

 synchronous I/Os > asynchronous I/Os

 The progress of a file system operation is blocked by

undispatched asynchronous I/Os

slide-7
SLIDE 7

Linux Kernel I/O Path

7

Ext4 orderd

slide-8
SLIDE 8

Quasi-Asynchronous I/O

8

 Synchronous I/O

 The calling task is blocked until the I/O request is completed

 Asynchronous I/O  Quasi-Asynchronous I/O(QASIO)

 The I/O which is seemingly asynchronous but has the

synchronous property because one or more tasks are waiting for its completion

slide-9
SLIDE 9

Types of Dependencies on QASIO

9

slide-10
SLIDE 10

Direct Dependencies

10

 D meta : When modifying a metadata page  D data : When modifying a data page  D sync : When guaranteeing data to be written back  D discard : When completing discard commands

 deallocate block

slide-11
SLIDE 11

D meta

11

slide-12
SLIDE 12

D meta

12

slide-13
SLIDE 13

D meta

13

slide-14
SLIDE 14

D meta

14

slide-15
SLIDE 15

D meta

15

slide-16
SLIDE 16

D sync

16

slide-17
SLIDE 17

D sync

17

slide-18
SLIDE 18

D sync

18

slide-19
SLIDE 19

D sync

19

slide-20
SLIDE 20

D sync

20

slide-21
SLIDE 21

D sync

21

slide-22
SLIDE 22

Indirect Dependencies

22

 I jhandle : When unable to obtain a journal handle  I jcommit : When unable to complete fsync()

slide-23
SLIDE 23

I jhandle

23

slide-24
SLIDE 24

I jhandle

24

slide-25
SLIDE 25

I jhandle

25

slide-26
SLIDE 26

I jhandle

26

slide-27
SLIDE 27

I jhandle

27

slide-28
SLIDE 28

I jhandle

28

slide-29
SLIDE 29

How to Boost a QASIO

29

 Req.(1): When a task is waiting for an asynchronous I/O’s

completion, the kernel gives information about QASIO to the I/O scheduler

 Req.(2): The I/O scheduler should prioritize them among

asynchronous I/Os based on the hint

slide-30
SLIDE 30

Implementation

30

slide-31
SLIDE 31

Implementation 1

31

slide-32
SLIDE 32

Detecting D meta

32

 Before a task modifies a metadata page, it obtains an

exclusive lock to the metadata page using the lock_buffer() kernel function

lock_buffer() Asy IO

slide-33
SLIDE 33

Detecting D data and D sync

33

slide-34
SLIDE 34

Detecting D discard

34

 Ext4_free_data_callback() function is called whenever the

block deallocation is required at the end of journal commit

slide-35
SLIDE 35

Implementation 2

35

slide-36
SLIDE 36

Evaluation

36

 Samsung Galaxy S5

 Exynos 5422 (quad Cortex-A15 & quad Cortex-A7)  2GB DRAM  16GB eMMC storage (S.W

.: 54.5MB/s, R.W .: 10.4MB/s)

 Android platform version 4.4.2 (KitKat)  Linux kernel version 3.10.9

slide-37
SLIDE 37

Microbenchmarks

37

 M1

 creat() -> write(4KB) -> fsync() -> close()  500 times

creat() and fsync() D meta QASIO

slide-38
SLIDE 38

Microbenchmarks

38

 M2

 creat() -> write(1MB) -> fsync() -> close()  200 times

slide-39
SLIDE 39

Microbenchmarks

39

 M3

 creat()  write(1KB) until file size reaches 300MB

write() D data QASIO

slide-40
SLIDE 40

Microbenchmarks

40

 M4

 200M -> truncate(2M ) -> 0 -> write() -> 200M -> close()  500 times

truncate() D sync QASIO

slide-41
SLIDE 41

Microbenchmarks

41

 M5

 creat() -> write(4KB) -> fsync() -> close()  another task truncates an existing 8GB file and writes 8GB of

data again to the file

I jcommit D discard QASIO

slide-42
SLIDE 42

Real-life Scenarios

42

 Launching the contacts APP

44.8%

slide-43
SLIDE 43

Real-life Scenarios

43

 Burst Mode in the camera APP

14.4%

slide-44
SLIDE 44

Real-life Scenarios

44

 Installing the angry birds APP

11.5%

slide-45
SLIDE 45

Conclusions

45

 Introduces a new type of I/O called Quasi-Asynchronous

I/O(QASIO)

 A novel scheme to detect QASIOs and boost them in the

Linux kernel

 Boosting QASIOs is effective in improving the responsiveness

  • f file system operations