2012年2月15日星期三

FAST'12 Session 3: File System Design and Correctness

Recon: Verifying File System Consistency at Runtime
Daniel Fryer, Kuei Sun, Rahat Mahmood, TingHao Cheng, Shaun Benjamin, Ashvin Goel, and Angela Demke Brown,University of Toronto

My takeaway: checking consistency at runtime is interesting, and transforming gloable file system property into local invariants in also interesting.

Bugs corrupts in-memeory file metadata

Current solution: assume file systems are correct. Offline consistency check (fsck): slow, require fs offline, repair error prone

Their solcution: Rcon, runtime consistency check

Key idea: every update results in a consistency fs image. (Disk can still conrrupt? Checksum handling that below fs?)

Transform gloable consistency properties to fast, local consistency invariants.

When to check? (Don’t want to check during operation): right before you write journal commit block.

System design: in block device layer. buffer metadata writes (write cache), interpreting metadata, then compare to old data (read cache), check for invariants

How to interpreated: use fs tree structure, just follow the pointer. (Need to understand inode block structure)

Evaluation:

Inject corruption. Recon can detect corruptions not detected by fsck.

8% performance penalty (mainly due to cache misses)

Q&A

Q: What to do after dectecing corruption?

A: fail-stop. (maybe retrying if failure transist?)

Q: What happen if delayed commits?

A: ext3 does that. (large transaction)

Q: future file system to make check easier?

A: back pointers (less data to keep track of). Maybe write consistency in declarive language.

Q: you are delaying writes. What about persistence requirement?

A: we only hold commit block. It increase synchronize write latency. If you sychornzily write, you are wrting commit block every time, and you are paying the cost all the time.

Q: apply this to other things? Distributed system?

A: Consistency in DS in more complex. Maybe DB which has fs structure to maintain, or some other transactional thing?

Q: why not inside FS?

A: We don’t depend on FS state correctness! We do rely on FS structure, but it changes slowly!










Understanding Performance Implications of Nested File Systems in a Virtualized Environment
Duy Le, The College of William and Mary; Hai Huang, IBM T.J. Watson Research Center; Haining Wang, The College of William and Mary

My takeaway: guest/host fle system combination matters!

How to choose guest/host file system combination.

Macro level: Measure throughput and latency: combination choice matters!

Writes more critical than READs

Latency is more senstenve than throuput.

Micro level: random/sequential read/write

Read unafftected by nested fs, while writes affected.

Readahead at the gypervisor when nesting FS

Long idle times for queuing

I/O scheduling not effective on nested fs

Effectivenss of gues fs’ block allocation is NOT guaranteed.

Advice:

Read-dominated workloads: doesn’t matter. Sequential read may even improve with nested fs (look ahead)

Write dominated workload: avoid nesting, causing extra metadata operations.

Latency sensitive workloads: latency increased.

Dala allocation: better pass through.

Q&A

Q: did you put ext2 partition at different location of disk?

A: No. We didn’t.

Q: Then you didn’t isolate the effect of disk zone properties!

A again: we tried access different zone, performance difference within 5%.

Q: container file preallocated? Upperlevel fs make direct I/O to bypass page cache of host?

A: Yes. Yes.

Q: We don’t typically use i/o scheduler in guest.

A: default I/O scheduler in either guest/host.

Q: would your finding generalize to another layer of management?

A: didn’t think about it.

Q: something about cache flush. Didn’t understand….








Consistency Without Ordering

Work from our group.

Q: what’s the memory overhead?

A: only extra bitmap store. So only one bitmap block per 4096 blocks.

Q: how large is the file system. As for large fs, scan time increase. How about almost full fs? Finding a free block costs! There are full fs!

A: Common case fs not so full. For ful file system, not the best approach.

Q: where do you store back pointers.

A: OOB in future disk

Q: strong consistency guarantee? Not as strong as some file systems?

A: We provide data consistency: when access data, data blongs to this file, but could be stale data. Ext3 provides stronger consistency. On disk image may not be a image of a file system that existed.

Q: other problem could solve?

A: any system you have hiarachy (parents and child).

Q: CPU overhead?

A: we looked at it. Not too much different from ext2. We don’t know how many extra circles though.

Q; backpointers removed when file being deleted?

A: Currently lazy deletion. So for short no! We rely on mutual pointer agreement..

FAST'12 Session 3: File System Design and Correctness

Recon: Verifying File System Consistency at Runtime
Daniel Fryer, Kuei Sun, Rahat Mahmood, TingHao Cheng, Shaun Benjamin, Ashvin Goel, and Angela Demke Brown,University of Toronto

My takeaway: checking consistency at runtime is interesting, and transforming gloable file system property into local invariants in also interesting.

Bugs corrupts in-memeory file metadata

Current solution: assume file systems are correct. Offline consistency check (fsck): slow, require fs offline, repair error prone

Their solcution: Rcon, runtime consistency check

Key idea: every update results in a consistency fs image. (Disk can still conrrupt? Checksum handling that below fs?)

Transform gloable consistency properties to fast, local consistency invariants.

When to check? (Don’t want to check during operation): right before you write journal commit block.

System design: in block device layer. buffer metadata writes (write cache), interpreting metadata, then compare to old data (read cache), check for invariants

How to interpreated: use fs tree structure, just follow the pointer. (Need to understand inode block structure)

Evaluation:

Inject corruption. Recon can detect corruptions not detected by fsck.

8% performance penalty (mainly due to cache misses)

Q&A

Q: What to do after dectecing corruption?

A: fail-stop. (maybe retrying if failure transist?)

Q: What happen if delayed commits?

A: ext3 does that. (large transaction)

Q: future file system to make check easier?

A: back pointers (less data to keep track of). Maybe write consistency in declarive language.

Q: you are delaying writes. What about persistence requirement?

A: we only hold commit block. It increase synchronize write latency. If you sychornzily write, you are wrting commit block every time, and you are paying the cost all the time.

Q: apply this to other things? Distributed system?

A: Consistency in DS in more complex. Maybe DB which has fs structure to maintain, or some other transactional thing?

Q: why not inside FS?

A: We don’t depend on FS state correctness! We do rely on FS structure, but it changes slowly!

Understanding Performance Implications of Nested File Systems in a Virtualized Environment
Duy Le, The College of William and Mary; Hai Huang, IBM T.J. Watson Research Center; Haining Wang, The College of William and Mary

My takeaway: guest/host fle system combination matters!

How to choose guest/host file system combination.

Macro level: Measure throughput and latency: combination choice matters!

Writes more critical than READs

Latency is more senstenve than throuput.

Micro level: random/sequential read/write

Read unafftected by nested fs, while writes affected.

Readahead at the gypervisor when nesting FS

Long idle times for queuing

I/O scheduling not effective on nested fs

Effectivenss of gues fs’ block allocation is NOT guaranteed.

Advice:

Read-dominated workloads: doesn’t matter. Sequential read may even improve with nested fs (look ahead)

Write dominated workload: avoid nesting, causing extra metadata operations.

Latency sensitive workloads: latency increased.

Dala allocation: better pass through.

Q&A

Q: did you put ext2 partition at different location of disk?

A: No. We didn’t.

Q: Then you didn’t isolate the effect of disk zone properties!

A again: we tried access different zone, performance difference within 5%.

Q: container file preallocated? Upperlevel fs make direct I/O to bypass page cache of host?

A: Yes. Yes.

Q: We don’t typically use i/o scheduler in guest.

A: default I/O scheduler in either guest/host.

Q: would your finding generalize to another layer of management?

A: didn’t think about it.

Q: something about cache flush. Didn’t understand….

Consistency Without Ordering

Work from our group.

Q: what’s the memory overhead?

A: only extra bitmap store. So only one bitmap block per 4096 blocks.

Q: how large is the file system. As for large fs, scan time increase. How about almost full fs? Finding a free block costs! There are full fs!

A: Common case fs not so full. For ful file system, not the best approach.

Q: where do you store back pointers.

A: OOB in future disk

Q: strong consistency guarantee? Not as strong as some file systems?

A: We provide data consistency: when access data, data blongs to this file, but could be stale data. Ext3 provides stronger consistency. On disk image may not be a image of a file system that existed.

Q: other problem could solve?

A: any system you have hiarachy (parents and child).

Q: CPU overhead?

A: we looked at it. Not too much different from ext2. We don’t know how many extra circles though.

Q; backpointers removed when file being deleted?

A: Currently lazy deletion. So for short no! We rely on mutual pointer agreement..

FAST'12 Session 2: Back it up!

The whole session is from EMC (!)


Characteristics of Backup Workloads in Production Systems

Grant Wallace, Fred Douglis, Hangwei Qian, Philip Shilane, Stephen Smaldone, Mark Chamness, and Windsor Hsu, EMC Corporation

My takeaway: backup system differs from primary system. For primary system characters, look at Microsoft paper; for backup, look at this one

Motivation: back-up storage system differs from primary storay system

Study a lot of system to characterize them (compared w/ Microsoft study on primary system)

File size: mean size 22M for primary system

2G for backup system

File counts: mean=14K for backup (backup don’t organize file as human do)

Mean=117K for primary

Deduplication: 3X-6X for primary, 384x for backup

Impact of chunk size: (use content-defined merging techniques to make 1K figureprints to 2K, 4K and 16K)

15% better deduplication for 1/2 of chunk size, but 2x metadata.

Best 4K or 8K.

Microsoft: for primary data, per file dedup works 87% as good as chunks! (only for primary, but not backup)

Caching(replay traces with different cache size):

Moral: more cache better, but there is a turning point.

Q&A:

Q: Data/trace available?

A: can’t make promise. But have your students come intern with us!

Q:speed/performance based on chunk size?

A: didn’t look at it.

Q: newer data means lower deduplication.




WAN Optimized Replication of Backup Datasets Using Stream-Informed Delta Compression

Philip Shilane, Mark Huang, Grant Wallace, and Windsor Hsu, EMC Corporation

My take away: when transferring data through WAN, reduce data aggressively.Do everything you can: de-dup, compression, find similarities using sketch, etc… And this paper basically talks about how to effectively cache sketches.

Remote backup data (WAN is bottleneck!)

How to optimize: Dedup, local compression, stream-informed caching!

Sketch to find similar blocks, then transfer fps and differences

Sketh index option:

Full index (0.5T for 256 TB data per super-feature). And random I/O on those 0.5T! Cn find all similar matches.

Partial index (maybe LRU policy? Not persistent.): has to hold a full back-up to be effective (as big as full index)

Stream-informed cache

Key-insights: delta locality corresponds to dedup locality

Build sketches on the fly, for corresponding dedup chunks. (dependent on stream locality and cache policy)

Evaluation: Stream-informed cache 15% worse than full index in terms of finding matches.

Effective bandwidth 100x actually bandwidth, 2x more than w/o sketches.

Overhead: 20% slowdown on writes, but only for non-duplicates




Power Consumption in Enterprise-Scale Backup Storage Systems
Zhichao Li, Stony Brook University; Kevin M. Greenan and Andrew W. Leung, EMC Corporation; Erez Zadok, Stony Brook Universit

My takeaway: controller more power hungry on disks. But no further breakdown of power consumption from this paper.

Motivation: power design important, but no measurements!

Measurements: idle power consumption 200~800W (0.8-3W ~ TB)

Dedupiplication saves power: save space, thus hw, save I/O, thus energy

Spin-down v.s power-down: sping dow saves 6.5W per disk, while power down saves 7.6W to 9.3W per disk. (Still, 56% of power consumption out of disk!)

Conclusion: Controller power hungury than disk!

System not power proportional

Disparate consumption between similar H/W

Q&A:

Q: if more disk, then save power?

A: depends on customer requirements

FAST'12 Session 1: Implication of New Storage Technology



De-indirection in SSD with nameless writes

from our group

Q&A:

Q: SSD is not hard disk drive. Why not expose SSD internals to file systmes?

A: Let vendors control SSD internals

Q: How about associate data in callbacks?

A: stored in OOB.

Q: Why not richer interface? Hints to device maybe?

A: That could be useful.

Q: More interesting with BrtFS?




The Bleak Future of NAND Flash Memory

Laura M. Grupp, University of California, San Diego; John D. Davis, Microsoft Research, Mountain View; Steven Swanson, University of California, San Diego

My takeaway:

SSD not replacing HDD, tradeoff must be made to increase capacity and such.

Flash memeory case study. They looked at capacity, latency and througput.

How to increase density: multi-bit cells, Moore's Law.

Use them to predict future density: 1.6T in 2024 at best?

Latency: SLC-1, MLC-2, TLC-3, higher capacity, larger latency!

So latency likely to increase in the future (3ms for 1.6TB for TLC-3?)

Throughput: for fixed size capacity, throughput for TLC/MLC-2 far worse than SLC-3 (0.7x)

IOPS: 0.4x (32k, for HDD it's 0.2k)

Conclusion: not so greater compared to HDD (in some cases!)

Q&A:

Q: Future doesn't seem so bleak?

A: SSD don't just "get better". Tradeoffs instead of straightly got better.

Q: Power characteristics?

A: Didn't study

Q: Lifetime for SLC-1, MLC-2 and TLC-3?

A: drop form 10,000 o 500!




When Poll Is Better than Interrupt

Jisoo Yang, Dave B. Minturn, and Frank Hady, Intel Corporation

My takeaway:

well, everybody know poll is better when ops are fast...But they talked in detail how asynchronous I/O overhead breaks down (in their paper maybe?)

NVM and future SSD made of NVM: fast, use up of PCI bus bandwidth

Traditional approach (asynchronous model):

I/O request submitted to device, SSD interrupts with IO competition. (CPU free while doing I/O)

Synchrous model:

Bypass kernel block I/O layer, send request directly to device and poll. (CPU busy polling while doing I/O, only beneficial when device fast)

Prototype: NVM Express interface (really fast! 4 us per 4K)~

Measurements show that synchronous model faster!

Futher issus with Async I/O

1. Device underutilized. when IOPS pressed (why??????)

2. Interrupt overhead: can be reduced by coalescing, but increase latency

3. Negative on cache and TLB thrashing

Implication:

Non-blocking i/o useless

Rethink I/O buffering (esp. I/O perfecting) why????

Q&A:

Q: Multi-thread implication?

A: dedicated pooling loop in current implementation.

Q: how about if the request is long? CPU polling for 5-10 ms???

Q: ????

Q; According to last talk, are we going to get that latency you are assuming????

A: last talk in about NAND, not the same thing?

Q: even with polling, OS overhead is big (50%). Should we free OS completely? Saying doing I/O in user-space or with GPU?

A: maintaining current interface is nice.

Q: make use of concurrency, oen thread doing polling to get potential benefit?

A: depends on app logic. And blahblahblah….

Q: overhead breakdown? (context switch time? You are using make_request instead of request function kernel provides!)

A: refer to other paper….

2012年2月10日星期五

Consistency Without Ordering / Backpointer-based Consitency

Work from our group by Vijay. To appear on FAST'12

Objective:
Middle ground betweeen lazy approach (fsck) and aggressive approach (journaling, COW) toward file system crash consistency.

Key Insights:
1. All file system inconsistencies are due to ambiguity about the logical identity of an object. (e.g., block belongs to which file, inode belongs to which directory)
2. Mutual agreements guarantees consistency. Thus adding backpointer, and check if they agree with forward pointer).

Implementation (based on ext2, called NoFS):
1. Assume 4K block and some associated info can be written atomically (could be true in future's disk?)
2. Every block has backpointers to point to its logical owner. (Some blocks can have multiple pointers).
3. When start-up, build file system state INCREMENTALLY, as each object is examined.
4. Have to change page-cache to accommodate the fact that now a block is 4K+some other info.

Discussion:
1. Doesn't have to pay run-time penalty as in journaling approach (except for the short scan phase to reconstruct state when start up)
2. Differs from Pilot's file system and fsck in that the scan process at start up is non-blocking, so that you can do file system operation while scanning (would be slower during scanning, though).

Takeaway:
Note that in their evaluation, they want to show:
a. NoFS provides consistency
b. NoFS's performance.
Similar to what we want to show in our project. So some methodology can be borrowed.


TAO from Facebook

Talk @ Wisconsin, 2/10/2012


Takeaway:
1. Radiculous name comes from 道
2. Content aware cache which understands data structure
3. Graph data model (which fits well with Facebook )
4. Hirachachical cache design (follower +leader)
5. Write through cache all the way to db to make consistency easier, but pushing to other followers happens aychrouously.

2011年9月25日星期日

How to run customized ext4 under Linux 2.6.26

There are two difficulties:
1. How to build your own ext4 and jbd2 module without re-build the whole kernel.
2. How to enable ext4 support on old linux 2.6.26 kernel

My platform is centOS.

Solution:

0. Make a copy of your linux source code tree. Modify the ext4 and jbd2 source code as you need.

1. Modify the .config file in your linux kernel source code directory. Delete all the xxx=m line. Add the following line:
COFIG_CRC16=m //needed by ext4
CONFIG_EXT4DEV_FS=m
CONFIG_JBD=m
CONFIG_JBD2=m

2. do "make modules" under this directory. This will produce the needed kernel modules.

3. Check /etc/modprobe.conf, /etc/modules.conf, and /etc/modprobe.d/blacklist files, make sure ext4 and jbd2 module are not automatically loaded. This is to prevent the kernel from loading the some other version of these modules from a default place.

4. reboot the kernel. Do insmod on lib/crc_16.ko, fs/jbd2/jbd2.ko and fs/ext4/ext4dev.ko. Theses are the modules you modified. Note that crc_16.ko is needed by ext4dev.

5. yum install e4fsprogs. This will give you necessary utility support for ext4.

6. Choose a disk partition to mkfs: mkfs -t ext4dev /dev/sdc

7. Tune the fs to tag that it's a test filesystem (otherwise kernel will refuse to mount it): tune4fs -E test_fs /dev/sdc

8. mount -t ext4dev /dev/sdc /dir/you/want/to/mount. Note that you may need to mount with some especial flags (e.g. no extent support), since ext4 under 2.6.26 have some bugs.

Done.