Learned Index on GPU(ICDE2022)

索引是快速访问数据库中特定信息的关键结构。近年来,关于“学习索引”的研究受到了广泛关注。其关键思想是,索引可以看作是一个将键映射到数据集中特定位置的模型,因此可以用机器学习模型取代传统的索引结构。现有的学习索引普遍具有比传统索引更高的时间效率和更小的空间占用,但其查询效率和并发性受到CPU的限制。

GPU以其独特的体系结构和强大的计算能力被广泛应用于计算密集型任务中。根据近年来对学习索引的研究,提出了一种将GPU和学习索引的优势相结合的新思路,将学习索引放在GPU内存中,充分利用GPU的高并发和计算能力。在GPU上实现了PGM-index,并在几个真实和合成数据集上进行了广泛的实验。实验结果表明,在静态负载下,当查询规模较大时,所提方法在CPU上的性能最高可提升20倍

阅读者总结:这篇论文的核心是将GPU和PGM-index结合起来,总体上更加偏向工程实现,在学习索引的设计上明显地没有看出什么新颖点,当然了GPU是适合并发线程的计算过程,加速查询,但是这学习索引问题本身的解决上 没有什么多的贡献。

背景:

1)当前学习索引的查询效率和并发性通常受到CPU计算能力和吞吐量的限制。

2)使得在GPU上开发学习索引具有挑战性。实现高效的GPU并行计算需要解决3个主要问题:(1)输入数据在内存中的传输和结果从GPU内存中检索的延迟仍然非常高;(2) CPU和GPU内核之间的操作同步会造成严重的性能损失;(3) GPU具有层次化的存储空间和独特的高效访存方式,因此需要考虑当前学习到的索引结构在GPU体系结构中的适应性。

框架:

     对其结构进行了概述并建立了一个量化模型来评估GPU- pgm索引相对于原始的GPU- pgm索引(CPU-PGM)[2]在查询操作上的加速比。然后描述了GPU-PGM的数据结构建立过程和搜索操作

 实验部分

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
## A C++11 implementation of the B-Tree part of "The Case for Learned Index Structures" A research **proof of concept** that implements the B-Tree section of [The Case for Learned Index Structures](https://arxiv.org/pdf/1712.01208.pdf) paper in C++. The general design is to have a single lookup structure that you can parameterize with a KeyType and a ValueType, and an overflow list that keeps new inserts until you retrain. There is a value in the constructor of the RMI that triggers a retrain when the overflow array reaches a certain size. The basic API: ```c++ // [first/second]StageParams are network parameters int maxAllowedError = 256; int maxBufferBeforeRetrain = 10001; auto modelIndex = RecursiveModelIndex recursiveModelIndex(firstStageParams, secondStageParams, maxAllowedError, maxBufferBeforeRetrain); for (int ii = 0; ii < 10000; ++ii) { modelIndex.insert(ii, ii * 2); } // Since we still have one more insert before retraining, retrain before searching... modelIndex.train(); auto result = modelIndex.find(5); if (result) { std::cout << "Yay! We got: " << result.get().first << ", " << result.get().second << std::endl; } else { std::cout << "Value not found." << std::endl; // This shouldn't happen in the above usage... } ``` See [src/main.cpp](src/main.cpp) for a usage example where it stores scaled log normal data. ### Dependencies - [nn_cpp](https://github.com/bcaine/nn_cpp) - Eigen based minimalistic C++ Neural Network library - [cpp-btree](https://code.google.com/archive/p/cpp-btree/) - A fast C++ implementation of a B+ Tree ### TODO: - Lots of code cleanup - Profiling of where the slowdowns are. On small tests, the cpp_btree lib beats it by 10-100x - Eigen::TensorFixed in nn_cpp would definitel

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值