• C
    Use fallocate to prevent excessive allocation of sst files and logs · 3dafdfb2
    Chip Turner 提交于
    Summary:
    On some filesystems, pre-allocation can be a considerable
    amount of space.  xfs in our production environment pre-allocates by
    1GB, for instance.  By using fallocate to inform the kernel of our
    expected file sizes, we eliminate this wasteage (that isn't recovered
    until the file is closed which, in the case of LOG files, can be a
    considerable amount of time).
    
    Test Plan:
    created an xfs loopback filesystem, mounted with
    allocsize=4M, and ran db_stress.  LOG file without this change was 4M,
    and with it it was 128k then grew to normal size.
    
    Reviewers: dhruba
    
    Reviewed By: dhruba
    
    CC: adsharma, leveldb
    
    Differential Revision: https://reviews.facebook.net/D7953
    3dafdfb2
version_set.h 19.9 KB