• Tommy Lindgren's avatar
    fuse: increase max readers for better throughput · 0f728ba1
    Tommy Lindgren authored
    Previously maximum number of requests readers was hard-coded to 2.
    Setting it to max(2, min(16, GOMAXPROCS)) improves the throughput on
    systems with more cores available. Going beyond 16 readers seems to hurt
    performance even if there are more cores available.
    
    Benchmark GoFuseRead can be used for demonstrating the effects of this
    variable. The benchmark reads 32 streams in parallel from a dummy
    filesystem (read operations immediately return zeros). Example results
    from an i7-8550U (8 cores):
    
    | Max readers | Total throughput |
    | ----------: | ---------------: |
    |           2 |       13217 MB/s |
    |           4 |       19202 MB/s |
    |           8 |       19973 MB/s |
    |          16 |       18994 MB/s |
    
    On a 96 core system:
    
    | Max readers | Total throughput |
    | ----------: | ---------------: |
    |           2 |       11490 MB/s |
    |           4 |       16129 MB/s |
    |           8 |       24263 MB/s |
    |          16 |       29568 MB/s |
    |          32 |       28262 MB/s |
    
    Note that improvements won't be as dramatic for real filesytem
    implementations. In benchmarks for a filesystem doing real work I see a
    30-40% improvement (8.3 -> 11.4 GB/s) on the 96 core system.
    
    Also tweaked some of the other benchmarks so they don't leave behind
    mountpoints.
    
    Fixes #388.
    
    Change-Id: Ibff17d7fc92195f078a9ccff818a31f3a58873f2
    0f728ba1
go.sum 818 Bytes