The Design of a Flash-based Linux Swap System. Yeonseung Ryu Myongji University October, 2008



Similar documents
Problem Set 2 Solution

California Advance Health Care Directive

A Production-Delivery Inventory System under Continuous Price Decrease and Finite Planning Horizon

FREQUENTLY ASKED QUESTIONS-PLP PROGRAM

Hardware components. Typical connections and data flow. Student 3 page 1: Low Merit

Tips to Prepare for Quarter-End and Year-End

Virtual Memory and Address Translation

Implementing ifolder Server in the DMZ with ifolder Data inside the Firewall

CSE 231 Fall 2015 Computer Project #4

A Beginner s Guide to Building Virtual Web Servers

The actions discussed below in this Appendix assume that the firm has already taken three foundation steps:

Global Search Marketing

Using Sentry-go Enterprise/ASPX for Sentry-go Quick & Plus! monitors

Chapter 04.00E Physical Problem for Electrical Engineering Simultaneous Linear Equations

How to put together a Workforce Development Fund (WDF) claim 2015/16

CS4500/5500 Opera-ng Systems Distributed and Parallel File Systems

*The most important feature of MRP as compared with ordinary inventory control analysis is its time phasing feature.

What Happens To My Benefits If I Get a Bunch of Money? TANF Here is what happens if you are on the TANF program when you get lump-sum income:

Application Note: 202

Army DCIPS Employee Self-Report of Accomplishments Overview Revised July 2012

Chapter 3: Cluster Analysis

Software Distribution

Licensing Windows Server 2012 for use with virtualization technologies

Microsoft SQL Server Administration

Exercise 5 Server Configuration, Web and FTP Instructions and preparatory questions Administration of Computer Systems, Fall 2008

IN-HOUSE OR OUTSOURCED BILLING

Exercise 5 Server Configuration, Web and FTP Instructions and preparatory questions Administration of Computer Systems, Fall 2008

Local Mobility Anchoring for Seamless Handover in Coordinated Small Cells

Segment-oriented Recovery

Atom Insight Business Solution Bundles

What is Software Risk Management? (And why should I care?)

Licensing Windows Server 2012 R2 for use with virtualization technologies

Backups and Backup Strategies

The time series data in this example are obtained from sampling a function describing the free decay of a torsion oscillator for time t > t o

THIRD PARTY PROCUREMENT PROCEDURES

UNIT PLAN. Methods. Soccer Unit Plan 20 days, 40 minutes in length. For 7-12 graders. Name

Times Table Activities: Multiplication

FOCUS Service Management Software Version 8.5 for Passport Business Solutions Installation Instructions

PROTIVITI FLASH REPORT

Helpdesk Support Tickets & Knowledgebase

How To Set Up A General Ledger In Korea

Counselor in Training Program

OUR DISCIPLINARY POLICY

(in)rl Webcast - Hardware & Technology Checklist

Mobile Workforce. Improving Productivity, Improving Profitability

Outage Probability for GPRS over GSM Voice Services

COGNITIVE REHABILITATION Information for Patients and Families

Aeroplan 2013 Star Challenge Promotion

FOR MAGENTO COMMERCE SKYPE: JMKOENRAADT

HP Connected Backup Online Help. Version October 2012

Polymorphic Shellcodes vs. Application IDSs

What's New. Sitecore CMS 6.6 & DMS 6.6. A quick guide to the new features in Sitecore 6.6. Sitecore CMS 6.6 & DMS 6.6 What's New Rev:

The Ohio Board of Regents Credit When It s Due process identifies students who

Watlington and Chalgrove GP Practice - Patient Satisfaction Survey 2011

Often people have questions about new or enhanced services. This is a list of commonly asked questions and answers regarding our new WebMail format.

FOCUS Service Management Software Version 8.5 for CounterPoint Installation Instructions

How To Install Fcus Service Management Software On A Pc Or Macbook

We have highlighted in bold a few points that need your attention urgently before the statutory notice can be served.

Document Management Versioning Strategy

1B11 Operating Systems - 3. Memory Management and Protection

990 e-postcard FAQ. Is there a charge to file form 990-N (e-postcard)? No, the e-postcard system is completely free.

2010 AT&T Business Continuity Study CENTRAL REGION (Missouri) Results

What is a dashboard and why do I want one?

How to Reduce Project Lead Times Through Improved Scheduling

A96 CALA Policy on the use of Computers in Accredited Laboratories Revision 1.5 August 4, 2015

Understand Business Continuity

Coordinating Dual Eligibles Medicare and Medicaid Managed Medical Assistance Benefits

Data Warehouse Scope Recommendations

Samsung Omnia II Software Upgrade for Microsoft Windows XP Instructions

efusion Table of Contents

Information Guide Booklet. Home Loans

Small Business Fraud Custom Study among Small Business Owners Conducted for SunTrust Banks/National Small Business Association/Edelman

UNIVERSITY OF WINCHESTER

Applied Computer Science

PLANNING FOR QUALITY CARE AND INDEPENDENCE. Why you need to plan for long-term care assistance, and what funding options are available.

Draft for consultation

P CARD College of Health and Rehabilitation Sciences: Sargent Internal Policy

Firewall/Proxy Server Settings to Access Hosted Environment. For Access Control Method (also known as access lists and usually used on routers)

WHITEPAPER SERIES

Trends and Considerations in Currency Recycle Devices. What is a Currency Recycle Device? November 2003

Additional Resources Refer to the Inventory Year-End Closing Tips. Refer to the Inventory Year-End Questions and Answers.

The ad hoc reporting feature provides a user the ability to generate reports on many of the data items contained in the categories.

WHITE PAPER. Vendor Managed Inventory (VMI) is Not Just for A Items

What Advantage Medical Billing Solutions Can Do For You and The Financial Health of Your Practice

Group Term Life Insurance: Table I Straddle Testing and Imputed Income for Dependent Life Insurance

Welcome to CNIPS Training: CACFP Claim Entry

Flash Padlock. Self-Secured and Host-Independent USB Flash Drive White Paper. April 2007 Prepared by ClevX, LLC for Corsair Memory

Student Academic Learning Services Page 1 of 7. Statistics: The Null and Alternate Hypotheses. A Student Academic Learning Services Guide

Samsung Saga Software Upgrade for Microsoft Windows Vista Instructions

Meet Moodle Students introduction to Moodle and

Personal Selling. Lesson Objectives Meaning of Personal Selling

Blue Link Solutions Terminal Server Configuration How to Install Blue Link Solutions in a Terminal Server Environment

Internal Audit Charter and operating standards

Marketing Consultancy Division (MCD) Export Consultancy Unit (ECU) Export in Focus. Export Market Expansion Strategies. Rabi-I, 1427 (April, 2006)

Dr. Vernique Mirn, PhD. The University of Edinburgh (MRC) And MS

RECOMMENDATIONS SECURITY ONLINE BANK TRANSACTIONS. interests in the use of IT services, such as online bank services of Société Générale de Banques au

TOWN OF PAYSON WATER DEPARTMENT BACKFLOW PREVENTION PROGRAM CUSTOMER INFORMATION PACKAGE

ACTIVITY MONITOR. Live view of remote desktops. You may easily have a look at any user s desktop.

Software Update Notification

Transcription:

The Desig f a Flash-based Liux Swap System Yeseug Ryu Mygji Uiversity Octber, 2008

Ctets Overview f liux Swap System Hw des the swap system perates? What are the prblems f flash based swap system? New Swap System Segmet-based swap space maagemet ad fast start-up Blck-aliged read-ahead swap-i scheme Perfrmace evaluati 2

Itrducti All mder geeral-purpse OS use virtual memry techiques. Mst f virtual memry implemetatis divide the virtual address space f a applicati prgram it pages; Page size is usually 4KB i liux. Whe a applicati executes, its ctets (cde ad data) are laded demad it page frames f mai memry. The stack ad heap f the prcess are created i the mai memry demad. 3

Itrducti Whe the free memry is almst used up, the Liux kerel perfrms page frame reclaimig. Page frame reclaimig prcedure picks up victim page frames ad makes them free. If a victim page frame is mapped t a prti f a disk file ad the page is dirty, the kerel writes the ctet f the page frame t the crrespdig disk file. If a victim page frame is t mapped t a disk file like stack ad heap (it is called as aymus pages), the kerel saves the page ctets i a dedicated disk partiti (r a disk file) called swap area. 4

Liux Swap System task pgd page table pte swap ut ivalid slt Swap slt swap i RAM Swap Area (file r partiti) A swap area csists f a sequece f swap slts: 4KB blcks used t ctai a swapped-ut page. Whe a aymus page is selected fr page reclamati, it is swapped ut t the swap area. Swap-i perati ccurs whe a prcess attempts t address a page that has bee swapped ut. Whe a page is swapped-i frm swap area t mai memry, we call its slt ivalid slt. 5

Swap-ut Liux swap system has bee ptimized t reduce disk seek time. I rder t miimize disk seek time, the kerel tries t stre swap-ut pages i ctiguus slts ad thus allcates slts frm the last allcated slt. This simple apprach, hwever, ca icrease the average seek time durig swap-i peratis because may ccupied swap slts may be scattered far away frm e ather. 6

Swap-ut I rder t address this prblem liux kerel restarts allcati frm the begiig f the swap area wheever 256 free slts were allcated after the last restart frm the begiig f the swap area. S, kerel uses slts agai that became free due t swap-i requests. Hwever, whe flash memry is used as swap device, reusig these free slts requires erase peratis. Mrever, sice flash memry des t require seek perati, kerel des t eed t restart allcati frm the begiig f the swap area. 7

Swap-i A swap-i perati tries t read ctiguus eight pages icludig the requested e. Why read-ahead? Lcality prperty : eighbr pages ted t be accessed s. Seek time: sme csecutive pages are read at a time. Whe flash memry is used as swap device, hwever, swap-i perati with read-ahead ca ivalidate the swap slts that lie ver tw erase blcks. I rder t reuse these eight slts t stre swapped-ut pages, we eed tw blck erase peratis. Liux swap-i 8

New swap system Csideratis Fast start-up Miimizig garbage cllecti cst Wear-levelig 9

fast start-up? Whe the system is bted, kerel eeds t clea etire swap space sice the previus data i the swap area are bslete. This cleaig perati makes system start-up time lger.. Wrst cleaig time vs. swap area size 30000 blck size: 128KB blck erase time: 1.5ms erase time (ms) 25000 20000 15000 10000 5000 0 25 secds 512M 1G 1.5G 2G swap area size 10

Swap space maagemet Patet: Segmet based swap space maagemet, Octber, 2008 Swap space is divided it segmets. Swap area (Flash memry), slt erase blck segmet 11

Segmet-based swap space maagemet Each segmet csists f a set f erase blcks. Each segmet has a segmet header which ctais segmet status (used/free) ad erasure cuter. A segmet is a uit f erase. That is, all the blcks i a segmet are erased tgether at a time. Whe the segmet is erased, segmet status becmes free ad erasure cuter is icreased by 1. 12

Segmet-based swap space maagemet Durig the start-up, kerel scas all segmet headers ad cstructs data structure abut segmets i the RAM. After cstructig segmet data structure, kerel determies the umber f segmets which must be erased by start-up prcedure. If there is a give limit f start-up time, start-up prcedure ca clea ly a few segmets. Legth f start-up time vs. amut f free swap space If the kerel des t clea all ivalid segmets, remaiig ivalid segmets will be erased by garbage cllecti prcess afterwards. This space maagemet scheme ca limit start-up time. 13

Segmet-based swap space maagemet We are studyig... Segmet size Start-up time limit Hw may segmets are erased by start-up prcedure Garbage cllecti algrithm Wear-levelig etc 14

Blck-aliged read-ahead swap-i Patet: Read-ahead swap-i methd csiderig flash memry erasure blck, May. 2008 Liux swap-i Blck-aliged swap-i Prpsed scheme reads ahead pages that lie i the same blck. We eed ly e erase perati t reuse swapped-i slts. By reducig the umber f ivalid blcks t be erased, we ca decrease the garbage cllecti (GC) cst. 15

Aalysis f Liux swap I/O traces I rder t evaluate perfrmace, we cllected sme swap I/O traces frm liux kerel. Mst f all, we wat t kw the swap-i behaviur. S, we tured ff read-ahead pti f swap-i befre cllectig the traces. Because we disabled read-ahead pti, all swapped-i pages were laded demad ad we ca examie the pure swap-i behaviur. We examied if the lcality exists i the swap slt accesses due t swap-i peratis. We fud that the tempral/spatial lcality exist i the swap-i refereces 16

Lcality f Swap-i patter These figures shw the slt umbers accessed by swap-i peratis f a particular prcess. slt umber slt umber 6000 5000 4000 3000 2000 1000 0 6000 5000 4000 3000 2000 1000 0 sedmail 0 20 40 60 80 100 120 140 160 180 200 sequece f swap-i Xrg 0 10 20 30 40 50 60 70 sequece f swap-i 17

Read ahead?? Due t lcality, read-ahead is a gd apprach t reduce the disk seek time. Flash memry des t require seek time but read-ahead ca result i better perfrmace. Read-ahead ca decrease the umber f page faults 18

Perfrmace Evaluati We have perfrmed trace-drive simulati t ivestigate the perfrmace f read-ahead swap-i schemes ad garbage cllecti algrithms. Swap-ut : allcates slts sequetially Swap-i: read-ahead 8 pages by liux swap scheme 8 pages by blck-aliged scheme 16 pages by blck-aliged scheme 32 pages by blck-aliged scheme Garbage cllecti algrithms Greedy (GR) Cst-Beefit (CB) Cst-Age-Time (CAT) Cst Beefit with Age (CBA) 19

Perfrmace Evaluati Garbage cllecti algrithms Greedy (GR) : selects a blck with the largest amut f ivalid slts Cst-Beefit (CB) : selects a blck that maximize the frmular: age (1 - u ) 1 + u age : the time sice the mst recet mdificati u : the fracti f space ccupied by valid slts Cst-Age-Time (CAT) : selects a blck that maximize the frmular: 1-1+ u u age erase 1 _ cut Cst Beefit with Age (CBA) : selects a blck like CB ad srts valid slts with ages ad mves the ldest pages first 20

Perfrmace Evaluati Thrugh the simulati, we measured the fllwig perfrmace metrics t calculate the garbage cllecti cst. read cut erase cpy cut : the umber f writes due t GC erase cut Garbage cllecti must cpy the valid slts i the victim blck t the free space befre erasig it. Cpy perati requires read ad write perati. Garbage cllecti cst Cst = read_cut + cpy_cut*10 + erase_cut*75 the write perati is 10 times slwer tha the read perati ad the erase perati is 75 times slwer tha the read perati. 21

erase_cpy_cut Sme Results 250 200 150 100 50 0 GR CB 8_erase_cpy 32_erase_cpy CAT GC algrithms have little effect. The umber f read-ahead has little effect. Blck-aliged read-ahead utperfrms -blck-aliged read-ahead. CBA 16_erase_cpy liux_erase_cpy 22

Sme Results GC Cst As a result, GC cst f prpsed blck-aliged swap-i scheme is almst three times smaller tha liux scheme.

Cclusis Segmet based swap space maagemet ca reduce the start-up time. Blck-aliged read-ahead scheme ca reduce the garbage cllecti cst. We are yet studyig.. 24

Thak yu.. ysryu@mju.ac.kr 25

Swap-i request 26