如何在java中使用DMA或RDMA?
这里“DMA”的意思是:直接内存访问,“RDMA”是:远程直接内存访问。
我使用 Java 创建了一个应用程序来传输股票数据,但我发现延迟比我预期的要大。我听说有人开发了同类型的应用程序使用“DMA/RDMA”,它具有良好的性能,所以我想知道我是否可以在Java中使用“DMA/RDMA”?
如果没有,我应该使用什么语言,是否有任何好的库可以使用?
"DMA" here means: Direct memory access, and "RDMA" is: remote direct memory access.
I used Java to created an application to transfer stock data, but I found the latency is bigger than I expected. I heard someone developed same type application used "DMA/RDMA", which has good performance, so I wonder if I can use "DMA/RDMA" in Java?
If not, what language should I use, and if there are any good libraries to use?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
IBM 开发人员工作的这篇文章对如何进行 DMA 访问进行了很好的概述使用java实现
This article from IBM developers work give a great overview of how DMA access can be achieved using java
您有两个选择(据我所知):
JXIO [1],一个基于 RDMA 构建并由 Mellanox [1] com/accelio/JXIO" rel="nofollow">https://github.com/accelio/JXIO
You have two options (that I know of):
[1] https://github.com/accelio/JXIO
DiSNI 是一个用 Java 编写 RDMA 的新库。 DiSNI 是 IBM jVerbs 的开源变体。 此处有一些性能数据可以说明Java 中的 RDMA 与 C 和 Java 中的套接字以及 C 中的 RDMA 有何不同。
There is DiSNI, a new library to program RDMA in Java. DiSNI is the open source variant of IBM's jVerbs. There are some performance numbers here that illustrate how RDMA with Java compares to sockets in C and Java, and also to RDMA in C.
据我所知,RDMA 是网络基础设施的属性(以及相关的内核模块等),而不是应用程序级编程语言的属性。
换句话说,您必须获得专门的套件才能利用 RDMA 来减少网络延迟。以下是支持 RDMA 的 10GbE 网卡示例:
RDMA as I know it is a property of the networking infrastructure (along with the relevant kernel modules etc), not of the application-level programming language.
In other words, you'd have to get specialized kit to make use of RDMA to reduce network latency. Here is an example of a 10GbE network card that supports RDMA: link.
Java 应用程序能够通过 nio 包映射文件。这些 mmaped 文件可以被多个程序访问 - 我担心这与 java 中可用的 DMA 很接近
Java applications are capable of mmaping files via nio packages. Those mmaped files can be accesses by multiple programs - I affraid this is closes thing to DMA available in java
Java 7 支持 Solaris 和 Linux 上的 SDP 协议(使用 OpenFabrics.org 驱动程序)。不幸的是,SDP 协议在 OFED 2.x 版本中已被弃用。人们求助于 jVerbs 等 JNI 包装器。
Java 7 supports SDP protocol on Solaris and Linux (with OpenFabrics.org drivers). Unfortunately SDP protocol has been deprecated in the 2.x version of OFED. People resort to JNI wrappers like jVerbs.