VirtualBox

Ignore:
Timestamp:
Feb 1, 2019 7:38:26 PM (6 years ago)
Author:
vboxsync
Message:

linux/vboxsf: Set st_blksize to 1MB for files and 16KB for directories, rather than the 4KB we used to. With 1MB I see close to optimal sequential read performance here, 15x better than with 4KB. bugref:9172

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/linux/sharedfolders/utils.c

    r77062 r77140  
    355355
    356356        generic_fillattr(dentry->d_inode, kstat);
     357
     358        /*
     359         * FsPerf shows the following numbers for sequential file reads:
     360         *   4096 KB = 2254 MB/s
     361         *   2048 KB = 2368 MB/s
     362         *   1024 KB = 2208 MB/s
     363         *    512 KB = 1908 MB/s
     364         *    256 KB = 1625 MB/s
     365         *    128 KB = 1413 MB/s
     366         *     64 KB = 1152 MB/s
     367         *     32 KB =  726 MB/s
     368         *      4 KB =  145 MB/s
     369         */
     370        if (S_ISREG(kstat->mode))
     371                kstat->blksize = _1M;
     372        else if (S_ISDIR(kstat->mode))
     373                /** @todo this may need more tuning after we rewrite the directory handling. */
     374                kstat->blksize = _16K;
    357375        return 0;
    358376}
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette