Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id D7554200BAF for ; Mon, 31 Oct 2016 15:48:33 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id D5C68160B05; Mon, 31 Oct 2016 14:48:33 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 28AF6160AF0 for ; Mon, 31 Oct 2016 15:48:33 +0100 (CET) Received: (qmail 82090 invoked by uid 500); 31 Oct 2016 14:48:32 -0000 Mailing-List: contact dev-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@accumulo.apache.org Delivered-To: mailing list dev@accumulo.apache.org Received: (qmail 82074 invoked by uid 99); 31 Oct 2016 14:48:32 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 31 Oct 2016 14:48:32 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id F2EE8E0A05; Mon, 31 Oct 2016 14:48:31 +0000 (UTC) From: keith-turner To: dev@accumulo.apache.org Reply-To: dev@accumulo.apache.org References: In-Reply-To: Subject: [GitHub] accumulo pull request #176: Wrote blog post about durability and performance Content-Type: text/plain Message-Id: <20161031144831.F2EE8E0A05@git1-us-west.apache.org> Date: Mon, 31 Oct 2016 14:48:31 +0000 (UTC) archived-at: Mon, 31 Oct 2016 14:48:34 -0000 Github user keith-turner commented on a diff in the pull request: https://github.com/apache/accumulo/pull/176#discussion_r85753310 --- Diff: _posts/blog/2016-10-28-durability-performance.md --- @@ -0,0 +1,136 @@ +--- +title: "Durability Performance Implications" +date: 2016-10-28 17:00:00 +0000 +author: Keith Turner +--- + +## Overview + +Accumulo stores recently written data in a sorted in memory map. Before data is +added to this map, it's written to an unsorted WAL (write ahead log). In the +case when a Tablet Server dies, the recently written data is recovered from the +WAL. + +When data is written to Accumulo the following happens : + + * Client sends a batch of mutations to a tablet server + * Tablet server does the following : + * Writes mutation to Tablet Servers WAL + * Sync or flush WAL + * Adds mutations to sorted in memory maps + * Reports success back to client. + +The sync/flush step above moves data written to the WAL from memory to disk. +Write ahead logs are stored in HDFS. HDFS supports two ways of forcing data to +disk for an open file : `hsync` and `hflush`. + +## HDFS Sync/Flush Details + +When `hflush` is called on a WAL, it does not ensure data is on disk. It only +ensure that data is in OS buffers on each datanode and on its way to disk. As a +result calls to `hflush` are very fast. If a WAL is replicated to 3 data nodes +then data may be lost if all three machines reboot. If the datanode process +dies, thats ok because it flushed to OS. The machines have to reboot for data --- End diff -- I really like this much better than what I had. I shortened it a bit when I merged it in. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---