All Projects → zrlio → jNVMf

zrlio / jNVMf

Licence: Apache-2.0 License
A NVMf library for Java

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to jNVMf

ExponentialUtilities.jl
Utility functions for exponential integrators for the SciML scientific machine learning ecosystem
Stars: ✭ 59 (+156.52%)
Mutual labels:  high-performance
radondb-mysql-kubernetes
Open Source,High Availability Cluster,based on MySQL
Stars: ✭ 146 (+534.78%)
Mutual labels:  high-performance
leafserver
🍃A high performance distributed unique ID generation system
Stars: ✭ 31 (+34.78%)
Mutual labels:  high-performance
COBREXA.jl
Constraint-Based Reconstruction and EXascale Analysis
Stars: ✭ 21 (-8.7%)
Mutual labels:  high-performance
boundstone
High Performance / Fast Compilation / Lightweight MCBE Server
Stars: ✭ 42 (+82.61%)
Mutual labels:  high-performance
bitECS
Functional, minimal, data-oriented, ultra-high performance ECS library written in JavaScript
Stars: ✭ 372 (+1517.39%)
Mutual labels:  high-performance
swirl
High-Performance Erlang Stream Processor
Stars: ✭ 52 (+126.09%)
Mutual labels:  high-performance
sedcli
sedcli and libsed library for NVMe Self-Encrypting Drives (SEDs) management
Stars: ✭ 22 (-4.35%)
Mutual labels:  nvme
FastRationals.jl
Arithmetic with small and with very large rationals is made fast.
Stars: ✭ 15 (-34.78%)
Mutual labels:  high-performance
NanoLogLite
A revised version of NanoLog which writes human readable log file, and is easier to use.
Stars: ✭ 18 (-21.74%)
Mutual labels:  high-performance
Apulis-AI-Platform
The AI platform is designed to provide an end-to-end AI solution to users from different industries and enable them to start the high-performance AI development work with significantly reduced ramp up time, thereby saving costs and improving efficie.
Stars: ✭ 50 (+117.39%)
Mutual labels:  high-performance
webgui
Web Technologies based Crossplatform GUI Framework with Dark theme
Stars: ✭ 81 (+252.17%)
Mutual labels:  high-performance
Corium
Corium is a modern scripting language which combines simple, safe and efficient programming.
Stars: ✭ 18 (-21.74%)
Mutual labels:  high-performance
sriov-cni
DPDK & SR-IOV CNI plugin
Stars: ✭ 209 (+808.7%)
Mutual labels:  high-performance
ormdb
ORM tool for .Net / .Net.Core
Stars: ✭ 14 (-39.13%)
Mutual labels:  high-performance
libdynamic
High performance utility library for C
Stars: ✭ 78 (+239.13%)
Mutual labels:  high-performance
space
A SCI-FI community game server simulating space(ships). Built from the ground up to support moddable online action multiplayer and roleplay!
Stars: ✭ 25 (+8.7%)
Mutual labels:  high-performance
zenfs
ZenFS is a storage backend for RocksDB that enables support for ZNS SSDs and SMR HDDs.
Stars: ✭ 63 (+173.91%)
Mutual labels:  nvme
carina
Carina: an high performance and ops-free local storage for kubernetes
Stars: ✭ 256 (+1013.04%)
Mutual labels:  high-performance
canchat
Feature-complete rooms-based chat for tens of thousands users. Client plus Server. Built with Oat++ Web Framework.
Stars: ✭ 38 (+65.22%)
Mutual labels:  high-performance

jNVMf: A NVMe over Fabrics library for Java

jNVMf is a Java library for remote access to NVMe storage. It implements client side of the NVMe over Fabrics (NVMf) specification. jNVMf has been tested to work with SPDK, Linux and Mellanox offloading targets. Futhermore it supports advanced NVMe/f features like fused operations, incapsule data and dataset management.

Building jNVMf

Building the source requires Apache Maven and a Java JDK with Java version 8. jNVMf depends on DiSNI while the java dependecy is automatically picked up from maven central you need to download and compile the native library of DiSNI. Check the DiSNI README for instructions on how to build the native library. To build jNVMf use:

mvn -DskipTests package or mvn -DskipTests install

Run Unit tests

To run the unit tests make sure the LD_LIBRARY_PATH contains libdisni (see above) and execute:

mvn test -Prdma -DargLine="-DdestinationAddress=10.100.0.5 -DlocalAddress=10.100.0.2 -Dnqn=nqn.2017-06.io.crail:cnode4420 -Dport=4420"

where destinationAddress is the target IP address, localAddress is the local IP of the RDMA device, nqn the NVMe qualified name of the controller you want to connect to and port the port of the target.

Run benchmark

jNVMf provides a small benchmark tool. Run:

java -cp target/jnvmf-1.7-jar-with-dependencies.jar:target/jnvmf-1.7-tests.jar com.ibm.jnvmf.utils.NvmfClientBenchmark --help

to shows the available arguments.

For example:

java -cp target/jnvmf-1.7-jar-with-dependencies.jar:target/jnvmf-1.7-tests.jar com.ibm.jnvmf.utils.NvmfClientBenchmark -a 10.100.0.22 -p 4420 -g 4096 -i 3 -m RANDOM -n 10 -nqn nqn.2016-06.io.spdk:cnode1 -o bench.csv -qd 1 -rw read -s 4096 -qs 64 -H -I

  • executes a -m RANDOM -rw read test
  • to a target at -a 10.100.0.22, -p 4420 with controller -nqn nqn.2016-06.io.spdk:cnode1
  • all accesses are aligned to -g 4096 bytes
  • statistics are printed every -i 3 seconds -n 10 times
  • output is written to -o bench.csv in csv format
  • queue depth -qd 1
  • transfer size -s 4096 bytes
  • queue size -qs 64 entries
  • histogram -H
  • RDMA inline data -I

Run diagnostics

jNVMf offers a tool to run diagnostics. Print help with:

java -cp target/jnvmf-1.7-jar-with-dependencies.jar:target/jnvmf-1.7-tests.jar com.ibm.jnvmf.utils.NvmfDiagnostics --help

Example:

java -Djnvmf.legacy=true -cp jnvmf-1.7-jar-with-dependencies.jar:jnvmf-1.7-tests.jar com.ibm.jnvmf.utils.NvmfDiagnostics -a 10.100.0.22 -p 4420 -nqn nqn.2016-06.io.spdk:cnode1 -t asyncevent

  • executes -t asyncevent test
  • to a target at -a 10.100.0.22, -p 4420 with controller -nqn nqn.2016-06.io.spdk:cnode1

Example API usage

Sample usage of the jNVMf API to perform a read operation:

Nvme nvme = new Nvme();
/* target ip and port we want to connect to */
InetSocketAddress socketAddress = new InetSocketAddress("10.100.0.1", 4420);
/* controller NVMe qualified name */
NvmfTransportId tid = new NvmfTransportId(socketAddress,
                new NvmeQualifiedName("nqn.2016-06.io.spdk:cnode1"));
/* connect to controller */
Controller controller = nvme.connect(tid);
/* enable controller */
controller.getControllerConfiguration().setEnable(true);
controller.syncConfiguration();
controller.waitUntilReady();
/* create a io queue pair with submission queue size 64 */
IoQueuePair queuePair = controller.createIoQueuePair(64);
/* allocate and register buffer to be used for transfer */
ByteBuffer buffer = ByteBuffer.allocateDirect(4096);
KeyedNativeBuffer registeredBuffer = queuePair.registerMemory(buffer);
/* create a new read command */
NvmReadCommand command = new NvmReadCommand(queuePair);
/* create a response */
Response<NvmResponseCapsule> response = command.newResponse();
/* set buffer */
NvmIOCommandCapsule commandCapsule = command.getCommandCapsule();
commandCapsule.setSglDescriptor(buffer);
/* set length, LBA and namespace identifier */
NvmIoCommandSqe sqe = commandCapsule.getSubmissionQueueEntry();
sqe.setStartingLba(0);
/* read one block*/
sqe.setNumberOfLogicalBlocks(1);
sqe.setNamespaceIdentifier(new NamespaceIdentifier(1));
volatile boolean done = false;
/* set callback */
command.setCallback(new OperationCallback() {
      @Override
      public void onStart() {
      }

      @Override
      public void onComplete() {
          System.out.println("command completed");
          /* check response */
          NvmCompletionQueueEntry cqe = response.getResponseCapsule().getCompletionQueueEntry();
          StatusCode.Value statusCode = cqe.getStatusCode();
          if (!statusCode.equals(GenericStatusCode.getInstance().SUCCESS)) {
              System.out.println("Command not successful");
          }
          done = true;
      }

      @Override
      public void onFailure(RdmaException e) {
          System.out.println("There was an RDMA error when executing the command");
          done = true;
      }
});
command.execute(response);
/* wait until command is done */
while (!done);

Contributions

PRs are always welcome. Please fork, and make necessary modifications, and let us know.

Contact

If you have questions or suggestions, feel free to post at:

https://groups.google.com/forum/#!forum/zrlio-users

or email: [email protected]

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].