in in mo mobi bile le de devices ices
play

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.,


  1. 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., Suwon, Korea + Sungkyunkwan University 1

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

  3. Introduction 3

  4. Problem and Motivation  Launching the contacts APP 4

  5. Problem and Motivation  Burst Mode in the camera APP  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% 5

  6. Problem and Motivation  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 6

  7. Linux Kernel I/O Path Ext4 orderd 7

  8. Quasi-Asynchronous I/O  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 8

  9. Types of Dependencies on QASIO 9

  10. Direct Dependencies  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 10

  11. D meta 11

  12. D meta 12

  13. D meta 13

  14. D meta 14

  15. D meta 15

  16. D sync 16

  17. D sync 17

  18. D sync 18

  19. D sync 19

  20. D sync 20

  21. D sync 21

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

  23. I jhandle 23

  24. I jhandle 24

  25. I jhandle 25

  26. I jhandle 26

  27. I jhandle 27

  28. I jhandle 28

  29. How to Boost a QASIO  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 29

  30. Implementation 30

  31. Implementation 1 31

  32. Detecting D meta  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 32

  33. Detecting D data and D sync 33

  34. Detecting D discard  Ext4_free_data_callback() function is called whenever the block deallocation is required at the end of journal commit 34

  35. Implementation 2 35

  36. Evaluation  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 36

  37. Microbenchmarks  M1  creat() -> write(4KB) -> fsync() -> close()  500 times creat() and fsync() D meta QASIO 37

  38. Microbenchmarks  M2  creat() -> write(1MB) -> fsync() -> close()  200 times 38

  39. Microbenchmarks  M3  creat()  write(1KB) until file size reaches 300MB write() D data QASIO 39

  40. Microbenchmarks  M4  200M -> truncate(2M ) -> 0 -> write() -> 200M -> close()  500 times truncate() D sync QASIO 40

  41. Microbenchmarks  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 41

  42. Real-life Scenarios  Launching the contacts APP 44.8% 42

  43. Real-life Scenarios  Burst Mode in the camera APP 14.4% 43

  44. Real-life Scenarios  Installing the angry birds APP 11.5% 44

  45. Conclusions  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 of file system operations 45

Recommend


More recommend