+ All Categories
Home > Documents > DADA – Dynamic Allocation of Disk Area

DADA – Dynamic Allocation of Disk Area

Date post: 28-Jan-2016
Category:
Upload: abra
View: 51 times
Download: 0 times
Share this document with a friend
Description:
DADA – Dynamic Allocation of Disk Area. Jayaram Bobba Vivek Shrivastava. Outline. Introduction Existing Framework Implementation Issues Results Conclusions. Problem. Disk Volumes Allocate physical space on creation Multiple Disk Volumes on a physical disk Unused space - PowerPoint PPT Presentation
Popular Tags:
61
Department of Computer Sciences, University of Wisconsin Madison DADA – Dynamic Allocation of Disk Area Jayaram Bobba Vivek Shrivastava
Transcript
Page 1: DADA – Dynamic Allocation of Disk Area

Department of Computer Sciences, University of Wisconsin Madison

DADA – Dynamic Allocation of Disk Area

Jayaram Bobba

Vivek Shrivastava

Page 2: DADA – Dynamic Allocation of Disk Area

Department of Computer Sciences, University of Wisconsin Madison

Outline

Introduction Existing Framework Implementation Issues Results Conclusions

Page 3: DADA – Dynamic Allocation of Disk Area

Department of Computer Sciences, University of Wisconsin Madison

Problem

Disk Volumes Allocate physical space on creation

Multiple Disk Volumes on a physical disk Unused space Disk space not a premium What If?

Page 4: DADA – Dynamic Allocation of Disk Area

Department of Computer Sciences, University of Wisconsin Madison

Motivation

Virtual Machine Environment Add Some points

Storage Area Networks Storage area is the bo

Dynamic Physical Allocation (LFS style)

Page 5: DADA – Dynamic Allocation of Disk Area

Department of Computer Sciences, University of Wisconsin Madison

Related Work

HP AutoRAID Dynamically change redundancy levels Hot Data – Mirrored Cold Data – RAID 5 Dynamic migration of data

Page 6: DADA – Dynamic Allocation of Disk Area

Department of Computer Sciences, University of Wisconsin Madison

Outline

Introduction

Existing Framework Implementation Issues Results Conclusions

Page 7: DADA – Dynamic Allocation of Disk Area

Department of Computer Sciences, University of Wisconsin Madison

Existing Framework

Logical Volume Manager (LVM) User space tool that enables creation of logical

volumes of a logical partition. Supports resizing of volumes.

Device Mapper (DM) Kernel driver that provides a level of indirection in

address translation

Page 8: DADA – Dynamic Allocation of Disk Area

Department of Computer Sciences, University of Wisconsin Madison

LVM design

Volume Group (VG) Physical Volume (PV) Logical Volume (LV) Physical Extent (PE) Logical Extent (LE)

Page 9: DADA – Dynamic Allocation of Disk Area

Department of Computer Sciences, University of Wisconsin Madison

LVM design

Physical Device

Page 10: DADA – Dynamic Allocation of Disk Area

Department of Computer Sciences, University of Wisconsin Madison

LVM design

PV

PE

Page 11: DADA – Dynamic Allocation of Disk Area

Department of Computer Sciences, University of Wisconsin Madison

LVM design

PV

PE

Page 12: DADA – Dynamic Allocation of Disk Area

Department of Computer Sciences, University of Wisconsin Madison

LVM design

PV

LV 1

PE

Page 13: DADA – Dynamic Allocation of Disk Area

Department of Computer Sciences, University of Wisconsin Madison

LVM design

PV

LE

LV 1LV2

PE

Page 14: DADA – Dynamic Allocation of Disk Area

Department of Computer Sciences, University of Wisconsin Madison

LVM design

PV

LE

LV 1LV2

PE

Page 15: DADA – Dynamic Allocation of Disk Area

Department of Computer Sciences, University of Wisconsin Madison

LVM designVG

PV

LE

LV 1LV2

PE

Page 16: DADA – Dynamic Allocation of Disk Area

Department of Computer Sciences, University of Wisconsin Madison

DM designUserspace Applications

log kcopyd

emc

ioctl interface filesystem interface

control interface block interface

core device-mapper

mapping/target interface

linear striped snapshot multipath

round-robin

path selectors

hardwarehandlers

Page 17: DADA – Dynamic Allocation of Disk Area

Department of Computer Sciences, University of Wisconsin Madison

LVM – DM interaction

Kernel

Userspace

Device Mapper

libdevmapper

LVM2

Page 18: DADA – Dynamic Allocation of Disk Area

Department of Computer Sciences, University of Wisconsin Madison

Outline

Introduction Existing Framework

Implementation Issues Results Conclusions

Page 19: DADA – Dynamic Allocation of Disk Area

Department of Computer Sciences, University of Wisconsin Madison

Modifications

A trap mechanism from kernel driver to user-level LVM code.

Support for multiple segments in LV

Support for virtual mappings in driver

Page 20: DADA – Dynamic Allocation of Disk Area

Department of Computer Sciences, University of Wisconsin Madison

Initial State

LVM

Device Mapper

User space

Kernel space

Unallocated Disk Space

LVM daemon

Page 21: DADA – Dynamic Allocation of Disk Area

Department of Computer Sciences, University of Wisconsin Madison

Volume Group Creation

LVM

Device Mapper

User space

Kernel space

Unallocated Disk Space

LVM daemon

PE (4MB) 25 Extents

Page 22: DADA – Dynamic Allocation of Disk Area

Department of Computer Sciences, University of Wisconsin Madison

Current Implementation

LVM

Device Mapper

User space

Kernel space

Free Disk Space

LVM daemon Create LV

32MB

User A

Page 23: DADA – Dynamic Allocation of Disk Area

Department of Computer Sciences, University of Wisconsin Madison

Current Implementation

LVM

Device Mapper

User space

Kernel space

Free Disk Space

LVM daemon

User A

Map 0-7 extents for user A

Page 24: DADA – Dynamic Allocation of Disk Area

Department of Computer Sciences, University of Wisconsin Madison

Current Implementation

LVM

Device Mapper

User space

Kernel space

Free Disk Space

LVM daemon

User A

Map 0-7 extents for user A

Page 25: DADA – Dynamic Allocation of Disk Area

Department of Computer Sciences, University of Wisconsin Madison

Current Implementation

LVM

Device Mapper

User space

Kernel space

Free Disk Space

LVM daemon User A

User B

Create LV

16 MB

Page 26: DADA – Dynamic Allocation of Disk Area

Department of Computer Sciences, University of Wisconsin Madison

Current Implementation

LVM

Device Mapper

User space

Kernel space

Free Disk Space

LVM daemon User A

User B

Create LV

16 MB

map 8-11 extents for B

Page 27: DADA – Dynamic Allocation of Disk Area

Department of Computer Sciences, University of Wisconsin Madison

Current Implementation

LVM

Device Mapper

User space

Kernel space

Free Disk Space

LVM daemon User A

User B

map 8-11 extents for B

Page 28: DADA – Dynamic Allocation of Disk Area

Department of Computer Sciences, University of Wisconsin Madison

Current Implementation

LVM

Device Mapper

User space

Kernel space

Free Disk Space

LVM daemon User A

User BRead/write

Read/write

Page 29: DADA – Dynamic Allocation of Disk Area

Department of Computer Sciences, University of Wisconsin Madison

Volume Group Creation

LVM

Device Mapper

User space

Kernel space

Unallocated Disk Space

LVM daemon

PE (4MB) 25 Extents

Page 30: DADA – Dynamic Allocation of Disk Area

Department of Computer Sciences, University of Wisconsin Madison

Current Implementation

LVM

Device Mapper

User space

Kernel space

Free Disk Space

LVM daemon Create LV1

32MB

User A

Page 31: DADA – Dynamic Allocation of Disk Area

Department of Computer Sciences, University of Wisconsin Madison

Current Implementation

LVM

Device Mapper

User space

Kernel space

Free Disk Space

LVM daemon

User A

Virtually map 0-7 extents for user A

{0-7 error}

Page 32: DADA – Dynamic Allocation of Disk Area

Department of Computer Sciences, University of Wisconsin Madison

Current Implementation

LVM

Device Mapper

User space

Kernel space

Free Disk Space

LVM daemon User A

User B

Create LV

16 MB

{0-7 error}

Page 33: DADA – Dynamic Allocation of Disk Area

Department of Computer Sciences, University of Wisconsin Madison

Current Implementation

LVM

Device Mapper

User space

Kernel space

Free Disk Space

LVM daemon User A

User B

Create LV2

16 MB

Virtually map 8-11 extents for B

{0-7 error} {8-11 error}

Page 34: DADA – Dynamic Allocation of Disk Area

Department of Computer Sciences, University of Wisconsin Madison

Current Implementation

LVM

Device Mapper

User space

Kernel space

Free Disk Space

LVM daemon User A

User B

{0-7 error} {8-11 error}

Write 6MB

Page 35: DADA – Dynamic Allocation of Disk Area

Department of Computer Sciences, University of Wisconsin Madison

Current Implementation

LVM

Device Mapper

User space

Kernel space

Free Disk Space

LVM daemon User A

User B

{0-7 error} {8-11 error}

writetrap

Page 36: DADA – Dynamic Allocation of Disk Area

Department of Computer Sciences, University of Wisconsin Madison

Current Implementation

LVM

Device Mapper

User space

Kernel space

Free Disk Space

LVM daemon User A

User B

{0-7 error} {8-11 error}

writetrap

On Demand allocation of disk

area

Page 37: DADA – Dynamic Allocation of Disk Area

Department of Computer Sciences, University of Wisconsin Madison

Current Implementation

LVM

Device Mapper

User space Kernel space

Free Disk Space

LVM daemon User A

User B

{0-7 error} {8-11 error}

Write 6MB

trap

On Demand allocation of disk

area

Allocate 2 extents (8MB)

Page 38: DADA – Dynamic Allocation of Disk Area

Department of Computer Sciences, University of Wisconsin Madison

Current Implementation

LVM

Device Mapper

User space Kernel space

Free Disk Space

LVM daemon User A

User B

{0-1 linear}{2-7 error}

{8-11 error}

Write 6MB

trap

On Demand allocation of disk

area

Allocate 2 extents (8MB)

Page 39: DADA – Dynamic Allocation of Disk Area

Department of Computer Sciences, University of Wisconsin Madison

Current Implementation

LVM

Device Mapper

User space Kernel space

Free Disk Space

LVM daemon User A

User B

{0-1 linear}{2-7 error}{8-11 error}

Write

10MB

Page 40: DADA – Dynamic Allocation of Disk Area

Department of Computer Sciences, University of Wisconsin Madison

Current Implementation

LVM

Device Mapper

User space

Kernel space

Free Disk Space

LVM daemon User A

User B

(0-1 linear}{0-7 error}{8-11 error}

Write 10 MB trap

Page 41: DADA – Dynamic Allocation of Disk Area

Department of Computer Sciences, University of Wisconsin Madison

Current Implementation

LVM

Device Mapper

User space

Kernel space

Free Disk Space

LVM daemon User A

User B

{0-7 error} {8-11 error}

writetrap

On Demand allocation of disk

area

Page 42: DADA – Dynamic Allocation of Disk Area

Department of Computer Sciences, University of Wisconsin Madison

Current Implementation

LVM

Device Mapper

User space Kernel space

Free Disk Space

LVM daemon User A

User B

{0-1 linear}{2-7 error}{8-10 linear}

Write 10 MBtrap

On Demand allocation of disk

area

Allocate 3 extents (12 MB)

{11 error}

Page 43: DADA – Dynamic Allocation of Disk Area

Department of Computer Sciences, University of Wisconsin Madison

Outline

Introduction Existing Framework Implementation

Issues Results Conclusions

Page 44: DADA – Dynamic Allocation of Disk Area

Department of Computer Sciences, University of Wisconsin Madison

Issues

Not the most efficient implementation On a trap,

How much to allocate? On demand Pre-allocate

Where to allocate? Temporal locality Spatial locality

Free unused space

Page 45: DADA – Dynamic Allocation of Disk Area

Department of Computer Sciences, University of Wisconsin Madison

How much?

On-demand Allocate only as many blocks as needed

Pre-allocate Pre-allocate physical space for blocks likely

to be accessed in the future. How much? Where?

Page 46: DADA – Dynamic Allocation of Disk Area

Department of Computer Sciences, University of Wisconsin Madison

How much?

Tradeoff – Performance vs. Disk Space Depends on the workload

I/O on critical path Asynchronous I/O Multithreaded Applications

Page 47: DADA – Dynamic Allocation of Disk Area

Department of Computer Sciences, University of Wisconsin Madison

Pre-Allocation

Think: Filesystem Block Allocation Dumb Allocation

Stride Allocation

Multi-Strided Allocation

Page 48: DADA – Dynamic Allocation of Disk Area

Department of Computer Sciences, University of Wisconsin Madison

Dumb Allocation

LVM

Device Mapper

User space Kernel space

Free Disk Space

LVM daemon User A

{0-1 linear}{2-7 error}

Write 6MB

trap

On Demand allocation of disk

area

Allocate 2 extents (8MB)

Page 49: DADA – Dynamic Allocation of Disk Area

Department of Computer Sciences, University of Wisconsin Madison

Stride Allocation

LVM

Device Mapper

User space Kernel space

Free Disk Space

LVM daemon User A

{0-1 linear}{2-7 error}

Write 6MB

trap

On Demand allocation of disk

area

Allocate 4 extents (16MB)

PreAllocated Extent

Page 50: DADA – Dynamic Allocation of Disk Area

Department of Computer Sciences, University of Wisconsin Madison

Ext2 access pattern

Page 51: DADA – Dynamic Allocation of Disk Area

Department of Computer Sciences, University of Wisconsin Madison

Ext3 access pattern

Page 52: DADA – Dynamic Allocation of Disk Area

Department of Computer Sciences, University of Wisconsin Madison

Outline

Introduction Existing Framework Implementation Issues

Results Conclusions

Page 53: DADA – Dynamic Allocation of Disk Area

Department of Computer Sciences, University of Wisconsin Madison

Results

Micro Benchmarks mkfs

Trace based analysis Trace collected by HP Research Lab

Page 54: DADA – Dynamic Allocation of Disk Area

Department of Computer Sciences, University of Wisconsin Madison

Micro Benchmark : mkfs

ExecutionTimes

0

20

40

60

80

100

120

140

8K 16K 32K 64K 128K 256K 512K 1M 2M 4M

Extent Size

Tim

e T

aken

(in

sec

s)

#Traps Taken

0

50

100

150

200

250

300

350

400

450

8K 16K 32K 64K 128K 256K 512K 1M 2M 4M

Extent Size

# T

rap

s T

aken

Page 55: DADA – Dynamic Allocation of Disk Area

Department of Computer Sciences, University of Wisconsin Madison

Micro Benchmark : Asynchronous I/O

Page 56: DADA – Dynamic Allocation of Disk Area

Department of Computer Sciences, University of Wisconsin Madison

Micro Benchmark : Asynchronous I/O

Page 57: DADA – Dynamic Allocation of Disk Area

Department of Computer Sciences, University of Wisconsin Madison

Trace Based Analysis

Page 58: DADA – Dynamic Allocation of Disk Area

Department of Computer Sciences, University of Wisconsin Madison

Trace Based Analysis

Page 59: DADA – Dynamic Allocation of Disk Area

Department of Computer Sciences, University of Wisconsin Madison

Outline

Introduction Existing Framework Implementation Issues Results

Conclusions

Page 60: DADA – Dynamic Allocation of Disk Area

Department of Computer Sciences, University of Wisconsin Madison

Conclusions

Tradeoff between performance penalty and space

Useful in environments where space is the bottleneck resource

Techniques like Pre Allocation reduce the performance penalty to some extent

For practical implementation, LVM must be placed in kernel address space

Page 61: DADA – Dynamic Allocation of Disk Area

Department of Computer Sciences, University of Wisconsin Madison

Conclusions

mkfs performance degrades substantially due to traps.

No degradation in performance for CPU intensive applications with asynchronous I/O

Extent size in the range of 512K-1M provide best results for the trace

This evaluation will be more realistic, if LVM is moved into Kernel Address space.


Recommended