fasttrack foreground app aware i o
play

FastTrack: Foreground App-Aware I/O Management for Improving User - PowerPoint PPT Presentation

FastTrack: Foreground App-Aware I/O Management for Improving User Experience of Android Smartphones Jihong Kim Seoul National University NVRAMOS 2018 October 25, 2018 Mobile Storage Optimization Research Why does my aging smartphone get


  1. FastTrack: Foreground App-Aware I/O Management for Improving User Experience of Android Smartphones Jihong Kim Seoul National University NVRAMOS 2018 October 25, 2018

  2. Mobile Storage Optimization Research Why does my aging smartphone get slower? 3/36

  3. App Launch Time over Smartphone Age App launch time Galaxy S6 Galaxy S6 Galaxy S6 Galaxy S6 (new) (6 months) (1 year) (2 years) Application launch times increase up to 3 times on 2-year old smartphones 4/36

  4. Main Cause: File Fragmentation Q: Why does A: File performance fragmentation degrade ? Application launching time Nexus 6 G5 Galaxy S6 Xperia Z3 0% files 16% files 22% files 0% files 27% files 0% files 34% files 0% files fragmented fragmented fragmented fragmented fragmented fragmented fragmented fragmented Defragmentation can improve the degraded performance by fragmentation / 20 5

  5. Solution for Decoupled Fragmentation [ATC 2017] Logical Physical Janus usd Defragmenter Defragmenter Logical Physical fragmentation fragmentation Defrag logical fragmentation Improve the low degree using address remapping of I/O parallelism without data copies Janus Defragmenter Contiguous File Contiguous File Logical Physical fragmentation fragmentation Common Rare case Fragmented File case Fragmented File App Launch Time App Launch Time / 20 6

  6. Storage I/O Stack Analysis for Performance Bottlenecks ▪ Storage I/O Profiler (IOPro) App1 App2 I/O – Monitor Linux kernel I/O stack Visualizer Applications Android Platform (Processes) … Libraries SQLite FileSystem size:2253 lba:1675816 file:scrollpause.jar read Android I/O Profiler System Call IOPro File System I/O Profiler Linux File System Page Cache Kernel Block Layer I/O Profiler Block Device Driver Device Driver I/O Profiler SCSI Interface Storage Driver I/O DB Converter I/O Packet HW UFS size:4096 lba:1675816 file:scrollpause.jar read Flash Device (e.g., UFS, NVMe) Device 7/36

  7. Focus on Foreground App Performance Performance Degradation File FG-BG I/O Fragmentation Interference Foreground App Read Performance ↓ Performance ↓ Foreground App- Decoupled Aware I/O Mgmt. Defragmenter File System Page Cache & & FTL FTL 8/36

  8. Outline • Impact of Background I/O on User Experience • Foreground-Background Interference Analysis • FastTrack: Foreground App-Aware I/O Management • Experimental Results • Conclusions 9/36

  9. User Experience in Android Smartphones App Launch App Runtime App Switch App response time is crucial to the user experience 10/36

  10. Number of Background Apps Increasing Apps running User can allow in background apps to run background Updating Apps 8 cores 8 cores 8 cores Sync files 8 GB RAM 6 GB RAM 4 GB RAM Sync photos Number of background processes has been increased with larger memory and more CPU cores 11/36

  11. Background Apps Degrade the Quality of User Experience App launch time increases due to background apps App Update BG App launch time BG BG BG Nexus 5 Nexus 6 Galaxy S6 Pixel Background apps increase foreground app launch time by up to 2.6 times 12/36 12

  12. Background Apps Degrade the Quality of User Experience App switch time increases due to background apps App Update BG BG App switch time BG BG Nexus 5 Nexus 6 Galaxy S6 Pixel Background apps increase foreground app switch time by up to 19.5 times 13/36

  13. Main Cause of Performance Degradation How background apps degrade Background (storage) I/Os the quality of user experience ? Performance ↓ No GPU? Network? rendering even in offline for BG apps CPU? Storage? Network CPU Storage iowait iowait Network BG CPU Storage iowait iowait 14/36

  14. Background I/O Occurrence Frequency Q: Do background I/Os (BG I/Os) occur frequently ? Examples of Background Apps Popular apps are Average days between releases updated in 1 to 2 weeks 3 weeks App Update Photo Upload BG 2 weeks 1 week App Update Media Download File Scan Frequent BG I/O occurrences have a critical impact on the user experience 15/36

  15. Outline • Impact of Background I/O on User Experience • Foreground-Background Interference Analysis • FastTrack: Foreground App-Aware I/O Management • Experimental Results • Conclusions 16/36

  16. Foreground-Background Interference Analysis Android Storage I/O Stack Android File Page Block I/O Storage Application Platform System Cache Layer Device Page Cache Launch BG Update Block Layer Storage Device Runtime BG Update Switch BG Update Page cache and storage device are affected most by FG-BG interference 17/36

  17. Impact on Page Cache: Lock Contention Waiting BG FG BG App App App Clean Pages Dirty Pages FG data BG data BG data FG data BG data BG data Page Cache Storage Device FG data BG data BG data Lock contentions in the page cache can significantly degrade the user experience by waiting the completion of BG I/Os frequently 18/36

  18. Impact on Page Cache: High Miss Rate BG FG BG Page Cache Page Miss App App App Replacement Clean Pages Dirty Pages BG data BG data FG data FG data BG data BG data BG data BG data BG data BG data Page Cache Long Latency Storage Device FG data FG data BG data BG data Existing page cache replacement policy can significantly degrade the user experience by evicting performance-critical hot FG pages 19/36

  19. Impact on I/O Scheduler: Limited Bandwidth by CFQ FG + BG Queue Depth (16) FG Only 20/36

  20. Impact on Storage Device: Internal Priority Inversion NAND Flash-based Storage Device Read Request Write Request FIFO FIFO Read Request Write Request Read Request Write Request ① ② NAND Flash Memory Storage Storage Throughput Throughput Switch ( write-dominant ) FG I/O BG I/O (MB/sec) FG I/O BG Reads BG (sec) (sec) 0 1 2 3 4 0 1 2 3 4 Existing device I/O scheduler’s priority policy can significantly degrade the user experience by limiting the throughput of foreground I/Os 21/36

  21. Solution for Foreground-Background Interference Android Storage I/O Stack Android File Page Page Block I/O Block I/O Storage Storage Application Platform System Cache Cache Layer Device Layer Device Read/Write Get Dispatch Preempt Keep FastTrack FG I/O FG I/O FG App BG I/O FG Data First First Information Storage I/O Path BG I/O FG I/O FG I/O BG I/O BG I/O BG I/O >>> >>> FastTrack >>> >>> FG I/O FastTrack is effective in improving FG I/O needs to wait New vertically-integrated the BG I/O’s completion Android smartphone user experience fast I/O path is needed 22/36

  22. Outline • Impact of Background I/O on User Experience • Foreground-Background Interference Analysis • FastTrack: Foreground App-Aware I/O Management • Experimental Results • Conclusions 23/36

  23. Overview of FastTrack App Status Android Platform Detector FG app’s UID Page Cache Page Preempt Preempt Prevent FG Prevent FG Detect Detect Allocator I/O Operations I/O Operations FG I/Os FG I/Os Data from Data from Page for BG I/Os for BG I/Os Being Flushed Being Flushed using UID using UID Reclaimer Storage I/O Device Deliver Dispatcher Detect Preempt Deliver FG I/Os FG I/O BG I/Os’ FG I/Os to NAND flash Device I/O Instantly using Tagging Dispatching chip instantly Scheduler Improves foreground I/O performance & Improves the quality of smartphone user experience 24/36

  24. App Status Detector & Page Reclaimer Running Activity Android Platform ① Detect Activity A App Status Launch Detector FG App Last Running (UID: Activity B Linux Kernel 10003) Page Activity C FG App UID sysfs = 10003 Reclaimer Trigger Activity Stack (10003) ② Prevent FG Data Clean Pages Dirty Pages Page FG data FG data BG data FG data FG data BG data BG data BG data Cache (UID (UID (UID (UID (UID (UID (UID (UID 10003) 10003) 10001) 10001) 10001) 10003) 10003) 10001) 25/36

  25. Page Allocator Read BG Write File A File B (UID 10003) (UID 10001) App Update ① Page FG App UID FG I/O Flag FG I/O Flag Linux = 10003 = true Allocator = false Detect Kernel ② Preempt ③ Resume Get_free_pages (4 pages) Get_free_pages (4 pages) Checkpoint Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Page Cache 26/36

  26. I/O Dispatcher ◆ Moves FG block I/O requests to the dispatch queue immediately • 1. Detect new block I/O request enters the sync/async queues • 2. Prevalidate whether new block I/O request is FG I/O • 3. Directly deliver FG block I/O request to the dispatch queue 27/36

  27. Device I/O Scheduler ◆ Execute FG I/O commands with high priority • New priorities for I/O command execution ➢ FG reads >FG writes > BG reads > BG writes • Modify an SCSI command set to carries an FG I/O flag in a reserved opcode 28/36

  28. Experimental Settings for Android Smartphones Android Storage I/O Stack Android File Page Block I/O Storage Application Platform System Cache Layer Device App Status Page Page I/O FastTrack -- FastTrack Detector Allocator Reclaimer Dispatcher FG App BG App Usage Scenario Usage Scenario ① BG Launch (Read-dominant) Update (Write-dominant) ② BG Switch (Write-dominant) Upload (Read-dominant) 29/36

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend