为改善线性哈希表这一有效索引结构的插入性能,在分析现有方法的基础上,结合CUDA并行编程模型,设计并实现了一种基于GPU的批量插入线性哈希表GBLHT;借助原子函数atomicAdd,GBLHT可以充分利用GPU强大的并行吞吐量来实现大规模记录的无锁批量插入;通过实验对比传统串行插入方法、CPU批量插入方法以及GBLHT的插入性能,发现在不同参数设置条件下,GBLHT的插入性能比传统串行方式提升了7~14倍,与4线程的CPU批量插入方法相比则提升了3—6倍.
In order to improve the insertion performance of linear Hash table known as an effective index structure, the existing insertion methods are analyzed, and a linear Hash table GBLHT with batch records insertion, which is combined with the CUDA parallel programming model, is designed and implemented. With the help of the atomic function atomicAdd, GBLHT takes full advantage of the high parallel throughput of graphic processing unit (GPU) to implement the lock-free batch insertion of massive records. Some experiments are then carried out to compare the insertion performances of the traditional serial insertion method, the CPU-based batch insertion method and GBLHT. The results show that, under various parameter conditions, the insertion performance of GBLHT is 7 - 14 times higher than that of the traditional serial method, and is 3 - 6 times higher than that of the CPU-based batch insertion method with four threads.