Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nfs: use buffer pool and shallow encoding to avoid extra copy
Motivation: To avoid extra copy EDSOperationREAD uses direct byte buffer which is stored in a thread local variable. Though this model works well for a fixed number of threads, but with a large number of processing threads, in thread-per-request model number, for example, the buffers might grow unexpectedly. Modification: Use PooledMemoryManager from grizzly. In addition, new ShallowREAD4resok class is used to avoid yet another internal copy for a better throughput. Result: Number of direct buffers are independent from number of processing threads. The shallow copy improves READ performance by 30%-70%. IO test (8 threads reading 10GB file) fio --name 'read-test' --description 'Simple NFS read test' --rw=read --numjobs 8 --thread --blocksize 1M --filename 10GB without: READ: bw=928MiB/s (973MB/s), 116MiB/s-116MiB/s (122MB/s-122MB/s), io=80.0GiB (85.9GB), run=88246-88246msec with: READ: bw=1819MiB/s (1907MB/s), 227MiB/s-227MiB/s (238MB/s-238MB/s), io=80.0GiB (85.9GB), run=45042-45044msec Acked-by: Albert Rossi Target: master Require-book: no Require-notes: yes
- Loading branch information