mar-file-system / erasureUtils

Erasure coding utilities intended for the marfs multicomponent DAL. These service the creation, retrieval, and maintenance of erasure coded data stripes spread accross multiple files.
Other
4 stars 5 forks source link

Multi-thread reads #9

Closed wfvining closed 5 years ago

wfvining commented 7 years ago

Multi-thread the ne_read code the same way as we did ne_write This is needed for two reasons:

  1. It will reduce latency for reads (especially reads via marfs-fuse)
  2. It is necessary to work around setresuid() problems with the uverbs character device for the forthcoming RDMA version of libne.

The implementation will be effectively the inverse of ne_write. We will have N+E producer threads reading into twelve separate buffers. The main (calling) thread will act as a consumer pulling blocks off the N+E buffer queues as it needs them to return data from ne_read. This is more complex than ne_write, however, because we would like to avoid reading from the erasure blocks unless they are needed (since in a 10+2 configuration that will increase the amount of data sent over the network by 20%, as well as increasing the load on each filesystem). To facilitate that I will add some extra signaling machinery to the buffer queues that will support deferring reads and beginning reads at a particular offset.

gransom commented 5 years ago

Implemented in pull request #18. I will close this issue after the merge.

gransom commented 5 years ago

Pull request has been merged. Closing this issue.