diff --git a/src/main/docbkx/performance.xml b/src/main/docbkx/performance.xml index 59287ee8f11..8a28d737def 100644 --- a/src/main/docbkx/performance.xml +++ b/src/main/docbkx/performance.xml @@ -988,6 +988,58 @@ htable.close(); +
+ Hedged Reads + Hedged reads are a feature of HDFS, introduced in HDFS-5776. Normally, a + single thread is spawned for each reqd request. However, if hedged reads are enabled, the + client waits some configurable amount of time, and if the read does not return, the client + spawns a second read request, against a different block replica of the same data. Whichever + read returns first is used, and the other read request is discarded. Hedged reads can be + helpful for times where a rare slow read is caused by a transient error such as a failing + disk or flaky network connection. + Because a HBase RegionServer is a HDFS client, you can enable hedged reads in HBase, by + adding the following properties to the RegionServer's hbase-site.xml and tuning the values + to suit your environment. + + Configuration for Hedged Reads + + dfs.client.hedged.read.threadpool.size - the number of threads + dedicated to servicing hedged reads. If this is set to 0 (the default), hedged reads are + disabled. + + + dfs.client.hedged.read.threshold.millis - the number of milliseconds to + wait before spawning a second read thread. + + + + Hedged Reads Configuration Example + + dfs.client.hedged.read.threadpool.size + 20 + + + dfs.client.hedged.read.threshold.millis + 10 +]]> + + Use the following metrics to tune the settings for hedged reads on + your cluster. See for more information. + + Metrics for Hedged Reads + + hedgedReadOps - the number of times hedged read threads have been triggered. This + could indicate that read requests are often slow, or that hedged reads are triggered too + quickly. + + + hedgeReadOpsWin - the number of times the hedged read thread was faster than the + original thread. This could indicate that a given RegionServer is having trouble + servicing requests. + + +