java sdp_[java,SDP] java 7 SDP 技术/Socket Direct Protocol 2
With Java 7 and Sockets Direct Protocol , Java Now does RDMA ( Remote Direct Memory Access)
有了 SDP 技術(shù)支持之后的 Java 7 已經(jīng)開始逐步實(shí)現(xiàn) RDMA 技術(shù) (遠(yuǎn)程內(nèi)存直接訪問)
RDMA is Remote Dynamic Memory Accesss -- which is a way of moving application buffers between two Java VM processes'
(executing in *nix user address space ) across a network.
RDMA 是 遠(yuǎn)程直接內(nèi)存訪問 --? 即通過某種手段來實(shí)現(xiàn)通過網(wǎng)絡(luò)傳輸來交換在兩個(gè)虛擬機(jī)進(jìn)程上運(yùn)行的應(yīng)用程序的緩沖空間中的數(shù)據(jù)
,其中虛擬機(jī)進(jìn)程是運(yùn)行在 Unix 系列操作系統(tǒng)的用戶地址空間中的。
RDMA differs from traditional network interfaces because it bypasses the operating system .
遠(yuǎn)程內(nèi)存直接訪問技術(shù)區(qū)別于其他傳統(tǒng)上的網(wǎng)絡(luò)接口, 該種技術(shù)在網(wǎng)絡(luò)中交換數(shù)據(jù)的全程無需操作系統(tǒng)做出任何控制.
This allows Java SDP over RDMA to deliver :
這使得基于 RDMA 技術(shù)之上的 Java 的 SDP技術(shù) 可以實(shí)現(xiàn)如下目標(biāo):
(i) The absolute lowest latency (ii) The highest throughput? (iii) Smallest CPU footprint
(i) 將絕對(duì)延遲最小化? (ii) 將吞吐量最大化 (iii) 將 CPU 的管控最小化/讓其無需關(guān)心網(wǎng)絡(luò) IO 處理,更加集中處理計(jì)算邏輯,從而提高 CPU 的利用率
By exposing a Java join point to RDMA , SDP implicitly also enables Java to provide a very compelling "Zero-copy" capability.
通過把 Java 的連接點(diǎn)暴露給 RDMA ,SDP 私下里還支持 Java 實(shí)現(xiàn)了一個(gè)非常吸引人眼球的 "零-拷貝" 的新技術(shù).
"Zero-copy"
describes computer operations in which the CPU does not perform the
task of copying data from one memory area to another .
"Zero-copy" 這一名詞是用來描述計(jì)算機(jī)操作系統(tǒng)中的 CPU 是不會(huì)執(zhí)行將數(shù)據(jù)從一個(gè)內(nèi)存從拷貝到另一內(nèi)存中 這樣的任務(wù).
Zero-copy versions of network protocol stacks greatly increase the
performance of certain application programs and more efficiently utilize
system resources.
在網(wǎng)絡(luò)協(xié)議棧中實(shí)現(xiàn)的 零-拷貝 技術(shù)版本極大程度上提高了某些應(yīng)用系統(tǒng)的性能的同時(shí),也使它們更加充分的利用系統(tǒng)資源.
Performance
is enhanced by allowing the CPU to move on to other tasks while data
copying procedds in parallel in another part of the machine .
讓 CPU 不參與數(shù)據(jù)拷貝工作而去處理其他的任務(wù)的同時(shí),將數(shù)據(jù)拷貝任務(wù)在 CPU 的其他區(qū)域與 CPU 并行工作來極大地提升性能。
Also , zero-copy operations reduce the number of time-consuming mode switches between user space and kernel space.
同樣,零-拷貝 操作減少了耗費(fèi)時(shí)間的 用戶態(tài)-系統(tǒng)態(tài)狀態(tài) 切換的次數(shù),從而節(jié)省了時(shí)間。
System resources are utilized more efficiently since using a sophisticated CPU to perform extensive copy operaitons,
which is a relatively simple task, is wasteful if other simpiler system components can do the copying .
系統(tǒng)資源其實(shí)還可以更加充分的被利用,因?yàn)槿绻鄬?duì)簡單的拷貝任務(wù)可以分配給簡單的系統(tǒng)組件來完成,
卻仍舊讓一個(gè)設(shè)計(jì)精密復(fù)雜的 CPU 來執(zhí)行大量的相對(duì)簡單的任務(wù)操作,則實(shí)在是一種浪費(fèi)。
It
is important to note that the Zero-copy capability we are talking about
here is not the Zero-Copy capability you can achieve by
using java.nio.channels. FileChannel's transferTo() API;.
有一點(diǎn)需謹(jǐn)記的就是,我們現(xiàn)在正在談?wù)摰?"零-拷貝" 技術(shù)并非你在使用 java 編程中所使用的? java.nio.channels.FileChannel 中的 transferTo()
函數(shù)所提供的 "零-拷貝" 功能。
It is much , much more performant.
我們談?wù)摰?#34;零-拷貝" 技術(shù)所提升的性能要遠(yuǎn)遠(yuǎn)高出這個(gè) API 接口函數(shù).
With Java 7 SDP , you directly use the native InfiniBand Zero-copy protocol implementation .
有了 Java 7 的 SDP 技術(shù),本地 InfiniBand 零拷貝協(xié)議便可立即為你所用.
Let's start to visually depict exactly what Sockets Direct Protocol capability
looks like within the context of some typical Java deployment views.
現(xiàn)在讓我們開始直觀地描述一下,Sockets Direct Protocol 這種技術(shù)究竟在典型的 Java 部署架構(gòu)圖中是如何被描述的.
The
following diagram illustrates how Node1 ( a java.net.Socket writer )
and Node 2 (a java.net.ServerSocket listener ) can be deployed onto a
Java 7 VM configured and?booted to support SDP in such a way that the
JVMs can exchange application data buffers from one VM to the other ,
across an InfiniBand network , without any OS system-calls or services
being invoked. Incredibly, the Java data transfer completely?bypasses
both operating systems.
下面的這幅圖像我們闡述的是 Node1 (一個(gè) java.net.Socket writer 的對(duì)象實(shí)例) 和 Node 2( 這個(gè) Node 2 是 java.net.ServerSocket 包中 listener 的類實(shí)例對(duì)象)
是如何被配置、部署在 Java 7 的虛擬機(jī)上的;這幅圖同樣描述了這兩個(gè)節(jié)點(diǎn)(Node1,Node2) 是以何種方式來應(yīng)用 SDP 技術(shù)
-- SDP 技術(shù)實(shí)現(xiàn)了 JVM 可在無需 動(dòng)用 任何系統(tǒng)調(diào)用方法或是觸發(fā)任何操作系統(tǒng)中的服務(wù)的前提下, 經(jīng)由 InfiniBand 網(wǎng)絡(luò)傳輸,
來和另一臺(tái)主機(jī)上的 JVM 互換應(yīng)用程序數(shù)據(jù)緩沖區(qū)中數(shù)據(jù)信息.
Incredibly , the Java data transfer completely bypasses both operating systems.
令人難以置信的是,在整個(gè)數(shù)據(jù)傳輸過程中都完全繞開通信雙方的操作系統(tǒng)
/在整個(gè)數(shù)據(jù)傳輸過程中,通信雙方的操作系統(tǒng)從頭到尾沒有參與其中
1.
Java 7 application=Node 1 (JVM booted to use SDP) uses the
java.net.Socket API to write a block of application data across the
network to a
java.net.ServerSocket listener
1. 使用 Java 7 版本實(shí)現(xiàn)的應(yīng)用程序 Node 1 (JVM 再啟動(dòng)的時(shí)候,就開啟了 SDP 應(yīng)用 ) 通過調(diào)用 java.net.Socket 包中的應(yīng)用程序接口函數(shù),
借助于網(wǎng)絡(luò)傳輸(InfiniBand ) 來將應(yīng)用程序數(shù)據(jù)通過網(wǎng)絡(luò)傳輸?shù)?/p>
2.
Because the JVM was booted to use SDP the Operating System TCP/IP stack
is completely bypassed - the application data is? written directly to
InfiniBand's
RDMA capability ? ( requires InfiniBand to be the physical provider of Network Interface Card ) .
由于 JVM 是以 SDP 應(yīng)用開啟的方式啟動(dòng)的, 所以 Java 的應(yīng)用程序在執(zhí)行寫入操作的時(shí)候是直接把數(shù)據(jù)直接通過 InfiniBand 的遠(yuǎn)程內(nèi)存直接訪問技術(shù)
寫入到了通信端程序的內(nèi)存空間中,而這一過程徹徹底底地繞過了操作系統(tǒng)中的 TCP/IP 協(xié)議棧。( 其中, RDMA 技術(shù)的物理設(shè)備支撐是要使用 InfiniBand 這種型號(hào)的網(wǎng)絡(luò)接口卡的)
3.
Java 7 application= Node2 ( JVM also booted to use SDP) uses the
java.net.ServerSocket API to listen for a block of application data to
arrive via RDMA across the network from
a java.net.Socket writer . (Requires InfiniBand to be the physical provider of Network Interface Card ).
3. 基于 Java 7 版本編寫的應(yīng)用程序 Node 2 (同樣 JMV 以開啟 SDP 服務(wù)的方式啟動(dòng)的) 使用 java.net.ServerSocket 軟件包中的函數(shù)
來創(chuàng)建用于監(jiān)聽的類實(shí)例,該應(yīng)用實(shí)例用于監(jiān)聽是否有屬于 java.net.Socket writer 的應(yīng)用程序發(fā)送的數(shù)據(jù)塊,經(jīng)由網(wǎng)絡(luò)以 RDMA 的傳輸方式發(fā)送過來.
(同樣,這種通信方式也需要有 InfiniBand作為網(wǎng)絡(luò)接口卡這一物理設(shè)備作為支撐的 )
4.
Data delivered *directly* to de Java VM application buffer!? No OS
system or service calls involved - neither from Node 1's OS nor 2's OS.
That is the power of Java 7 Sockets Direct Protocol .
4. 傳輸?shù)臄?shù)據(jù)直接就被發(fā)送到了 Java 虛擬機(jī) 應(yīng)用程序緩沖區(qū)中(啊)!在此過程中 Node1 和 Node 2 無任何一方的操作系統(tǒng)以系統(tǒng)調(diào)用或是提供特定服務(wù)的方式參與到其中。
這就是 Java 7 中 SDP 技術(shù)的強(qiáng)大之處. ?? (只要998 ,**** 捧回家 的推銷即視感)
What is the logical performance difference between the same application running on
Java 7 with SDP vs. Java 6 ?
從邏輯上分析,運(yùn)行在支持 SDP 技術(shù) 的Java 7 (虛擬機(jī)) 和 Java 6 (虛擬機(jī)) 上的同一段應(yīng)用程序性能上的差異(是什么--強(qiáng)行問號(hào)結(jié)尾?)
1. Using Java 7 with SDP configured (shown below left) How does Node 2's reception of Node 1's transmitted data travel up
the OSI Network layer protocol stack and into the Java application ? How many steps does it take ?
1. 使用支持 SDP 技術(shù)的 Java 7 的原理圖 (左下所示) 運(yùn)行上一圖中描述的應(yīng)用程序的時(shí)候, Node2 是如何接收經(jīng)由 OSI 網(wǎng)絡(luò)協(xié)議層發(fā)送過來的
Node1 上的數(shù)據(jù)并將其收入到自己的應(yīng)用程序內(nèi)存中的?? 該過程共分成多少步 ?
It takes only one step ! (Take a look below -- this is the great news
for UHPC Java apps; now UHPC community can use Java 7 to do what needs
to be done) .
答案是一步 !(完成上述所有的操作) (看一下下面的圖示你就會(huì)明白 -- 這對(duì)編寫和使用 Java 應(yīng)用程序的 超高性能計(jì)算組是一個(gè)天大的好消息; 現(xiàn)在 超高性能計(jì)算組 已經(jīng)
可以借助于 Java 7 來將這套理論用在實(shí)際的工作中了)
2.
Using Java 6 ( no SDP - shown below right ) How does Node 2's reception
of Node 1's transmitted data travel up the OSI Network layer protocol
stack and into the Java
application ? ???? How many steps does it take ? It takes five stepts(
Take a look below -- this is the familiar TCP/IP protocol stack -- not
SDP. It works for most ,
but does not work for the UHPC community . UHPC community just can't use Java 6 to do what needs to be done ).
2. 運(yùn)行于 Java 6 虛擬機(jī)上的相同程序 (版本 6 不支持 SDP 技術(shù),其原理圖如下圖右半部分所示)? 如何實(shí)現(xiàn) 在 Node 2 上接收來自 Node 1 發(fā)送的經(jīng)由 OSI 網(wǎng)絡(luò)層的協(xié)議棧
的數(shù)據(jù)信息,并將其存放到自身應(yīng)用程序內(nèi)存空間中 這一系列的操作 ? 這一過程共分為幾個(gè)步驟?? 答案是需要 5 步 (簡單的來看一下下面的圖示 -- 整個(gè)的傳輸過程和 TCP/IP 協(xié)議棧很相似 --
卻和 SDP 完全不同。 TCP/IP 協(xié)議棧的流程為大多數(shù)的服務(wù)所用,但是卻并不是 高性能計(jì)算組的選擇。高性能計(jì)算組使用 6 代 Java 虛擬機(jī)的話是無法正常處理日常事務(wù)的.
總結(jié)
以上是生活随笔為你收集整理的java sdp_[java,SDP] java 7 SDP 技术/Socket Direct Protocol 2的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: mysql rpm包安装指定路径_安装r
- 下一篇: oracle导出超链接,Oracle R