Giter Site home page Giter Site logo

benchmark-alluxiofuse's Introduction

AlluxioFUSE多线程读取测试文档

  1. 创建并推送镜像

MPI的部分被注释掉了,如果需要MPI,取消注释即可

docker build -t bench-fuse:v0 -f Dockerfile .
docker tag bench-fuse:v0 iluoeli/bench-fuse:v0
docker push iluoeli/bench-fuse:v0

NOTE:最好推送到阿里云的镜像仓库,速度快一些

  1. 生成测试数据
docker run -itd -v /tmp/data:/data --env WORKERS=1 --env WORKERS_PER_NODE=1 --env THREADS=1 --env COCO=1 bench-fuse:v0 /app/generate_file.sh

其中,

  • WORKERS表示节点数量(没有意义,可不管)
  • WORKERS_PER_NODE表示每个节点上的进程数量
  • THREADS表示每个进程的线程数量(因为python是假的多线程机制,所以建议此参数不要超过8,结合WORKERS_PER_NODE来增加并发度)

运行如下命令可以简单测试一下读取性能:

docker run -itd -v /tmp/data:/data --env WORKERS=1 --env WORKERS_PER_NODE=2 --env THREADS=1 bench-fuse:v0 /app/read_file.sh
  1. 安装fluid

参考fluid文档

  1. 挂载Dataset

给生成测试数据的节点打标签

kubectl label nodes cn-beijing.172.16.0.147 coco=coco

创建Dataset和Runtime

cat <<EOF > dataset.yaml
apiVersion: data.fluid.io/v1alpha1
kind: Dataset
metadata:
  name: coco
spec:
  mounts:
  - mountPoint: local:///tmp/data
    name: coco
  nodeAffinity:
    required:
      nodeSelectorTerms:
        - matchExpressions:
            - key: coco
              operator: In
              values:
                - coco
---
apiVersion: data.fluid.io/v1alpha1
kind: AlluxioRuntime
metadata:
  name: coco
spec:
  replicas: 1
  data:
    replicas: 1
  tieredstore:
    levels:
      - mediumtype: MEM
        path: /alluxio/ram 
        quota: 50Gi
        high: "0.99"
        low: "0.8"
EOF

kubectl create -f dataset.yaml
  1. 运行分布式多线程读取测试
cat <<EOF > benchmark-job.yaml
apiVersion: batch/v1
kind: Job
metadata:
  name: alluxiofuse-benchmark-job
  labels:
    jobgroup: alluxiofuse-benchmark
spec:
  completions: 1
  parallelism: 1
  template:
    metadata:
      name: alluxiofuse-benchmark-job
      labels:
        jobgroup: alluxiofuse-benchmark
    spec:
      containers:
      - name: alluxiofuse-benchmark-job
        image: iluoeli/bench-fuse:v0
        command: ["/app/read_file.sh"]
        volumeMounts:
          - mountPath: /data
            name: coco
        env:
          - name: WORKERS_PER_NODE
            value: "1"
          - name: THREADS
            value: "1"
          - name: DATA_PATH
            value: "/data/coco"
      volumes:
        - name: coco
          persistentVolumeClaim:
            claimName: coco
      restartPolicy: OnFailure
EOF
      
kubectl create -f benchmark-job.yaml

NOTE:

  • 记得保证容器镜像image和你的一样
  • 调整completionsparallelism进行分布式多节点测试
  1. 查看测试结果
kubectl logs alluxiofuse-benchmark-job-xxxxx

benchmark-alluxiofuse's People

Contributors

iluoeli avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.