From 184d5b5933ef22c25503e70296fa49189e46e639 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Sun, 8 Jan 2017 15:22:21 -0800 Subject: [PATCH] add optimization option to pre-allocate file disk spaces --- Optimization.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Optimization.md b/Optimization.md index 3360aba..1233493 100644 --- a/Optimization.md +++ b/Optimization.md @@ -1,5 +1,17 @@ Here are the strategies or best ways to optimize SeaweedFS. +## Preallocate volume file disk spaces + +In some Linux file system, e.g., XFS, ext4, Btrfs, etc, SeaweedFS can optionally allocate disk space for the volume files. This ensures file data is on contiguous blocks, which can improve performance when files are large and may cover multiple extents. + +To enable disk space preallcation, start the master with these options on a Linux OS with supporting file system. +``` + -volumePreallocate + Preallocate disk space for volumes. + -volumeSizeLimitMB uint + Master stops directing writes to oversized volumes. (default 30000) +``` + ## Increase concurrent writes By default, SeaweedFS grows the volumes automatically. For example, for no-replication volumes, there will be concurrently 7 writable volumes allocated.