Rate This Document
Findability
Accuracy
Completeness
Readability

SPDK Interrupt Aggregation

VirtIO+SPDK bypasses the traditional kernel storage stack through SPDK and implements a low-latency, high-throughput virtualized storage I/O acceleration solution using userspace drivers and shared memory. SPDK interrupt aggregation is proposed for scenarios with a large number of frontend interrupts. It employs the VirtIO frontend and backend-aware interrupt aggregation technology to reduce the number of interrupt notifications from the backend to the frontend by detecting the number of I/O requests and I/O completion requests. This frees up CPU computing power for frontend I/O request delivery and frontend I/O data reading, improving system throughput.

  1. Download SPDK 24.01 source code.
    1
    2
    3
    mkdir SPDK_24.01
    cd SPDK_24.01
    git clone https://github.com/spdk/spdk -b v24.01.x
    
  2. Download the SPDK patch.
    1
    2
    3
    4
    git clone https://gitee.com/src-openeuler/spdk.git
    cd spdk
    git checkout -b 2403SP2_SPDK origin:openEuler-24.03-LTS-SP2
    cp 0013-vhost-add-vhost-interrupt-coalescing.patch ../SPDK_24.01/spdk
    
  3. Compile and use the new SPDK.
    1
    2
    3
    4
    5
    6
    7
    cd ../SPDK_24.01/spdk
    git submodule update --init
    ./configure  --disable-tests --disable-unit-tests  --enable-lto --disable-debug
    make -j`nproc` 
    make -j`nproc` install 
    ln -s `pwd`/build/bin/vhost /usr/bin/vhost 
    ln -s `pwd`/scripts/rpc.py /usr/bin/rpc 
    
  4. Enable SPDK interrupt aggregation.
    1
    2
    3
    ./vhost -S /var/tmp -m [168,170,172,174] -E &
    rpc bdev_aio_create /dev/nvme1n1 aio_0 512
    rpc vhost_create_blk_controller vhost.0 aio_0
    

    -E is a newly added interrupt aggregation toggle.

    [168,170,172,174] indicates the four polling cores bound to SPDK.