add optimization option to pre-allocate file disk spaces

Chris Lu 2017-01-08 15:22:21 -08:00
parent efecd443d7
commit 184d5b5933

@ -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.