bitar

Simplify accessing hardware compression/decompression accelerators

https://github.com/ljishen/bitar

Science Score: 54.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.7%) to scientific vocabulary

Keywords

apache-arrow compression cpp dpdk hardware-acceleration
Last synced: 4 months ago · JSON representation ·

Repository

Simplify accessing hardware compression/decompression accelerators

Basic Info
  • Host: GitHub
  • Owner: ljishen
  • License: mit
  • Language: C++
  • Default Branch: main
  • Homepage:
  • Size: 541 KB
Statistics
  • Stars: 9
  • Watchers: 3
  • Forks: 2
  • Open Issues: 0
  • Releases: 5
Topics
apache-arrow compression cpp dpdk hardware-acceleration
Created over 3 years ago · Last pushed almost 3 years ago
Metadata Files
Readme License Citation

README.md

bitar

Codacy Badge GitHub Super-Linter License: MIT DOI

Bitar is a C++ library to simplify accessing hardware compression/decompression accelerators.

Features

  • Zero-copy of data input and output
  • Synchronous and asynchronous operations
  • Multi-core and multi-device support
  • No sudo permission requirement

Bitar can run either on the host machine or on the NVIDIA BlueField DPU target in either DPU mode or separated host mode.

Prerequisites

  • Linux (with kernel >= 4.4) or FreeBSD
  • For Linux, glibc >= 2.7 (reported by ldd --version)
  • GCC >= 9 (C++17 compliant compiler)
  • DPDK >= v21.11 (can be installed via vcpkg)
  • Apache Arrow >= 11.0.0 (build automatically if not found)

Supported Hardware

Integration

Bitar can be easily installed and integrated via vcpkg

bash vcpkg install bitar

Development

  • The DPDK library will be built from source by vcpkg if dpdk_ROOT is not specified.

  • The Arrow parquet library is required if BITAR_BUILD_APPS is ON. Otherwise, just having the Arrow library is sufficient.

  • Loading the Arrow parquet library will create a CMake target for the arrow and the parquet library, respectively.

  • Use Arrow_ROOT to specify the installation prefix of the Arrow library if it is not installed at the default location. By default, the system-installed Arrow library will be at /usr.

  • If the Arrow library is not found, or it is found but the parquet library is not found when needed, the Arrow library will be built from source.

```bash $ # Reserve hugepages $ sudo sh -c 'echo 1024 > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nrhugepages' $ # On NUMA machines, we may need $ # sudo sh -c 'echo 1024 > /sys/devices/system/node/node1/hugepages/hugepages-2048kB/nrhugepages'

$ # Install prerequisites for development $ scripts/install-deps.sh

$ CC=clang CXX=clang++ cmake -S . -B ./build-$(uname -m) -G Ninja \ [-DdpdkROOT:PATH=] \ [-DArrowROOT:PATH=] \ -DBITARBUILDAPPS:BOOL=ON -DBITARBUILDTESTS:BOOL=ON \ -DENABLEDEVELOPERMODE:BOOL=ON -DCMAKEBUILDTYPE:BOOL=Debug

$ cmake --build ./build-$(uname -m) $ cmake --install ./build-$(uname -m) --prefix

$ ./build-$(uname -m)/apps/demo_app --in-memory --lcores 5@(0-7),6-7 \ -a ,class=compress -- --file \ [--bytes ] [--mode ] [--help] ```

Advanced CMake Configuration Options

  • BITAR_FETCHCONTENT_OVERWRITE_CONFIGURATION: set this option to OFF to have separate debug and release builds without overwriting each others configurations (default: ON)

  • VCPKG_ROOT: the prefix to an installed vcpkg instance (install automatically if not specified)

  • BITAR_BUILD_ARROW: set this option to ON to force building the Arrow dependency from source (default: OFF)

  • BITAR_ARROW_GIT_REPOSITORY: the git repository to fetch the Arrow source (default: the official repository)

  • BITAR_ARROW_GIT_TAG: use the source at the git branch, tag or commit hash from the Arrow repository for building when needed (default apache-arrow-11.0.0)

  • BITAR_INSTALL_ARROW: install the Arrow library as part of the cmake installation process if Arrow is built by this project (default: OFF)

  • Any Arrow supported CMake options, e.g., ARROW_WITH_LZ4, ARROW_WITH_ZSTD, and ARROW_WITH_SNAPPY.

Known Issues

  • (July 23, 2022) DPDK mistakenly assumes the support of aes, pmull, sha1, and sha2 CPU flags on crypto-disabled BlueField-2 DPUs (e.g., MBF2H516A-CENO_Ax, the one on the CloudLab r7525 machine) with LLVM Clang, resulting in the following error when executing a program compiled with bitar (relevant code):

bash ERROR: This system does not support "AES". Please check that RTE_MACHINE is set correctly.

There is no such problem when DPDK is compiled with GCC. Note that bitar can still be compiled with Clang and linked with DPDK that is compiled with GCC.

  • bash [Out of memory: Reserving memzone of XXXXXX bytes failed. [Error 12: Cannot allocate memory]]

(Aug 18, 2022) If you see this error, check whether DPDK is running in the Virtual Addresses mode (VA). Normally, you should see EAL: Selected IOVA mode 'VA' during the program initialization. But if you see EAL: Selected IOVA mode 'PA', it's probably that the IOMMU is disable either in the BIOS or in the kernel. If IOMMU is enabled, /sys/kernel/iommu_groups path will contain kernel IOMMU groups and thus is not be empty. To enable IOMMU in the kernel, you can add intel_iommu=on iommu=pt in GRUB command-line on x86_64 systems, or add iommu.passthrough=1 on aarch64 systems.

Owner

  • Name: Jianshen Liu
  • Login: ljishen
  • Kind: user
  • Location: Toronto
  • Company: @Huawei

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Liu"
  given-names: "Jianshen"
  orcid: "https://orcid.org/0000-0002-1173-3002"
title: "Simplify accessing hardware compression/decompression accelerators"
version: 0.0.3
doi: 10.5281/zenodo.6825119
date-released: 2022-07-30
url: "https://github.com/ljishen/bitar"

GitHub Events

Total
Last Year

Issues and Pull Requests

Last synced: over 1 year ago

All Time
  • Total issues: 0
  • Total pull requests: 2
  • Average time to close issues: N/A
  • Average time to close pull requests: 1 minute
  • Total issue authors: 0
  • Total pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
  • codacy-badger (2)
Top Labels
Issue Labels
Pull Request Labels

Dependencies

.github/workflows/super-linter.yml actions
  • actions/checkout v3 composite
  • github/super-linter/slim v4 composite
vcpkg.json vcpkg
  • abseil >=20220623.1
  • curl >=7.87.0#1
  • cxxopts >=3.0.0
  • fmt >=9.1.0#1
  • magic-enum >=0.8.2
  • openssl *