Bcachefs Linux File-System Testing + Benchmarks

Bcachefs Linux file-system benchmarking against Btrfs, EXT4, F2FS, and XFS on an HDD and SSD. Benchmarks by Michael Larabel for a future article.

HTML result view exported from: https://openbenchmarking.org/result/1805304-AR-BCACHEFST07.

ProcessorMotherboardChipsetMemoryDiskGraphicsMonitorNetworkOSKernelDesktopCompilerFile-SystemScreen ResolutionHDDSSD Bcachefs Btrfs EXT4 XFS Bcachefs Btrfs EXT4 F2FS XFS2 x Intel Xeon Gold 6138 @ 3.70GHz (40 Cores / 80 Threads)TYAN S7106 (V1.00 BIOS)Intel Sky Lake-E DMI3 Registers12 x 8192 MB DDR4-2666MT/s Micron 9ASF1G72PZ-2G6B1256GB Samsung SSD 850 + 2000GB Seagate ST2000DM006-2DM1 + 2 x 120GB TOSHIBA-TR150ASPEED ASPEED FamilyVE228Intel I210 Gigabit ConnectionUbuntu 18.044.16.0-bcachefs (x86_64)GNOME Shell 3.28.1GCC 7.3.0BcacheFS1920x1080btrfsext4xfsBcacheFSbtrfsext4f2fsxfsOpenBenchmarking.orgCompiler Details- --build=x86_64-linux-gnu --disable-vtable-verify --disable-werror --enable-checking=release --enable-clocale=gnu --enable-default-pie --enable-gnu-unique-object --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --enable-libmpx --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-multiarch --enable-multilib --enable-nls --enable-objc-gc=auto --enable-offload-targets=nvptx-none --enable-plugin --enable-shared --enable-threads=posix --host=x86_64-linux-gnu --program-prefix=x86_64-linux-gnu- --target=x86_64-linux-gnu --with-abi=m64 --with-arch-32=i686 --with-as=/usr/bin/x86_64-linux-gnu-as --with-default-libstdcxx-abi=new --with-gcc-major-version-only --with-ld=/usr/bin/x86_64-linux-gnu-ld --with-multilib-list=m32,m64,mx32 --with-target-system-zlib --with-tune=generic --without-cuda-driver -v Disk Details- HDD: Bcachefs: CFQ / relatime,rw- HDD: Btrfs: CFQ / relatime,rw,space_cache,subvol=/,subvolid=5- HDD: EXT4: CFQ / data=ordered,relatime,rw- HDD: XFS: CFQ / attr2,inode64,noquota,relatime,rw- SSD: Bcachefs: CFQ / relatime,rw- SSD: Btrfs: CFQ / relatime,rw,space_cache,ssd,subvol=/,subvolid=5- SSD: EXT4: CFQ / data=ordered,relatime,rw- SSD: F2FS: CFQ / acl,active_logs=6,background_gc=on,extent_cache,flush_merge,inline_data,inline_dentry,inline_xattr,lazytime,mode=adaptive,no_heap,relatime,rw,user_xattr - SSD: XFS: CFQ / attr2,inode64,noquota,relatime,rwProcessor Details- Scaling Governor: intel_pstate powersavePython Details- Python 2.7.15rc1 + Python 3.6.5Security Details- KPTI + __user pointer sanitization + Full generic retpoline Protection

startup-time: Only Seq Reads - GNOME Terminalstartup-time: Seq Reads + Writes - GNOME Terminalsqlite: Timed SQLite Insertionsfio: Rand Read - Linux AIO - No - Yes - 4KB - Default Test Directoryfio: Rand Write - Linux AIO - No - Yes - 4KB - Default Test Directoryfio: Seq Read - Linux AIO - No - Yes - 4KB - Default Test Directoryfio: Seq Write - Linux AIO - No - Yes - 4KB - Default Test Directoryfs-mark: 1000 Files, 1MB Sizefs-mark: 5000 Files, 1MB Size, 4 Threadsfs-mark: 4000 Files, 32 Sub Dirs, 1MB Sizedbench: 6iozone: 4Kb - 8GB - Write Performancetiobench: Write - 128MB - 16tiobench: Rand Write - 128MB - 16compilebench: Initial Createpgbench: Buffer Test - Normal Load - Read WriteHDDSSD Bcachefs Btrfs EXT4 XFS Bcachefs Btrfs EXT4 F2FS XFS5.2948.12707.371.3985.531.6181.0722.1734.5721.3030.12136.31238.34625.335.2749.661010.421.5328.231.494.1623.1737.8721.2342.82166.08288.90578.885.3652.52685.201.551.0716215517.6345.4717.3018.96135.10515.36313.955.3150.00407.931.561.2018117719.8336.6719.8517.96162.08419.41304.165.3649.8858.4533.5750.4319747.8048.6350.9344.35313.2137.909.32268.18506.97905.245.3454.7987.6421080.1523182.3577.0050.7044.70243.1792.385.8594.11122.681386.005.2854.2040.9822528021141557.9750.6741.28358.53103.9310.46404.90519.962293.365.3850.4534.3021328022541157.4251.2044.55277.6388.957.37126.45559.401600.035.3047.5736.9821127120237696.3752.3043.40438.73105.698.92396.16410.112485.86OpenBenchmarking.org

Application Start-up Time

Background I/O Mix: Only Sequential Reads - Application To Start: GNOME Terminal

HDDSSDOpenBenchmarking.orgsec, Fewer Is BetterApplication Start-up Time 2.3.0Background I/O Mix: Only Sequential Reads - Application To Start: GNOME TerminalBcachefsBtrfsEXT4XFSF2FS1.21052.4213.63154.8426.0525SE +/- 0.04, N = 3SE +/- 0.06, N = 3SE +/- 0.04, N = 3SE +/- 0.04, N = 3SE +/- 0.02, N = 3SE +/- 0.01, N = 3SE +/- 0.05, N = 3SE +/- 0.04, N = 3SE +/- 0.07, N = 35.295.275.365.315.365.345.285.385.30

Application Start-up Time

Background I/O Mix: Sequential Reads + Writes - Application To Start: GNOME Terminal

HDDSSDOpenBenchmarking.orgsec, Fewer Is BetterApplication Start-up Time 2.3.0Background I/O Mix: Sequential Reads + Writes - Application To Start: GNOME TerminalBcachefsBtrfsEXT4XFSF2FS1224364860SE +/- 1.52, N = 6SE +/- 1.08, N = 6SE +/- 1.98, N = 6SE +/- 1.49, N = 6SE +/- 2.45, N = 6SE +/- 2.04, N = 6SE +/- 2.28, N = 6SE +/- 3.16, N = 6SE +/- 0.38, N = 348.1249.6652.5250.0049.8854.7954.2050.4547.57

SQLite

Timed SQLite Insertions

HDDSSDOpenBenchmarking.orgSeconds, Fewer Is BetterSQLite 3.22Timed SQLite InsertionsBcachefsBtrfsEXT4XFSF2FS2004006008001000SE +/- 3.47, N = 3SE +/- 4.34, N = 3SE +/- 5.39, N = 3SE +/- 4.56, N = 3SE +/- 0.78, N = 3SE +/- 0.96, N = 3SE +/- 0.86, N = 6SE +/- 0.32, N = 3SE +/- 0.61, N = 4707.371010.42685.20407.9358.4587.6440.9834.3036.981. (CC) gcc options: -O2 -lz -ldl -lpthread

Flexible IO Tester

Type: Random Read - IO Engine: Linux AIO - Buffered: No - Direct: Yes - Block Size: 4KB - Disk Target: Default Test Directory

HDDSSDOpenBenchmarking.orgMB/s, More Is BetterFlexible IO Tester 3.1Type: Random Read - IO Engine: Linux AIO - Buffered: No - Direct: Yes - Block Size: 4KB - Disk Target: Default Test DirectoryBcachefsBtrfsEXT4XFSF2FS50100150200250SE +/- 0.01, N = 3SE +/- 0.01, N = 3SE +/- 0.01, N = 3SE +/- 0.01, N = 3SE +/- 0.03, N = 3SE +/- 0.67, N = 31.391.531.551.5633.57210.00225.00213.00211.001. (CC) gcc options: -rdynamic -std=gnu99 -ffast-math -include -O3 -U_FORTIFY_SOURCE -ll -lrt -laio -lz -lm -lpthread -ldl

Flexible IO Tester

Type: Random Write - IO Engine: Linux AIO - Buffered: No - Direct: Yes - Block Size: 4KB - Disk Target: Default Test Directory

HDDSSDOpenBenchmarking.orgMB/s, More Is BetterFlexible IO Tester 3.1Type: Random Write - IO Engine: Linux AIO - Buffered: No - Direct: Yes - Block Size: 4KB - Disk Target: Default Test DirectoryBcachefsBtrfsEXT4XFSF2FS60120180240300SE +/- 0.81, N = 3SE +/- 13.15, N = 6SE +/- 0.06, N = 6SE +/- 0.03, N = 6SE +/- 0.83, N = 6SE +/- 2.57, N = 6SE +/- 0.67, N = 3SE +/- 3.76, N = 385.5328.231.071.2050.4380.15280.00280.00271.001. (CC) gcc options: -rdynamic -std=gnu99 -ffast-math -include -O3 -U_FORTIFY_SOURCE -ll -lrt -laio -lz -lm -lpthread -ldl

Flexible IO Tester

Type: Random Write - IO Engine: Linux AIO - Buffered: No - Direct: Yes - Block Size: 4KB - Disk Target: Default Test Directory

HDDSSDOpenBenchmarking.orgIOPS, More Is BetterFlexible IO Tester 3.1Type: Random Write - IO Engine: Linux AIO - Buffered: No - Direct: Yes - Block Size: 4KB - Disk Target: Default Test DirectoryBcachefsBtrfsEXT4F2FSXFS15K30K45K60K75KSE +/- 290.59, N = 3SE +/- 6350.00, N = 2SE +/- 208.17, N = 6SE +/- 678.07, N = 6SE +/- 176.38, N = 3SE +/- 208.17, N = 3SE +/- 983.76, N = 3219671655012900205677183371700694331. (CC) gcc options: -rdynamic -std=gnu99 -ffast-math -include -O3 -U_FORTIFY_SOURCE -ll -lrt -laio -lz -lm -lpthread -ldl

Flexible IO Tester

Type: Sequential Read - IO Engine: Linux AIO - Buffered: No - Direct: Yes - Block Size: 4KB - Disk Target: Default Test Directory

HDDSSDOpenBenchmarking.orgMB/s, More Is BetterFlexible IO Tester 3.1Type: Sequential Read - IO Engine: Linux AIO - Buffered: No - Direct: Yes - Block Size: 4KB - Disk Target: Default Test DirectoryBcachefsBtrfsEXT4XFSF2FS50100150200250SE +/- 0.01, N = 3SE +/- 0.01, N = 3SE +/- 1.76, N = 3SE +/- 7.53, N = 6SE +/- 4.95, N = 6SE +/- 0.33, N = 3SE +/- 0.67, N = 31.611.49162.00181.00197.00231.00211.00225.00202.001. (CC) gcc options: -rdynamic -std=gnu99 -ffast-math -include -O3 -U_FORTIFY_SOURCE -ll -lrt -laio -lz -lm -lpthread -ldl

Flexible IO Tester

Type: Sequential Read - IO Engine: Linux AIO - Buffered: No - Direct: Yes - Block Size: 4KB - Disk Target: Default Test Directory

HDDSSDOpenBenchmarking.orgIOPS, More Is BetterFlexible IO Tester 3.1Type: Sequential Read - IO Engine: Linux AIO - Buffered: No - Direct: Yes - Block Size: 4KB - Disk Target: Default Test DirectoryEXT4XFSBcachefsBtrfsF2FS13K26K39K52K65KSE +/- 33.33, N = 3SE +/- 57.74, N = 3SE +/- 504.42, N = 3SE +/- 1939.89, N = 6SE +/- 1267.81, N = 6SE +/- 88.19, N = 3SE +/- 120.19, N = 3414334630050333591505400057633515671. (CC) gcc options: -rdynamic -std=gnu99 -ffast-math -include -O3 -U_FORTIFY_SOURCE -ll -lrt -laio -lz -lm -lpthread -ldl

Flexible IO Tester

Type: Sequential Write - IO Engine: Linux AIO - Buffered: No - Direct: Yes - Block Size: 4KB - Disk Target: Default Test Directory

HDDSSDOpenBenchmarking.orgMB/s, More Is BetterFlexible IO Tester 3.1Type: Sequential Write - IO Engine: Linux AIO - Buffered: No - Direct: Yes - Block Size: 4KB - Disk Target: Default Test DirectoryBcachefsBtrfsEXT4XFSF2FS90180270360450SE +/- 0.74, N = 3SE +/- 0.38, N = 6SE +/- 0.88, N = 3SE +/- 2.93, N = 4SE +/- 0.58, N = 3SE +/- 2.68, N = 6SE +/- 1.20, N = 3SE +/- 24.98, N = 681.074.16155.00177.0047.8082.35415.00411.00376.001. (CC) gcc options: -rdynamic -std=gnu99 -ffast-math -include -O3 -U_FORTIFY_SOURCE -ll -lrt -laio -lz -lm -lpthread -ldl

Flexible IO Tester

Type: Sequential Write - IO Engine: Linux AIO - Buffered: No - Direct: Yes - Block Size: 4KB - Disk Target: Default Test Directory

HDDSSDOpenBenchmarking.orgIOPS, More Is BetterFlexible IO Tester 3.1Type: Sequential Write - IO Engine: Linux AIO - Buffered: No - Direct: Yes - Block Size: 4KB - Disk Target: Default Test DirectoryBcachefsEXT4XFSBtrfsF2FS20K40K60K80K100KSE +/- 260.34, N = 3SE +/- 272.85, N = 3SE +/- 759.80, N = 4SE +/- 458.26, N = 3SE +/- 697.61, N = 6SE +/- 333.33, N = 3SE +/- 6462.22, N = 62043339767451751190021100106667105000957831. (CC) gcc options: -rdynamic -std=gnu99 -ffast-math -include -O3 -U_FORTIFY_SOURCE -ll -lrt -laio -lz -lm -lpthread -ldl

FS-Mark

Test: 1000 Files, 1MB Size

HDDSSDOpenBenchmarking.orgFiles/s, More Is BetterFS-Mark 3.3Test: 1000 Files, 1MB SizeBcachefsBtrfsEXT4XFSF2FS20406080100SE +/- 0.07, N = 3SE +/- 0.26, N = 3SE +/- 0.03, N = 3SE +/- 0.03, N = 3SE +/- 4.68, N = 6SE +/- 10.26, N = 6SE +/- 11.04, N = 6SE +/- 10.47, N = 6SE +/- 4.75, N = 622.1723.1717.6319.8348.6377.0057.9757.4296.371. (CC) gcc options: -static

FS-Mark

Test: 5000 Files, 1MB Size, 4 Threads

HDDSSDOpenBenchmarking.orgFiles/s, More Is BetterFS-Mark 3.3Test: 5000 Files, 1MB Size, 4 ThreadsBcachefsBtrfsEXT4XFSF2FS1224364860SE +/- 0.20, N = 3SE +/- 0.12, N = 3SE +/- 0.35, N = 3SE +/- 0.19, N = 3SE +/- 0.27, N = 3SE +/- 0.60, N = 3SE +/- 0.27, N = 3SE +/- 0.40, N = 3SE +/- 0.10, N = 334.5737.8745.4736.6750.9350.7050.6751.2052.301. (CC) gcc options: -static

FS-Mark

Test: 4000 Files, 32 Sub Dirs, 1MB Size

HDDSSDOpenBenchmarking.orgFiles/s, More Is BetterFS-Mark 3.3Test: 4000 Files, 32 Sub Dirs, 1MB SizeBcachefsBtrfsEXT4XFSF2FS1020304050SE +/- 0.10, N = 3SE +/- 0.23, N = 3SE +/- 0.00, N = 3SE +/- 0.34, N = 6SE +/- 1.43, N = 6SE +/- 1.02, N = 6SE +/- 0.60, N = 6SE +/- 1.26, N = 6SE +/- 0.85, N = 621.3021.2317.3019.8544.3544.7041.2844.5543.401. (CC) gcc options: -static

Dbench

Client Count: 6

HDDSSDOpenBenchmarking.orgMB/s, More Is BetterDbench 4.0Client Count: 6BcachefsBtrfsEXT4XFSF2FS100200300400500SE +/- 0.33, N = 3SE +/- 0.63, N = 3SE +/- 0.31, N = 4SE +/- 0.00, N = 3SE +/- 6.09, N = 3SE +/- 3.95, N = 3SE +/- 10.98, N = 6SE +/- 0.35, N = 3SE +/- 2.86, N = 330.1242.8218.9617.96313.21243.17358.53277.63438.731. (CC) gcc options: -lpopt -O2

IOzone

Record Size: 4Kb - File Size: 8GB - Disk Test: Write Performance

HDDSSDOpenBenchmarking.orgMB/s, More Is BetterIOzone 3.465Record Size: 4Kb - File Size: 8GB - Disk Test: Write PerformanceBcachefsBtrfsEXT4XFSF2FS4080120160200SE +/- 2.45, N = 6SE +/- 4.97, N = 6SE +/- 0.30, N = 3SE +/- 7.35, N = 6SE +/- 1.89, N = 6SE +/- 3.54, N = 6SE +/- 2.31, N = 6SE +/- 2.53, N = 6SE +/- 1.74, N = 3136.31166.08135.10162.0837.9092.38103.9388.95105.691. (CC) gcc options: -O3

Threaded I/O Tester

Test: Write - Size Per Thread: 128MB - Thread Count: 16

OpenBenchmarking.orgMB/s, More Is BetterThreaded I/O Tester 20170503Test: Write - Size Per Thread: 128MB - Thread Count: 16BcachefsBtrfsEXT4F2FSXFS3691215SE +/- 0.28, N = 6SE +/- 0.04, N = 3SE +/- 0.16, N = 5SE +/- 0.06, N = 3SE +/- 0.15, N = 39.325.8510.467.378.921. (CC) gcc options: -O2

Threaded I/O Tester

Test: Random Write - Size Per Thread: 128MB - Thread Count: 16

OpenBenchmarking.orgMB/s, More Is BetterThreaded I/O Tester 20170503Test: Random Write - Size Per Thread: 128MB - Thread Count: 16BcachefsBtrfsEXT4F2FSXFS90180270360450SE +/- 69.81, N = 6SE +/- 8.70, N = 6SE +/- 26.90, N = 6SE +/- 13.96, N = 6SE +/- 11.66, N = 6268.1894.11404.90126.45396.161. (CC) gcc options: -O2

Compile Bench

Test: Initial Create

HDDSSDOpenBenchmarking.orgMB/s, More Is BetterCompile Bench 0.6Test: Initial CreateBcachefsBtrfsEXT4XFSF2FS120240360480600SE +/- 6.04, N = 6SE +/- 8.61, N = 6SE +/- 4.00, N = 3SE +/- 4.91, N = 3SE +/- 0.67, N = 3SE +/- 2.42, N = 6SE +/- 2.81, N = 3SE +/- 2.19, N = 3SE +/- 5.64, N = 5238.34288.90515.36419.41506.97122.68519.96559.40410.11

PostgreSQL pgbench

Scaling: Buffer Test - Test: Normal Load - Mode: Read Write

HDDSSDOpenBenchmarking.orgTPS, More Is BetterPostgreSQL pgbench 10.3Scaling: Buffer Test - Test: Normal Load - Mode: Read WriteBcachefsBtrfsEXT4XFSF2FS5001000150020002500SE +/- 5.38, N = 3SE +/- 10.48, N = 6SE +/- 5.78, N = 6SE +/- 7.05, N = 6SE +/- 112.07, N = 6SE +/- 87.14, N = 6SE +/- 29.84, N = 3SE +/- 72.84, N = 6SE +/- 116.18, N = 6625.33578.88313.95304.16905.241386.002293.361600.032485.861. (CC) gcc options: -fno-strict-aliasing -fwrapv -O2 -lpgcommon -lpgport -lpq -lpthread -lrt -lcrypt -ldl -lm

Flexible IO Tester

Type: Random Read - IO Engine: Linux AIO - Buffered: No - Direct: Yes - Block Size: 4KB - Disk Target: Default Test Directory

OpenBenchmarking.orgIOPS, More Is BetterFlexible IO Tester 3.1Type: Random Read - IO Engine: Linux AIO - Buffered: No - Direct: Yes - Block Size: 4KB - Disk Target: Default Test DirectoryBtrfsEXT4F2FSXFS12K24K36K48K60KSE +/- 260.34, N = 3SE +/- 33.33, N = 3SE +/- 33.33, N = 3SE +/- 351.19, N = 3534675766754533537001. (CC) gcc options: -rdynamic -std=gnu99 -ffast-math -include -O3 -U_FORTIFY_SOURCE -ll -lrt -laio -lz -lm -lpthread -ldl


Phoronix Test Suite v10.8.4