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 B827C200BB4 for ; Tue, 1 Nov 2016 23:36:37 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id B6AF0160AF7; Tue, 1 Nov 2016 22:36:37 +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 0B4E5160ADA for ; Tue, 1 Nov 2016 23:36:36 +0100 (CET) Received: (qmail 18711 invoked by uid 500); 1 Nov 2016 22:36:36 -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 18699 invoked by uid 99); 1 Nov 2016 22:36:35 -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; Tue, 01 Nov 2016 22:36:35 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id B1EB7E09DE; Tue, 1 Nov 2016 22:36:35 +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: <20161101223635.B1EB7E09DE@git1-us-west.apache.org> Date: Tue, 1 Nov 2016 22:36:35 +0000 (UTC) archived-at: Tue, 01 Nov 2016 22:36:37 -0000 Github user keith-turner commented on a diff in the pull request: https://github.com/apache/accumulo/pull/176#discussion_r86040160 --- 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 --- End diff -- used wording `reboot or die` in ebf9bca --- 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. ---