2012年2月15日星期三

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.



2011年9月21日星期三

Efficient Locking for Concurrent Operations on B-Trees

Lehman et al. 2002

Summary:

This paper proposed a new solution to support concurrent access on B-trees which reside on secondary storage. Basically a new link pointer is added to the B-tree data structure to chain all the pages in the same level into a linked list. The intent of doing this is that if an insertion split a node into two, other processes will still see a "logically single node" by following the link pointer, thus the consistency of the tree is not lost.

The the search for the B-tree will proceed as usual, without grabbing any locks. However if the search key exceed the highest value in a node (as indicated by the high key), it indicates that the tree structure has been changed, and we should follow the link pointer to get the split node. Insertion into the B-tree is divided into two phase: the search phase to locate where to inserte, which is identical to normal search; and the actual insertion phase, where we lock a node, split it as necessary, and add appropriate link pointers. An insertion to the parent node is also needed, if split happens, and it worked the same as leaf node. A stack of the rightmost node we examined at each level during the descent through the tree is maintained, to urge the case when we backtrack the tree.

An informal proof of the correctness of this solution is given: it ensures that each process sees a consistent state of the B-tree, and prevents deadlock. Livelock, on the other hand, is possible if a process keep following the link pointer other processes created. This solution is highly concurrent because an insertion process at most hold three locks simultaneously and a search process don't need to grab any lock (not even shared lock).

The whole model they developed is based on the assumption that the whole B-tree sits on disk, and every process has its own private memory cache. However, I don't think this is very pratical. A more common case would be that the first and second level of the B-tree sit in main memory and is accessed by all the process. How to correctly access this kind of B-tree correctly remains a problem.

A Critique of ANSI SQL Isolation Level

From Microsoft, 1995


Summary


This paper discussed the definition of ANSI SQL(92) isolation level, and pointed out its ambiguity and failure to preclude some abnormality. The authors proposed a new set of definitions which could naturally map to the standard locking implementation of each level, and also discussed some additional isolation level, such as snapshot isolation.


The author first introduced the Dirty Read, Non-repeatable Rad and Phantom phenomena; and pointed out due to the ambiguity of their English statement, there could be a broad and a strict interpretation of each of the phenomena. They stated each interpretation in terms of execution history and defined different ANSI SQL Isolation level by how they preclude those phenomena.


The author then defined another set of isolation level in terms of different locking implementation. They discussed what kind of abnormality each of these isolation levels preclude, and noticed that their discrepancy with the ANSI isolation levels. They defined a new kind of phenomena, namely dirty write. A new set of isolation levels, defined by how they preclude those four phenomena (dirty write, dirty read, non-repeatable read and phantom) in the strict interpretation, are proposed. The author then showed that they are equivalent to their corresponding locking isolation levels.


The author discussed two additional kinds of isolation level: cursor stability and snapshot isolation. They clearly defined them by what abnormality they preclude, and showed that how they sit in the isolation level hierarchy.


Finally a summary has been given to show under the better definition, what kind of abnormality each isolation level precludes; and how they form an isolation level hierarchy.