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 技術支持之后的 Java 7 已經開始逐步實現 RDMA 技術 (遠程內存直接訪問)
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 是 遠程直接內存訪問 --? 即通過某種手段來實現通過網絡傳輸來交換在兩個虛擬機進程上運行的應用程序的緩沖空間中的數據
,其中虛擬機進程是運行在 Unix 系列操作系統的用戶地址空間中的。
RDMA differs from traditional network interfaces because it bypasses the operating system .
遠程內存直接訪問技術區別于其他傳統上的網絡接口, 該種技術在網絡中交換數據的全程無需操作系統做出任何控制.
This allows Java SDP over RDMA to deliver :
這使得基于 RDMA 技術之上的 Java 的 SDP技術 可以實現如下目標:
(i) The absolute lowest latency (ii) The highest throughput? (iii) Smallest CPU footprint
(i) 將絕對延遲最小化? (ii) 將吞吐量最大化 (iii) 將 CPU 的管控最小化/讓其無需關心網絡 IO 處理,更加集中處理計算邏輯,從而提高 CPU 的利用率
By exposing a Java join point to RDMA , SDP implicitly also enables Java to provide a very compelling "Zero-copy" capability.
通過把 Java 的連接點暴露給 RDMA ,SDP 私下里還支持 Java 實現了一個非常吸引人眼球的 "零-拷貝" 的新技術.
"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" 這一名詞是用來描述計算機操作系統中的 CPU 是不會執行將數據從一個內存從拷貝到另一內存中 這樣的任務.
Zero-copy versions of network protocol stacks greatly increase the
performance of certain application programs and more efficiently utilize
system resources.
在網絡協議棧中實現的 零-拷貝 技術版本極大程度上提高了某些應用系統的性能的同時,也使它們更加充分的利用系統資源.
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 不參與數據拷貝工作而去處理其他的任務的同時,將數據拷貝任務在 CPU 的其他區域與 CPU 并行工作來極大地提升性能。
Also , zero-copy operations reduce the number of time-consuming mode switches between user space and kernel space.
同樣,零-拷貝 操作減少了耗費時間的 用戶態-系統態狀態 切換的次數,從而節省了時間。
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 .
系統資源其實還可以更加充分的被利用,因為如果相對簡單的拷貝任務可以分配給簡單的系統組件來完成,
卻仍舊讓一個設計精密復雜的 CPU 來執行大量的相對簡單的任務操作,則實在是一種浪費。
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;.
有一點需謹記的就是,我們現在正在談論的 "零-拷貝" 技術并非你在使用 java 編程中所使用的? java.nio.channels.FileChannel 中的 transferTo()
函數所提供的 "零-拷貝" 功能。
It is much , much more performant.
我們談論的"零-拷貝" 技術所提升的性能要遠遠高出這個 API 接口函數.
With Java 7 SDP , you directly use the native InfiniBand Zero-copy protocol implementation .
有了 Java 7 的 SDP 技術,本地 InfiniBand 零拷貝協議便可立即為你所用.
Let's start to visually depict exactly what Sockets Direct Protocol capability
looks like within the context of some typical Java deployment views.
現在讓我們開始直觀地描述一下,Sockets Direct Protocol 這種技術究竟在典型的 Java 部署架構圖中是如何被描述的.
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 (一個 java.net.Socket writer 的對象實例) 和 Node 2( 這個 Node 2 是 java.net.ServerSocket 包中 listener 的類實例對象)
是如何被配置、部署在 Java 7 的虛擬機上的;這幅圖同樣描述了這兩個節點(Node1,Node2) 是以何種方式來應用 SDP 技術
-- SDP 技術實現了 JVM 可在無需 動用 任何系統調用方法或是觸發任何操作系統中的服務的前提下, 經由 InfiniBand 網絡傳輸,
來和另一臺主機上的 JVM 互換應用程序數據緩沖區中數據信息.
Incredibly , the Java data transfer completely bypasses both operating systems.
令人難以置信的是,在整個數據傳輸過程中都完全繞開通信雙方的操作系統
/在整個數據傳輸過程中,通信雙方的操作系統從頭到尾沒有參與其中
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 版本實現的應用程序 Node 1 (JVM 再啟動的時候,就開啟了 SDP 應用 ) 通過調用 java.net.Socket 包中的應用程序接口函數,
借助于網絡傳輸(InfiniBand ) 來將應用程序數據通過網絡傳輸的
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 應用開啟的方式啟動的, 所以 Java 的應用程序在執行寫入操作的時候是直接把數據直接通過 InfiniBand 的遠程內存直接訪問技術
寫入到了通信端程序的內存空間中,而這一過程徹徹底底地繞過了操作系統中的 TCP/IP 協議棧。( 其中, RDMA 技術的物理設備支撐是要使用 InfiniBand 這種型號的網絡接口卡的)
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 版本編寫的應用程序 Node 2 (同樣 JMV 以開啟 SDP 服務的方式啟動的) 使用 java.net.ServerSocket 軟件包中的函數
來創建用于監聽的類實例,該應用實例用于監聽是否有屬于 java.net.Socket writer 的應用程序發送的數據塊,經由網絡以 RDMA 的傳輸方式發送過來.
(同樣,這種通信方式也需要有 InfiniBand作為網絡接口卡這一物理設備作為支撐的 )
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. 傳輸的數據直接就被發送到了 Java 虛擬機 應用程序緩沖區中(啊)!在此過程中 Node1 和 Node 2 無任何一方的操作系統以系統調用或是提供特定服務的方式參與到其中。
這就是 Java 7 中 SDP 技術的強大之處. ?? (只要998 ,**** 捧回家 的推銷即視感)
What is the logical performance difference between the same application running on
Java 7 with SDP vs. Java 6 ?
從邏輯上分析,運行在支持 SDP 技術 的Java 7 (虛擬機) 和 Java 6 (虛擬機) 上的同一段應用程序性能上的差異(是什么--強行問號結尾?)
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 技術的 Java 7 的原理圖 (左下所示) 運行上一圖中描述的應用程序的時候, Node2 是如何接收經由 OSI 網絡協議層發送過來的
Node1 上的數據并將其收入到自己的應用程序內存中的?? 該過程共分成多少步 ?
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) .
答案是一步 !(完成上述所有的操作) (看一下下面的圖示你就會明白 -- 這對編寫和使用 Java 應用程序的 超高性能計算組是一個天大的好消息; 現在 超高性能計算組 已經
可以借助于 Java 7 來將這套理論用在實際的工作中了)
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. 運行于 Java 6 虛擬機上的相同程序 (版本 6 不支持 SDP 技術,其原理圖如下圖右半部分所示)? 如何實現 在 Node 2 上接收來自 Node 1 發送的經由 OSI 網絡層的協議棧
的數據信息,并將其存放到自身應用程序內存空間中 這一系列的操作 ? 這一過程共分為幾個步驟?? 答案是需要 5 步 (簡單的來看一下下面的圖示 -- 整個的傳輸過程和 TCP/IP 協議棧很相似 --
卻和 SDP 完全不同。 TCP/IP 協議棧的流程為大多數的服務所用,但是卻并不是 高性能計算組的選擇。高性能計算組使用 6 代 Java 虛擬機的話是無法正常處理日常事務的.
總結
以上是生活随笔為你收集整理的java sdp_[java,SDP] java 7 SDP 技术/Socket Direct Protocol 2的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: mysql rpm包安装指定路径_安装r
- 下一篇: linux共享软件_为什么 linux