ut-osa / strata

Strata: A Cross Media File System
69 stars 42 forks source link

Add simple implementation for SPDK multithreading. #8

Closed iangneal closed 5 years ago

iangneal commented 6 years ago

This basic implementation of SPDK multithreading creates multiple qpairs for libfs/kernfs. Each thread then uses one qpair for all its operations (if there are more threads than available qpairs, the threads share based on thread id).

The performance characteristics are as follows (averages measured in throughput, MB/sec):

--- CONCURRENT disabled

sudo ./run.sh iotest sw 16G 4K 1

    - 675.1 MB/sec

sudo ./run.sh iotest sr 4G 4K 1

    - 400 MB/sec

--- CONCURRENT enabled

sudo ./run.sh iotest sw 4G 4K 4

    - 1667.5 MB/sec (2.47x)

sudo ./run.sh iotest sr 1G 4K 4

    - 170.4 MB/sec (0.42x)

Writes are significantly better, whereas reads are significantly worse. I plan on investigating this more thoroughly and coming up with a better qpair load-balancing strategy, but I figured merging the naive implementation first would be a good step.

iangneal commented 6 years ago

The read overhead seems to be an issue with the IO size per thread: running

sudo ./run.sh iotest sr 4G 4K 4

Actually results in a ~450 MB/sec throughput (1.12x)

iangneal commented 6 years ago

@fzheart Let me know if you rather have these changes be committed to a separate branch rather than merged to master.