Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
a93f01f
Run centos and debian workflows on push and PR
igchor Nov 2, 2021
2a8fa60
Adds createPutToken and switches findEviction
byrnedj Feb 4, 2023
c3a4db9
Add memory usage statistics for allocation classes
igchor Jul 6, 2022
2529f0a
Initial multi-tier support implementation (rebased with NUMA and cs p…
igchor Sep 28, 2021
3cc41bd
AC stats multi-tier
byrnedj Jan 17, 2023
bf4c244
This commit contains the additional memory tiers tests
byrnedj Feb 8, 2023
c432df6
This is the additional multi-tier support needed
guptask Nov 14, 2022
4cefc44
added per pool class rolling average latency (upstream PR version)
guptask Jul 21, 2022
1f62a63
added per tier pool class rolling average latency (based on upstream PR)
guptask Jul 21, 2022
489ef20
MM2Q promotion iterators (#1)
byrnedj Aug 9, 2022
048c809
CS Patch Part 2 for mulit-tier cachelib:
byrnedj Feb 7, 2023
ed7b70f
basic multi-tier test based on numa bindings
igchor Dec 30, 2021
94c4974
Aadding new configs to hit_ratio/graph_cache_leader_fobj
vinser52 Jan 27, 2022
afd1456
Do not block reader if a child item is moving
igchor Dec 19, 2022
4f8f425
Background data movement (#20)
byrnedj Oct 21, 2022
6203a95
fix race in moveRegularItemWith sync where insertOrReplace can cause …
byrnedj Feb 16, 2023
6abb498
Fix race in acquire (#68)
igchor Mar 16, 2023
add2e5f
Per tier pool stats (#70)
byrnedj Mar 23, 2023
aedaf97
dummy change to trigger container image rebuild
guptask Mar 28, 2023
1f21fce
Fix token creation and stats (#79)
igchor Apr 27, 2023
9e27d35
Updated the docker gcc version to 12 (#83)
guptask May 9, 2023
da7a6bb
NUMA bindigs support for private memory (#82)
vinser52 May 17, 2023
b5ac462
Do not run cachelib-centos-8-5 on PRs (#85)
igchor Jun 6, 2023
50d3ae5
correct handling for expired items in eviction (#86)
byrnedj Jun 6, 2023
5632d18
Add option to insert items to first free tier (#87)
igchor Jun 8, 2023
09d7bab
Chained item movement between tiers - sync on the parent item (#84)
byrnedj Jun 28, 2023
08d8f33
edit dockerfile
byrnedj Jul 24, 2023
316133c
these submodules work
byrnedj Jul 25, 2023
8d2c390
Track latency of per item eviction/promotion between memory tiers
guptask Jul 28, 2023
b99f2b3
Merge pull request #91 from guptask/tier_eviction_latency
guptask Jul 31, 2023
a14f058
modified the cachebench output to make it friendly for parsing
guptask Aug 7, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Run centos and debian workflows on push and PR
Run tests on CI

Run long tests (navy/bench) every day on CI

Run CI on prebuild docker image

Run only centos build on CI

Update docker file used in CI

Centos8 is EOL

Disable failing clang-format-check

Add extra param to build-package.sh

Add scripts for rebuilding/pushing docker images

Taken from: pmem/dev-utils-kit@30794c3

Extend CI to rebuild docker automatically

Update build-cachelib-docker.yml

Do not use shallow clone to make sure Docker rebuild logic works correctly.

Added required packages to install Intel ittapi

Update CI to use intel/CacheLib repo (#17)

Add multi-tier navy benchmark and run it on CI
- fix navy multi-tier config for NUMA bindings

added code coverage support in CacheLib

Adding libdml to CentOS docker image (#53)

only exclude allocator-test-NavySetupTestm, shm-test-test_page_size tests

added perf and numactl to docker packages

---------------------------------------------
one large commit for all CI and code coverage
see above for the change history.
  • Loading branch information
igchor authored and byrnedj committed Jul 23, 2023
commit a93f01fc0815a000b033718c04a87613d0266d89
39 changes: 39 additions & 0 deletions .github/workflows/build-cachelib-centos-long.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: build-cachelib-centos-latest
on:
schedule:
- cron: '0 7 * * *'

jobs:
build-cachelib-centos8-latest:
name: "CentOS/latest - Build CacheLib with all dependencies"
runs-on: ubuntu-latest
# Docker container image name
container: "centos:latest"
steps:
- name: "update packages"
run: dnf upgrade -y
- name: "install sudo,git"
run: dnf install -y sudo git cmake gcc
- name: "System Information"
run: |
echo === uname ===
uname -a
echo === /etc/os-release ===
cat /etc/os-release
echo === df -hl ===
df -hl
echo === free -h ===
free -h
echo === top ===
top -b -n1 -1 -Eg || timeout 1 top -b -n1
echo === env ===
env
echo === gcc -v ===
gcc -v
- name: "checkout sources"
uses: actions/checkout@v2
- name: "build CacheLib using build script"
run: ./contrib/build.sh -j -v -T
- name: "run tests"
timeout-minutes: 60
run: cd opt/cachelib/tests && ../../../run_tests.sh long
43 changes: 43 additions & 0 deletions .github/workflows/build-cachelib-debian.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: build-cachelib-debian-10
on:
schedule:
- cron: '30 5 * * 0,3'

jobs:
build-cachelib-debian-10:
name: "Debian/Buster - Build CacheLib with all dependencies"
runs-on: ubuntu-latest
# Docker container image name
container: "debian:buster-slim"
steps:
- name: "update packages"
run: apt-get update
- name: "upgrade packages"
run: apt-get -y upgrade
- name: "install sudo,git"
run: apt-get install -y sudo git procps
- name: "System Information"
run: |
echo === uname ===
uname -a
echo === /etc/os-release ===
cat /etc/os-release
echo === df -hl ===
df -hl
echo === free -h ===
free -h
echo === top ===
top -b -n1 -1 -Eg || timeout 1 top -b -n1 ; true
echo === env ===
env
echo === cc -v ===
cc -v || true
echo === g++ -v ===
g++ - || true
- name: "checkout sources"
uses: actions/checkout@v2
- name: "build CacheLib using build script"
run: ./contrib/build.sh -j -v -T
- name: "run tests"
timeout-minutes: 60
run: cd opt/cachelib/tests && ../../../run_tests.sh
49 changes: 49 additions & 0 deletions .github/workflows/build-cachelib-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: build-cachelib-docker
on:
push:
pull_request:

jobs:
build-cachelib-docker:
name: "CentOS/latest - Build CacheLib with all dependencies"
runs-on: ubuntu-latest
env:
REPO: cachelib
GITHUB_REPO: intel/CacheLib
CONTAINER_REG: ghcr.io/pmem/cachelib
CONTAINER_REG_USER: ${{ secrets.GH_CR_USER }}
CONTAINER_REG_PASS: ${{ secrets.GH_CR_PAT }}
FORCE_IMAGE_ACTION: ${{ secrets.FORCE_IMAGE_ACTION }}
HOST_WORKDIR: ${{ github.workspace }}
WORKDIR: docker
IMG_VER: devel
strategy:
matrix:
CONFIG: ["OS=centos OS_VER=8streams PUSH_IMAGE=1"]
steps:
- name: "System Information"
run: |
echo === uname ===
uname -a
echo === /etc/os-release ===
cat /etc/os-release
echo === df -hl ===
df -hl
echo === free -h ===
free -h
echo === top ===
top -b -n1 -1 -Eg || timeout 1 top -b -n1
echo === env ===
env
echo === gcc -v ===
gcc -v
- name: "checkout sources"
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Pull the image or rebuild and push it
run: cd $WORKDIR && ${{ matrix.CONFIG }} ./pull-or-rebuild-image.sh $FORCE_IMAGE_ACTION

- name: Run the build
run: cd $WORKDIR && ${{ matrix.CONFIG }} ./build.sh
2 changes: 1 addition & 1 deletion .github/workflows/clang-format-check.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# From: https://github.com/marketplace/actions/clang-format-check#multiple-paths
name: clang-format Check
on: [pull_request]
on: []
jobs:
formatting-check:
name: Formatting Check
Expand Down
5 changes: 5 additions & 0 deletions cachelib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ set(CMAKE_MODULE_PATH
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)

if(COVERAGE_ENABLED)
# Add code coverage
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage -fprofile-arcs -ftest-coverage")
endif()

# include(fb_cxx_flags)
message(STATUS "Update CXXFLAGS: ${CMAKE_CXX_FLAGS}")

Expand Down
54 changes: 54 additions & 0 deletions cachelib/cachebench/test_configs/consistency/navy-multi-tier.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"cache_config" : {
"cacheSizeMB" : 300,
"poolRebalanceIntervalSec" : 1,
"moveOnSlabRelease" : true,

"cacheDir": "/tmp/mem-tier2",
"memoryTiers" : [
{
"ratio": 1,
"memBindNodes": 0
},
{
"ratio": 1,
"memBindNodes": 0
}
],

"numPools" : 2,
"poolSizes" : [0.5, 0.5],
"allocFactor" : 2.0,
"nvmCacheSizeMB" : 1024
},
"test_config" :
{

"checkConsistency" : true,

"numOps" : 60000,
"numThreads" : 20,
"numKeys" : 200000,


"keySizeRange" : [1, 8, 64],
"keySizeRangeProbability" : [0.5, 0.5],

"valSizeRange" : [256, 1024, 4096, 8192],
"valSizeRangeProbability" : [0.2, 0.7, 0.1],

"chainedItemLengthRange" : [1, 2, 4, 32],
"chainedItemLengthRangeProbability" : [0.8, 0.18, 0.02],

"chainedItemValSizeRange" : [1, 128, 256, 1024, 4096, 20480],
"chainedItemValSizeRangeProbability" : [0.1, 0.1, 0.2, 0.3, 0.3],

"getRatio" : 0.8,
"setRatio" : 0.1,
"delRatio" : 0.0,
"addChainedRatio" : 0.05,
"keyPoolDistribution": [0.5, 0.5],
"opPoolDistribution" : [0.5, 0.5]
}

}
4 changes: 2 additions & 2 deletions cachelib/cachebench/test_configs/consistency/navy.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

"checkConsistency" : true,

"numOps" : 30000000,
"numThreads" : 40,
"numOps" : 600000,
"numThreads" : 20,
"numKeys" : 200000,


Expand Down
8 changes: 4 additions & 4 deletions contrib/build-package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,8 @@ build_tests=
show_help=
many_jobs=
verbose=
PREFIX="$PWD/opt/cachelib/"

while getopts :BSdhijtvp: param
install_path=
while getopts :BSdhijtvI: param
do
case $param in
i) install=yes ;;
Expand All @@ -91,7 +90,7 @@ do
v) verbose=yes ;;
j) many_jobs=yes ;;
t) build_tests=yes ;;
p) PREFIX=$OPTARG ;;
I) install_path=${OPTARG} ; install=yes ;;
?) die "unknown option. See -h for help."
esac
done
Expand Down Expand Up @@ -281,6 +280,7 @@ test -d cachelib || die "expected 'cachelib' directory not found in $PWD"


# After ensuring we are in the correct directory, set the installation prefix"
PREFIX=${install_path:-"$PWD/opt/cachelib/"}
CMAKE_PARAMS="$CMAKE_PARAMS -DCMAKE_INSTALL_PREFIX=$PREFIX"
CMAKE_PREFIX_PATH="$PREFIX/lib/cmake:$PREFIX/lib64/cmake:$PREFIX/lib:$PREFIX/lib64:$PREFIX:${CMAKE_PREFIX_PATH:-}"
export CMAKE_PREFIX_PATH
Expand Down
97 changes: 97 additions & 0 deletions docker/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2022, Intel Corporation

#
# build.sh - runs a Docker container from a Docker image with environment
# prepared for running CacheLib builds and tests. It uses Docker image
# tagged as described in ./images/build-image.sh.
#
# Notes:
# - set env var 'HOST_WORKDIR' to where the root of this project is on the host machine,
# - set env var 'OS' and 'OS_VER' properly to a system/Docker you want to build this
# repo on (for proper values take a look at the list of Dockerfiles at the
# utils/docker/images directory in this repo), e.g. OS=ubuntu, OS_VER=20.04,
# - set env var 'CONTAINER_REG' to container registry address
# [and possibly user/org name, and package name], e.g. "<CR_addr>/pmem/CacheLib",
# - set env var 'DNS_SERVER' if you use one,
# - set env var 'COMMAND' to execute specific command within Docker container or
# env var 'TYPE' to pick command based on one of the predefined types of build (see below).
#

set -e

source $(dirname ${0})/set-ci-vars.sh
IMG_VER=${IMG_VER:-devel}
TAG="${OS}-${OS_VER}-${IMG_VER}"
IMAGE_NAME=${CONTAINER_REG}:${TAG}
CONTAINER_NAME=CacheLib-${OS}-${OS_VER}
WORKDIR=/CacheLib # working dir within Docker container
SCRIPTSDIR=${WORKDIR}/docker

if [[ -z "${OS}" || -z "${OS_VER}" ]]; then
echo "ERROR: The variables OS and OS_VER have to be set " \
"(e.g. OS=fedora, OS_VER=32)."
exit 1
fi

if [[ -z "${HOST_WORKDIR}" ]]; then
echo "ERROR: The variable HOST_WORKDIR has to contain a path to " \
"the root of this project on the host machine."
exit 1
fi

if [[ -z "${CONTAINER_REG}" ]]; then
echo "ERROR: CONTAINER_REG environment variable is not set " \
"(e.g. \"<registry_addr>/<org_name>/<package_name>\")."
exit 1
fi

# Set command to execute in the Docker container
COMMAND="./run-build.sh";
echo "COMMAND to execute within Docker container: ${COMMAND}"

if [ -n "${DNS_SERVER}" ]; then DOCKER_OPTS="${DOCKER_OPTS} --dns=${DNS_SERVER}"; fi

# Check if we are running on a CI (Travis or GitHub Actions)
[ -n "${GITHUB_ACTIONS}" -o -n "${TRAVIS}" ] && CI_RUN="YES" || CI_RUN="NO"

# Do not allocate a pseudo-TTY if we are running on GitHub Actions
[ ! "${GITHUB_ACTIONS}" ] && DOCKER_OPTS="${DOCKER_OPTS} --tty=true"


echo "Running build using Docker image: ${IMAGE_NAME}"

# Run a container with
# - environment variables set (--env)
# - host directory containing source mounted (-v)
# - working directory set (-w)
docker run --privileged=true --name=${CONTAINER_NAME} -i \
${DOCKER_OPTS} \
--env http_proxy=${http_proxy} \
--env https_proxy=${https_proxy} \
--env TERM=xterm-256color \
--env WORKDIR=${WORKDIR} \
--env SCRIPTSDIR=${SCRIPTSDIR} \
--env GITHUB_REPO=${GITHUB_REPO} \
--env CI_RUN=${CI_RUN} \
--env TRAVIS=${TRAVIS} \
--env GITHUB_ACTIONS=${GITHUB_ACTIONS} \
--env CI_COMMIT=${CI_COMMIT} \
--env CI_COMMIT_RANGE=${CI_COMMIT_RANGE} \
--env CI_BRANCH=${CI_BRANCH} \
--env CI_EVENT_TYPE=${CI_EVENT_TYPE} \
--env CI_REPO_SLUG=${CI_REPO_SLUG} \
--env DOC_UPDATE_GITHUB_TOKEN=${DOC_UPDATE_GITHUB_TOKEN} \
--env DOC_UPDATE_BOT_NAME=${DOC_UPDATE_BOT_NAME} \
--env DOC_REPO_OWNER=${DOC_REPO_OWNER} \
--env COVERITY_SCAN_TOKEN=${COVERITY_SCAN_TOKEN} \
--env COVERITY_SCAN_NOTIFICATION_EMAIL=${COVERITY_SCAN_NOTIFICATION_EMAIL} \
--env TEST_TIMEOUT=${TEST_TIMEOUT} \
--env TZ='Europe/Warsaw' \
--shm-size=4G \
-v ${HOST_WORKDIR}:${WORKDIR} \
-v /etc/localtime:/etc/localtime \
-w ${SCRIPTSDIR} \
${IMAGE_NAME} ${COMMAND}

38 changes: 38 additions & 0 deletions docker/images/build-image.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2016-2021, Intel Corporation
#
# build-image.sh - prepares a Docker image with <OS>-based environment for
# testing (or dev) purpose, tagged with ${CONTAINER_REG}:${OS}-${OS_VER}-${IMG_VER},
# according to the ${OS}-${OS_VER}.Dockerfile file located in the same directory.
# IMG_VER is a version of Docker image (it usually relates to project's release tag)
# and it defaults to "devel".
#

set -e
IMG_VER=${IMG_VER:-devel}
TAG="${OS}-${OS_VER}-${IMG_VER}"

if [[ -z "${OS}" || -z "${OS_VER}" ]]; then
echo "ERROR: The variables OS and OS_VER have to be set " \
"(e.g. OS=fedora, OS_VER=34)."
exit 1
fi

if [[ -z "${CONTAINER_REG}" ]]; then
echo "ERROR: CONTAINER_REG environment variable is not set " \
"(e.g. \"<registry_addr>/<org_name>/<package_name>\")."
exit 1
fi

echo "Check if the file ${OS}-${OS_VER}.Dockerfile exists"
if [[ ! -f "${OS}-${OS_VER}.Dockerfile" ]]; then
echo "Error: ${OS}-${OS_VER}.Dockerfile does not exist."
exit 1
fi

echo "Build a Docker image tagged with: ${CONTAINER_REG}:${TAG}"
docker build -t ${CONTAINER_REG}:${TAG} \
--build-arg http_proxy=$http_proxy \
--build-arg https_proxy=$https_proxy \
-f ${OS}-${OS_VER}.Dockerfile .
Loading