PFcache (Linuxcon, Seattle, 2015)

Embed Size (px)

Citation preview

Denser containers with PFCache

Pavel EmelyanovContainerCon, Seattle, 2015

Agenda

How to store container files

Why shared template matters

What can be deduplicated and what should be

PFCache

Q&A

To install a font: Open Fonts by clicking the Start button , clicking Control Panel, clicking Appearance and Personalization, and then clicking Fonts.Click File, and then click Install New Font. ...In the Add Fonts dialog box, under Drives, click the drive where the font that you want to install is located.http://windows.microsoft.com/en-us/windows-vista/install-or-uninstall-fonts

How to store container files

FilesystemContainer
processes

To install a font: Open Fonts by clicking the Start button , clicking Control Panel, clicking Appearance and Personalization, and then clicking Fonts.Click File, and then click Install New Font. ...In the Add Fonts dialog box, under Drives, click the drive where the font that you want to install is located.http://windows.microsoft.com/en-us/windows-vista/install-or-uninstall-fonts

How to store container files

FilesystemContainer
processes

Block deviceNetwork

Host
FilesystemHost
block deviceHardware

To install a font: Open Fonts by clicking the Start button , clicking Control Panel, clicking Appearance and Personalization, and then clicking Fonts.Click File, and then click Install New Font. ...In the Add Fonts dialog box, under Drives, click the drive where the font that you want to install is located.http://windows.microsoft.com/en-us/windows-vista/install-or-uninstall-fonts

How to store container files (1)

FilesystemContainer
processes

Block deviceNetwork

Host
FilesystemHost
block deviceHardware

Chroot()Union FS

To install a font: Open Fonts by clicking the Start button , clicking Control Panel, clicking Appearance and Personalization, and then clicking Fonts.Click File, and then click Install New Font. ...In the Add Fonts dialog box, under Drives, click the drive where the font that you want to install is located.http://windows.microsoft.com/en-us/windows-vista/install-or-uninstall-fonts

How to store container files (2)

FilesystemContainer
processes

Block deviceNetwork

Host
FilesystemHost
block deviceHardware

Loop deviceZFS ZVolBTRFS subvolumePLoop

To install a font: Open Fonts by clicking the Start button , clicking Control Panel, clicking Appearance and Personalization, and then clicking Fonts.Click File, and then click Install New Font. ...In the Add Fonts dialog box, under Drives, click the drive where the font that you want to install is located.http://windows.microsoft.com/en-us/windows-vista/install-or-uninstall-fonts

What's PLoop

Loop device plusAIO for better performance

Snapshots

QCOW2-like format for thin provisioning

Thin provisionong itself

Upstreaming work in progress

To install a font: Open Fonts by clicking the Start button , clicking Control Panel, clicking Appearance and Personalization, and then clicking Fonts.Click File, and then click Install New Font. ...In the Add Fonts dialog box, under Drives, click the drive where the font that you want to install is located.http://windows.microsoft.com/en-us/windows-vista/install-or-uninstall-fonts

How to store container files (3)

FilesystemContainer
processes

Block deviceNetwork

Host
FilesystemHost
block deviceHardware

LVMDM-thin

To install a font: Open Fonts by clicking the Start button , clicking Control Panel, clicking Appearance and Personalization, and then clicking Fonts.Click File, and then click Install New Font. ...In the Add Fonts dialog box, under Drives, click the drive where the font that you want to install is located.http://windows.microsoft.com/en-us/windows-vista/install-or-uninstall-fonts

How to store container files (4)

FilesystemContainer
processes

Block deviceNetwork

Host
FilesystemHost
block deviceHardware

NBDCeph RBDiSCSI

To install a font: Open Fonts by clicking the Start button , clicking Control Panel, clicking Appearance and Personalization, and then clicking Fonts.Click File, and then click Install New Font. ...In the Add Fonts dialog box, under Drives, click the drive where the font that you want to install is located.http://windows.microsoft.com/en-us/windows-vista/install-or-uninstall-fonts

How to store container files (5)

FilesystemContainer
processes

Block deviceNetwork

Host
FilesystemHost
block deviceHardware

NFSGFS2OCFSCeph

To install a font: Open Fonts by clicking the Start button , clicking Control Panel, clicking Appearance and Personalization, and then clicking Fonts.Click File, and then click Install New Font. ...In the Add Fonts dialog box, under Drives, click the drive where the font that you want to install is located.http://windows.microsoft.com/en-us/windows-vista/install-or-uninstall-fonts

Containers vs Templates

Containers ...are massively cloned from pre-created templates

do not have direct access to the underlying (block) storage

Identical data can be effectively deduplicatedHigher density

Lower IO and/or memory consumption

To install a font: Open Fonts by clicking the Start button , clicking Control Panel, clicking Appearance and Personalization, and then clicking Fonts.Click File, and then click Install New Font. ...In the Add Fonts dialog box, under Drives, click the drive where the font that you want to install is located.http://windows.microsoft.com/en-us/windows-vista/install-or-uninstall-fonts

Who can do shared templates

StorageOpenVZDockerLXC

Union FSs+++

Btrfs+DM-thin+PLoop+CephZFS+

To install a font: Open Fonts by clicking the Start button , clicking Control Panel, clicking Appearance and Personalization, and then clicking Fonts.Click File, and then click Install New Font. ...In the Add Fonts dialog box, under Drives, click the drive where the font that you want to install is located.http://windows.microsoft.com/en-us/windows-vista/install-or-uninstall-fonts

What can be de-duplicated

FilesystemContainer
processes

Block deviceNetwork

To install a font: Open Fonts by clicking the Start button , clicking Control Panel, clicking Appearance and Personalization, and then clicking Fonts.Click File, and then click Install New Font. ...In the Add Fonts dialog box, under Drives, click the drive where the font that you want to install is located.http://windows.microsoft.com/en-us/windows-vista/install-or-uninstall-fonts

What can be de-duplicated

FilesystemContainer
processes

Block deviceNetwork

Page cacheCached pages

To install a font: Open Fonts by clicking the Start button , clicking Control Panel, clicking Appearance and Personalization, and then clicking Fonts.Click File, and then click Install New Font. ...In the Add Fonts dialog box, under Drives, click the drive where the font that you want to install is located.http://windows.microsoft.com/en-us/windows-vista/install-or-uninstall-fonts

What can be de-duplicated

FilesystemContainer
processes

Block deviceNetwork

Page cache

Cached pages

IO flow

To install a font: Open Fonts by clicking the Start button , clicking Control Panel, clicking Appearance and Personalization, and then clicking Fonts.Click File, and then click Install New Font. ...In the Add Fonts dialog box, under Drives, click the drive where the font that you want to install is located.http://windows.microsoft.com/en-us/windows-vista/install-or-uninstall-fonts

What is deduplicated

StorageMemoryIO

Union FSs++

Btrfs+/-

DM-thinPLoop++

CephZFS

To install a font: Open Fonts by clicking the Start button , clicking Control Panel, clicking Appearance and Personalization, and then clicking Fonts.Click File, and then click Install New Font. ...In the Add Fonts dialog box, under Drives, click the drive where the font that you want to install is located.http://windows.microsoft.com/en-us/windows-vista/install-or-uninstall-fonts

Additional OpenVZ constraints

Containers disks are independent image filesCan be easily copied across nodes

No single (shared) point of failure

Deduplicated data is volatileTemplates can be lost (e.g. while migrating)

Too big pool with shared data can be easily shrunk

To install a font: Open Fonts by clicking the Start button , clicking Control Panel, clicking Appearance and Personalization, and then clicking Fonts.Click File, and then click Install New Font. ...In the Add Fonts dialog box, under Drives, click the drive where the font that you want to install is located.http://windows.microsoft.com/en-us/windows-vista/install-or-uninstall-fonts

Virtuozzo IO stack

Ext4Container
processes

PLoop device

Image file

To install a font: Open Fonts by clicking the Start button , clicking Control Panel, clicking Appearance and Personalization, and then clicking Fonts.Click File, and then click Install New Font. ...In the Add Fonts dialog box, under Drives, click the drive where the font that you want to install is located.http://windows.microsoft.com/en-us/windows-vista/install-or-uninstall-fonts

PF-Cache

Ext4PLoop device

Cache area

Cache link (xattr)

Ext4Container
processes

PLoop device

Image file

Image file

To install a font: Open Fonts by clicking the Start button , clicking Control Panel, clicking Appearance and Personalization, and then clicking Fonts.Click File, and then click Install New Font. ...In the Add Fonts dialog box, under Drives, click the drive where the font that you want to install is located.http://windows.microsoft.com/en-us/windows-vista/install-or-uninstall-fonts

Cache and cache link behavior

Cache areatarget file name is sha1 sum of the contents

files are created by user-space daemon

cache size is limited by ploop

Cache linkcreated automatically upon file creation

dropped when file is opened for writing

Is kept during metadata update (chown/chmod)

To install a font: Open Fonts by clicking the Start button , clicking Control Panel, clicking Appearance and Personalization, and then clicking Fonts.Click File, and then click Install New Font. ...In the Add Fonts dialog box, under Drives, click the drive where the font that you want to install is located.http://windows.microsoft.com/en-us/windows-vista/install-or-uninstall-fonts

Density results

To install a font: Open Fonts by clicking the Start button , clicking Control Panel, clicking Appearance and Personalization, and then clicking Fonts.Click File, and then click Install New Font. ...In the Add Fonts dialog box, under Drives, click the drive where the font that you want to install is located.http://windows.microsoft.com/en-us/windows-vista/install-or-uninstall-fonts

Future work

PLoop is available in OpenVZ & VirtuozzoUpstream WIP

IO deduplication in the upstreamIssue raied at 2013'th LSFMM

DM-thin/btrfs IO dedup for containers

KSM++ for VM-s

To install a font: Open Fonts by clicking the Start button , clicking Control Panel, clicking Appearance and Personalization, and then clicking Fonts.Click File, and then click Install New Font. ...In the Add Fonts dialog box, under Drives, click the drive where the font that you want to install is located.http://windows.microsoft.com/en-us/windows-vista/install-or-uninstall-fonts

Thank [email protected]

Click to edit the outline text formatSecond Outline LevelThird Outline LevelFourth Outline LevelFifth Outline LevelSixth Outline Level

Seventh Outline LevelMain Presentation Title.Font: Gotham Light 36 Point.Use Title Case

Click to edit the outline text formatSecond Outline LevelThird Outline LevelFourth Outline LevelFifth Outline LevelSixth Outline Level

Seventh Outline LevelPresenter. Font: Gotham Light 22 Points. Title Case

Click to edit the outline text formatSecond Outline LevelThird Outline LevelFourth Outline LevelFifth Outline LevelSixth Outline Level

Seventh Outline LevelPresenter Title. Set in Title Case. 18 Points.

Click to edit the outline text formatSecond Outline LevelThird Outline LevelFourth Outline LevelFifth Outline LevelSixth Outline Level

Seventh Outline LevelSection Title.Gotham Light. 34 Points. Title Case

Click to edit the outline text formatSecond Outline LevelThird Outline LevelFourth Outline LevelFifth Outline LevelSixth Outline Level

Seventh Outline Level01

Click to edit the outline text formatSecond Outline LevelThird Outline LevelFourth Outline LevelFifth Outline LevelSixth Outline Level

Seventh Outline LevelSupporting text area. Set in sentence case and Gotham Light at 24 points.

Click to edit the outline text formatSecond Outline LevelThird Outline LevelFourth Outline LevelFifth Outline LevelSixth Outline Level

Seventh Outline Level2014

Click to edit the outline text formatSecond Outline LevelThird Outline LevelFourth Outline LevelFifth Outline LevelSixth Outline Level

Seventh Outline LevelOct. 24

Click to edit the outline text formatSecond Outline LevelThird Outline LevelFourth Outline LevelFifth Outline LevelSixth Outline Level

Seventh Outline Levelsection

Click to edit the outline text formatSecond Outline LevelThird Outline LevelFourth Outline LevelFifth Outline LevelSixth Outline Level

Seventh Outline LevelSupporting text in sentence case, set in Gotham Light at 20 points.

Click to edit the outline text formatSecond Outline LevelThird Outline LevelFourth Outline LevelFifth Outline LevelSixth Outline Level

Seventh Outline LevelCreator TitleDepartment or email (24 points)

Click to edit the outline text formatSecond Outline LevelThird Outline LevelFourth Outline LevelFifth Outline LevelSixth Outline Level

Seventh Outline LevelCreated ByGotham Light. 34 Points.

Click to edit the outline text formatSecond Outline LevelThird Outline LevelFourth Outline LevelFifth Outline LevelSixth Outline Level

Seventh Outline LevelSupporting text in sentence case, set in Gotham Light at 20 points.

Click to edit the outline text formatSecond Outline LevelThird Outline LevelFourth Outline LevelFifth Outline LevelSixth Outline Level

Seventh Outline Level2014

Click to edit the outline text formatSecond Outline LevelThird Outline LevelFourth Outline LevelFifth Outline LevelSixth Outline Level

Seventh Outline LevelOct. 24

Click to edit the outline text formatSecond Outline LevelThird Outline LevelFourth Outline LevelFifth Outline LevelSixth Outline LevelSeventh Outline Level

Click to edit the title text formatSample With Bullets

Click to edit the outline text formatSecond Outline LevelThird Outline LevelFourth Outline LevelFifth Outline LevelSixth Outline Level

Seventh Outline LevelClick to edit Master text styles

Second level

Third level

Fourth level

Fifth level

Click to edit the title text formatDemo Title
Gotham Light. 34 Points. Title Case

Click to edit the outline text formatSecond Outline LevelThird Outline LevelFourth Outline LevelFifth Outline LevelSixth Outline Level

Seventh Outline LevelTitle (left)

Click to edit the title text format3-Col: Content, Titles & Descriptions

Click to edit the outline text formatSecond Outline LevelThird Outline LevelFourth Outline LevelFifth Outline LevelSixth Outline Level

Seventh Outline LevelTitle (center)

Click to edit the outline text formatSecond Outline LevelThird Outline LevelFourth Outline LevelFifth Outline LevelSixth Outline Level

Seventh Outline LevelTwo LinesTitle (right)

Click to edit the outline text formatSecond Outline LevelThird Outline LevelFourth Outline LevelFifth Outline LevelSixth Outline Level

Seventh Outline LevelClick to edit Master text styles

Click to edit the title text formatSample With Only Title

Click to edit the title text formatPresenter Name

Click to edit the outline text formatSecond Outline LevelThird Outline LevelFourth Outline LevelFifth Outline LevelSixth Outline LevelSeventh Outline Level

Click to edit the title text formatImage (Left)

Click to edit the outline text formatSecond Outline LevelThird Outline LevelFourth Outline LevelFifth Outline LevelSixth Outline LevelSeventh Outline Level

Click to edit the title text formatImage (Right)

Click to edit the outline text formatSecond Outline LevelThird Outline LevelFourth Outline LevelFifth Outline LevelSixth Outline LevelSeventh Outline Level

Click to edit the outline text formatSecond Outline LevelThird Outline LevelFourth Outline LevelFifth Outline LevelSixth Outline Level

Seventh Outline LevelDrag your picture to placeholder or click icon to add.

Click to edit the title text formatLarge Image: w/Slide Title Area

2014 04.01

Click to edit the outline text formatSecond Outline LevelThird Outline LevelFourth Outline LevelFifth Outline LevelSixth Outline Level

Seventh Outline LevelThis is an image takeover slide. Drag your picture to placeholder or click icon to add.

Click to edit the outline text formatSecond Outline LevelThird Outline LevelFourth Outline LevelFifth Outline LevelSixth Outline Level

Seventh Outline LevelDrag picture to placeholder or click icon to add

Click to edit the outline text formatSecond Outline LevelThird Outline LevelFourth Outline LevelFifth Outline LevelSixth Outline Level

Seventh Outline LevelImage Title. Font: Gotham Light 24 Points. Title Case

Click to edit the outline text formatSecond Outline LevelThird Outline LevelFourth Outline LevelFifth Outline LevelSixth Outline Level

Seventh Outline LevelPresenter Title. Set in Title Case. 20 Points.

Click to edit the title text format3-Col: Pictures, Titles & Descriptions

Click to edit the outline text formatSecond Outline LevelThird Outline LevelFourth Outline LevelFifth Outline LevelSixth Outline Level

Seventh Outline LevelTwo LinesTitle text (right)

Click to edit the outline text formatSecond Outline LevelThird Outline LevelFourth Outline LevelFifth Outline LevelSixth Outline Level

Seventh Outline LevelTitle text (center)

Click to edit the outline text formatSecond Outline LevelThird Outline LevelFourth Outline LevelFifth Outline LevelSixth Outline Level

Seventh Outline LevelTitle text (left)

Click to edit the outline text formatSecond Outline LevelThird Outline LevelFourth Outline LevelFifth Outline LevelSixth Outline Level

Seventh Outline LevelDrag your picture to placeholder or click icon to add.

Click to edit the outline text formatSecond Outline LevelThird Outline LevelFourth Outline LevelFifth Outline LevelSixth Outline Level

Seventh Outline LevelDrag your picture to placeholder or click icon to add.

Click to edit the outline text formatSecond Outline LevelThird Outline LevelFourth Outline LevelFifth Outline LevelSixth Outline Level

Seventh Outline LevelDrag your picture to placeholder or click icon to add.

Click to edit the outline text formatSecond Outline LevelThird Outline LevelFourth Outline LevelFifth Outline LevelSixth Outline Level

Seventh Outline LevelThank you