Data Erasure codes - Resilience

Erasure codes enables the capability to recover data with less space that with replication. The implementation uses Jerasure library (same as CEPH) and uses the NUM_REPL environment variable to choose how many servers are used to store ECs.

Activation of the code is done using CMAKE GKFS_ENABLE_EC.

ECs are only stored/generated with a complete chunk line (num_servers - num_repl).

Additionaly the user can enable the -DGKFS_ENABLE_READ_ERRORS to inject a
50% of read errors into the workflow.

Edited by Ramon Nou

Merge request reports

Loading
+68 −0
Changes for CMake/FindGF_complete.cmake: 68 added lines, 0 removed lines.
Original line number Diff line number Diff line
################################################################################
# Copyright 2018-2022, Barcelona Supercomputing Center (BSC), Spain            #
# Copyright 2015-2022, Johannes Gutenberg Universitaet Mainz, Germany          #
#                                                                              #
# This software was partially supported by the                                 #
# EC H2020 funded project NEXTGenIO (Project ID: 671951, www.nextgenio.eu).    #
#                                                                              #
# This software was partially supported by the                                 #
# ADA-FS project under the SPPEXA project funded by the DFG.                   #
#                                                                              #
# This file is part of GekkoFS.                                                #
#                                                                              #
# GekkoFS is free software: you can redistribute it and/or modify              #
# it under the terms of the GNU General Public License as published by         #
# the Free Software Foundation, either version 3 of the License, or            #
# (at your option) any later version.                                          #
#                                                                              #
# GekkoFS is distributed in the hope that it will be useful,                   #
# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
# GNU General Public License for more details.                                 #
#                                                                              #
# You should have received a copy of the GNU General Public License            #
# along with GekkoFS.  If not, see <https://www.gnu.org/licenses/>.            #
#                                                                              #
# SPDX-License-Identifier: GPL-3.0-or-later                                    #
################################################################################

#
# - Try to find GF_complete library
# This will define
# GF_complete_FOUND
# GF_complete_INCLUDE_DIR
# GF_complete_LIBRARIES
#

find_path(GF_complete_INCLUDE_DIR
    NAMES gf_complete.h
    )

find_library(GF_complete_LIBRARY
    NAMES gf_complete
    )

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args( GF_complete 
    DEFAULT_MSG 
    GF_complete_INCLUDE_DIR
    GF_complete_LIBRARY
)

if(GF_complete_FOUND)
    set(GF_complete_INCLUDE_DIRS ${GF_complete_INCLUDE_DIR})
    set(GF_complete_LIBRARIES ${GF_complete_LIBRARY})

    if(NOT TARGET GF_complete::GF_complete)
        add_library(GF_complete::GF_complete UNKNOWN IMPORTED)
        set_target_properties(GF_complete::GF_complete PROPERTIES
            IMPORTED_LOCATION "${GF_complete_LIBRARY}"
            INTERFACE_INCLUDE_DIRECTORIES "${GF_complete_INCLUDE_DIR}"
        )
    endif()
endif()

mark_as_advanced(
    GF_complete_INCLUDE_DIR
    GF_complete_LIBRARY
)
+68 −0
Changes for CMake/FindJerasure.cmake: 68 added lines, 0 removed lines.
Original line number Diff line number Diff line
################################################################################
# Copyright 2018-2022, Barcelona Supercomputing Center (BSC), Spain            #
# Copyright 2015-2022, Johannes Gutenberg Universitaet Mainz, Germany          #
#                                                                              #
# This software was partially supported by the                                 #
# EC H2020 funded project NEXTGenIO (Project ID: 671951, www.nextgenio.eu).    #
#                                                                              #
# This software was partially supported by the                                 #
# ADA-FS project under the SPPEXA project funded by the DFG.                   #
#                                                                              #
# This file is part of GekkoFS.                                                #
#                                                                              #
# GekkoFS is free software: you can redistribute it and/or modify              #
# it under the terms of the GNU General Public License as published by         #
# the Free Software Foundation, either version 3 of the License, or            #
# (at your option) any later version.                                          #
#                                                                              #
# GekkoFS is distributed in the hope that it will be useful,                   #
# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
# GNU General Public License for more details.                                 #
#                                                                              #
# You should have received a copy of the GNU General Public License            #
# along with GekkoFS.  If not, see <https://www.gnu.org/licenses/>.            #
#                                                                              #
# SPDX-License-Identifier: GPL-3.0-or-later                                    #
################################################################################

#
# - Try to find Jerasure library
# This will define
# Jerasure_FOUND
# Jerasure_INCLUDE_DIR
# Jerasure_LIBRARIES
#

find_path(Jerasure_INCLUDE_DIR
    NAMES jerasure/jerasure.h
    )

find_library(Jerasure_LIBRARY
    NAMES Jerasure
    )

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Jerasure 
    DEFAULT_MSG 
    Jerasure_INCLUDE_DIR
    Jerasure_LIBRARY
)

if(Jerasure_FOUND)
    set(Jerasure_INCLUDE_DIRS ${Jerasure_INCLUDE_DIR})
    set(Jerasure_LIBRARIES ${Jerasure_LIBRARY})

    if(NOT TARGET Jerasure::Jerasure)
        add_library(Jerasure::Jerasure UNKNOWN IMPORTED)
        set_target_properties(Jerasure::Jerasure PROPERTIES
            IMPORTED_LOCATION "${Jerasure_LIBRARY}"
            INTERFACE_INCLUDE_DIRECTORIES "${Jerasure_INCLUDE_DIR}"
        )
    endif()
endif()

mark_as_advanced(
    Jerasure_INCLUDE_DIR
    Jerasure_LIBRARY
)
 No newline at end of file
+19 −1
Changes for CMake/gkfs-options.cmake: 19 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -364,12 +364,30 @@ gkfs_define_option(
)

################################################################################
# MSGPack client metrics
# Erasure codes
################################################################################

gkfs_define_option(
  GKFS_ENABLE_EC
  HELP_TEXT "Enable Erasure Code"
  DEFAULT_VALUE OFF
  DESCRIPTION "Use Jerasure for erasure codes reliability"
)

gkfs_define_option(
  GKFS_ENABLE_READ_ERRORS
  HELP_TEXT "Enable Read Errors using replication"
  DEFAULT_VALUE OFF
  DESCRIPTION "Inject read errors"
)

################################################################################
# MSGPack client metrics
################################################################################
gkfs_define_option(
    GKFS_ENABLE_CLIENT_METRICS
    HELP_TEXT "Enable client metrics via MSGPack"
    DEFAULT_VALUE OFF
    DESCRIPTION "If GKFS_ENABLE_CLIENT_METRICS is ON, use MSGPack to dump client read/write metrics"
)
+40 −0
Changes for docker/0.9.3-exp/core/Dockerfile: 40 added lines, 0 removed lines.
Original line number Diff line number Diff line
FROM debian:bullseye-slim

LABEL Description="Debian-based environment suitable to build GekkoFS and its dependencies"

RUN apt-get update && \
    apt-get install -y --no-install-recommends \
		git \
		curl \
		ca-certificates \
		libtool \
		pkg-config \
		make \
		automake \
		gcc \
		g++ \
		ninja-build \
		procps \
		# AGIOS dependencies
		libconfig-dev \
		# Mercury dependencies
		libltdl-dev \
		lbzip2 \
        # Margo dependencies \
        libjson-c-dev \
		# RocksDB dependencies
		liblz4-dev \
		# syscall_intercept dependencies
		libcapstone-dev \
		# GekkoFS dependencies
		libboost-program-options-dev \
		uuid-dev && \
    # install cmake 3.14+ since it's needed for some dependencies
    curl -OL https://github.com/Kitware/CMake/releases/download/v3.25.2/cmake-3.25.2-Linux-x86_64.sh && \
    chmod u+x ./cmake-3.25.2-Linux-x86_64.sh && \
    ./cmake-3.25.2-Linux-x86_64.sh --skip-license --prefix=/usr && \
    # Clean apt cache to reduce image layer size
    rm -rf /var/lib/apt/lists/* && \
    # Clean apt caches of packages
    apt-get clean && apt-get autoclean && \
    rm ./cmake-3.25.2-Linux-x86_64.sh
+10 −0
Changes for docker/0.9.3-exp/core/Makefile: 10 added lines, 0 removed lines.
Original line number Diff line number Diff line
.PHONY: all

amd64:
	docker build --platform amd64 -t gekkofs/core:0.9.3-exp .

aarch64:
	docker build --platform aarch64 -t gekkofs/core:0.9.3-exp .

all:
	docker build -t gekkofs/core:0.9.3-exp .
Loading
Loading