Skip to content

Latest commit

 

History

History
601 lines (535 loc) · 27.2 KB

simple-perf-comprasion.md

File metadata and controls

601 lines (535 loc) · 27.2 KB

Performance

This document includes the performance of the pull/push for the Harbor deployed by the Harbor operator.

Environment

The Harbor and Harbor operator are deployed in a Kubernetes cluster which has 3 control nodes and 3 worker nodes. Each node has 8 CPU which mode name is Intel(R) Xeon(R) Gold 5218 CPU @ 2.30GHz and 16GiB memory.

Here are the network benchmark for CNI using knb and disk benchmark for PV using dbench.

Benchmark of network

=========================================================
 Benchmark Results
=========================================================
 Name            : knb-1763415
 Date            : 2021-04-29 01:59:31 UTC
 Generator       : knb
 Version         : 1.5.0
 Server          : harbor-wl-1-md-0-977fbcc-hlmm8
 Client          : harbor-wl-1-md-0-977fbcc-f9jhn
 UDP Socket size : auto
=========================================================
  Discovered CPU         : Intel(R) Xeon(R) Gold 5218 CPU @ 2.30GHz
  Discovered Kernel      : 5.4.0-66-generic
  Discovered k8s version : v1.18.16+vmware.1
  Discovered MTU         : 1450
  Idle :
    bandwidth = 0 Mbit/s
    client cpu =
    server cpu =
    client ram =  MB
    server ram =  MB
  Pod to pod :
    TCP :
      bandwidth = 7085 Mbit/s
      client cpu =
      server cpu =
      client ram =  MB
      server ram =  MB
    UDP :
      bandwidth = 1388 Mbit/s
      client cpu =
      server cpu =
      client ram =  MB
      server ram =  MB
  Pod to Service :
    TCP :
      bandwidth = 6909 Mbit/s
      client cpu =
      server cpu =
      client ram =  MB
      server ram =  MB
    UDP :
      bandwidth = 1467 Mbit/s
      client cpu =
      server cpu =
      client ram =  MB
      server ram =  MB
=========================================================
2021-04-29 02:01:13 [INFO] Cleaning kubernetes resources ...

Benchmark of disk

==================
= Dbench Summary =
==================
Random Read/Write IOPS: 51.9k/10.1k. BW: 310MiB/s / 347MiB/s
Average Latency (usec) Read/Write: 355.22/1057.06
Sequential Read/Write: 403MiB/s / 369MiB/s
Mixed Random Read/Write IOPS: 20.0k/6950

Tests

k6 is the testing tool to test the performance of the pull/push. Here is the scripts for the pull/push tests.

Script for the pull test

// Pull artifact which size is 10 MiB

import harbor from 'k6/x/harbor'
import { ContentStore } from 'k6/x/harbor'
import { Rate } from 'k6/metrics'

const missing = Object()

function getEnv(env, def = missing) {
    const value = __ENV[env] ? __ENV[env] : def
    if (value === missing) {
        throw (`${env} envirument is required`)
    }

    return value
}

const teardownResources = getEnv('TEARDOWN_RESOURCES', 'true') === 'true'

const artifactSize = getEnv('ARTIFACT_SIZE', '10 MiB')

const store = new ContentStore('artifact-pull')

export let successRate = new Rate('success')

export let options = {
    noUsageReport: true,
    vus: 500,
    iterations: 1000,
    thresholds: {
        'iteration_duration{scenario:default}': [
            `max>=0`,
        ],
        'iteration_duration{group:::setup}': [`max>=0`],
        'iteration_duration{group:::teardown}': [`max>=0`]
    }
};

export function setup() {
    harbor.initialize({
        scheme: getEnv('HARBOR_SCHEME', 'https'),
        host: getEnv('HARBOR_HOST'),
        username: getEnv('HARBOR_USERNAME', 'admin'),
        password: getEnv('HARBOR_PASSWORD', 'Harbor12345'),
        insecure: true,
    })

    const projectName = `project-${Date.now()}`
    try {
        harbor.createProject({ projectName })
    } catch (e) {
        console.log(e)
        errorRate.add(true)
    }

    harbor.push({
        ref: `${projectName}/benchmark:latest`,
        store,
        blobs: [store.generate(artifactSize)],
    })

    return {
        projectName,
    }
}

export default function ({ projectName }) {
    try {
        harbor.pull(`${projectName}/benchmark:latest`)
        successRate.add(true)
    } catch (e) {
        successRate.add(false)
        console.log(e)
    }
}

export function teardown({ projectName }) {
    store.free()

    if (teardownResources) {
        try {
            harbor.deleteProject(projectName, true)
        } catch (e) {
            console.log(e)
        }
    }
}

Script for push test

// Push artifact which size is 10 MiB

import counter from "k6/x/counter"
import harbor from 'k6/x/harbor'
import { ContentStore } from 'k6/x/harbor'
import { Rate } from 'k6/metrics'

const missing = Object()

function getEnv(env, def = missing) {
    const value = __ENV[env] ? __ENV[env] : def
    if (value === missing) {
        throw (`${env} envirument is required`)
    }

    return value
}

function getEnvInt(env, def = missing) {
    return parseInt(getEnv(env, def), 10)
}

const teardownResources = getEnv('TEARDOWN_RESOURCES', 'true') === 'true'

const artifactSize = getEnv('ARTIFACT_SIZE', '10 MiB')

const store = new ContentStore('artifact-push')

export let successRate = new Rate('success')

export let options = {
    setupTimeout: '2h',
    teardownTimeout: '1h',
    duration: '24h',
    noUsageReport: true,
    vus: 500,
    iterations: 1000,
    thresholds: {
        'iteration_duration{scenario:default}': [
            `max>=0`,
        ],
        'iteration_duration{group:::setup}': [`max>=0`],
        'iteration_duration{group:::teardown}': [`max>=0`]
    }
};

export function setup() {
    harbor.initialize({
        scheme: getEnv('HARBOR_SCHEME', 'https'),
        host: getEnv('HARBOR_HOST'),
        username: getEnv('HARBOR_USERNAME', 'admin'),
        password: getEnv('HARBOR_PASSWORD', 'Harbor12345'),
        insecure: true,
    })

    const now = Date.now()
    const projectsCount = getEnvInt('PROJECTS_COUNT', `${options.vus}`)

    const projectNames = []
    for (let i = 0; i < projectsCount; i++) {
        const projectName = `project-${now}-${i}`
        try {
            harbor.createProject({ projectName })
            projectNames.push(projectName)
        } catch (e) {
            console.log(e)
        }
    }

    const contents = store.generateMany(artifactSize, options.iterations)

    return {
        projectNames,
        contents
    }
}

export default function ({ projectNames, contents }) {
    const i = counter.up() - 1

    const projectName = projectNames[i % projectNames.length]
    const blob = contents[i % contents.length]

    try {
        const repositoryName = getEnv('REPOSITORY_NAME', `repository-${Date.now()}-${i}`)

        harbor.push({
            ref: `${projectName}/${repositoryName}:tag-${i}`,
            store,
            blobs: [blob],
        })

        successRate.add(true)
    } catch (e) {
        console.log(e)
        successRate.add(false)
    }
}

export function teardown({ projectNames }) {
    store.free()

    if (teardownResources) {
        for (const projectName of projectNames) {
            try {
                harbor.deleteProject(projectName, true)
            } catch (e) {
                console.log(`failed to delete project ${projectName}, error: ${e}`)
            }
        }
    } else {
        for (const projectName of projectNames) {
            console.log(`project ${projectName} keeped`)
        }
    }
}

Manifests and results

Two different harbor clusters will be tested for the performance, one uses minio storage, another one uses filesystem storage.

Manifests

Manifest of minio as storage

# Sample namespace
apiVersion: v1
kind: Namespace
metadata:
  name: cluster-sample-ns
---
# A secret of harbor admin password.
apiVersion: v1
kind: Secret
metadata:
  name: admin-core-secret
  namespace: cluster-sample-ns
data:
  secret: SGFyYm9yMTIzNDU=
type: Opaque
---
# A secret for minIO access.
apiVersion: v1
kind: Secret
metadata:
  name: minio-access-secret
  namespace: cluster-sample-ns
data:
  accesskey: YWRtaW4=
  secretkey: bWluaW8xMjM=
type: Opaque
---
apiVersion: v1
kind: Secret
metadata:
  name: harbor-test-ca
  namespace: cluster-sample-ns
data:
  tls.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUZpekNDQTNPZ0F3SUJBZ0lVU2Fva1FldWczaGJHQVF3U1BqaklsMmV1akl3d0RRWUpLb1pJaHZjTkFRRUwKQlFBd1ZERUxNQWtHQTFVRUJoTUNRMDR4RERBS0JnTlZCQWdNQTFCRlN6RVJNQThHQTFVRUJ3d0lRbVZwSUVwcApibWN4RVRBUEJnTlZCQW9NQ0dkdmFHRnlZbTl5TVJFd0R3WURWUVFEREFoSVlYSmliM0pEUVRBZ0Z3MHlNREE0Ck1USXhNRFV5TkROYUdBOHlNVEl3TURjeE9URXdOVEkwTTFvd1ZERUxNQWtHQTFVRUJoTUNRMDR4RERBS0JnTlYKQkFnTUExQkZTekVSTUE4R0ExVUVCd3dJUW1WcElFcHBibWN4RVRBUEJnTlZCQW9NQ0dkdmFHRnlZbTl5TVJFdwpEd1lEVlFRRERBaElZWEppYjNKRFFUQ0NBaUl3RFFZSktvWklodmNOQVFFQkJRQURnZ0lQQURDQ0Fnb0NnZ0lCCkFPWlJaWWtGbVZCTmFiRVU0Y0RhcWEyN2s1K091VUhnMW9vU2NDbmJiQkZ4TkIyMi83Q3pYSVdPV21GQ1ZQalgKTHdBVjEzdTZwUWtNTWFqRHFQQS83bGR6OGFqWW05VlREZzgvcUdib2E2YW9OTzRHTExkeW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ned-issuer
  namespace: cluster-sample-ns
spec:
  ca:
    secretName: harbor-test-ca
---
# Certificates of ingress
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
  name: sample-public-certificate
  namespace: cluster-sample-ns
spec:
  secretName: sample-public-certificate
  dnsNames:
    - core.harbor.domain
    - notary.harbor.domain
    - minio.harbor.domain
  issuerRef:
    name: selfsigned-issuer
    kind: Issuer
---
# Full stack Harbor
apiVersion: goharbor.io/v1alpha3
kind: HarborCluster
metadata:
  name: harborcluster-sample
  namespace: cluster-sample-ns
spec:
  logLevel: debug
  imageSource:
    repository: ghcr.io/goharbor
  harborAdminPasswordRef: admin-core-secret
  externalURL: https://core.harbor.domain
  expose:
    core:
      ingress:
        host: core.harbor.domain
      tls:
        certificateRef: sample-public-certificate
    notary:
      ingress:
        host: notary.harbor.domain
      tls:
        certificateRef: sample-public-certificate
  internalTLS:
    enabled: true
  portal: {}
  registry:
    replicas: 3
    metrics:
      enabled: true
  core:
    replicas: 3
    tokenIssuer:
      name: selfsigned-issuer
      kind: Issuer
    metrics:
      enabled: false
  chartmuseum: {}
  exporter: {}
  trivy:
    skipUpdate: false
    storage: {}
  notary:
    migrationEnabled: true
  inClusterDatabase:
    kind: PostgresSQL
    postgresSqlSpec:
      storage: 20Gi
      replicas: 1
      resources:
        limits:
          cpu: 5000m
          memory: 2500Mi
        requests:
          cpu: 1000m
          memory: 2500Mi
  inClusterStorage:
    kind: MinIO
    minIOSpec:
      replicas: 2
      secretRef: minio-access-secret
      redirect:
        enable: true
        expose:
          ingress:
            host: minio.harbor.domain
          tls:
            certificateRef: sample-public-certificate
      volumesPerServer: 2
      volumeClaimTemplate:
        spec:
          accessModes:
            - ReadWriteOnce
          resources:
            requests:
              storage: 100Gi
  inClusterCache:
    kind: Redis
    redisSpec:
      server:
        replicas: 1
      sentinel:
        replicas: 1

Manifest of filesystem as storage

# Sample namespace
apiVersion: v1
kind: Namespace
metadata:
  name: cluster-sample-ns
---
# A secret of harbor admin password.
apiVersion: v1
kind: Secret
metadata:
  name: admin-core-secret
  namespace: cluster-sample-ns
data:
  secret: SGFyYm9yMTIzNDU=
type: Opaque
---
apiVersion: v1
kind: Secret
metadata:
  name: harbor-test-ca
  namespace: cluster-sample-ns
data:
  tls.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUZpekNDQTNPZ0F3SUJBZ0lVU2Fva1FldWczaGJHQVF3U1BqaklsMmV1akl3d0RRWUpLb1pJaHZjTkFRRUwKQlFBd1ZERUxNQWtHQTFVRUJoTUNRMDR4RERBS0JnTlZCQWdNQTFCRlN6RVJNQThHQTFVRUJ3d0lRbVZwSUVwcApibWN4RVRBUEJnTlZCQW9NQ0dkdmFHRnlZbTl5TVJFd0R3WURWUVFEREFoSVlYSmliM0pEUVRBZ0Z3MHlNREE0Ck1USXhNRFV5TkROYUdBOHlNVEl3TURjeE9URXdOVEkwTTFvd1ZERUxNQWtHQTFVRUJoTUNRMDR4RERBS0JnTlYKQkFnTUExQkZTekVSTUE4R0ExVUVCd3dJUW1WcElFcHBibWN4RVRBUEJnTlZCQW9NQ0dkdmFHRnlZbTl5TVJFdwpEd1lEVlFRRERBaElZWEppYjNKRFFUQ0NBaUl3RFFZSktvWklodmNOQVFFQkJRQURnZ0lQQURDQ0Fnb0NnZ0lCCkFPWlJaWWtGbVZCTmFiRVU0Y0RhcWEyN2s1K091VUhnMW9vU2NDbmJiQkZ4TkIyMi83Q3pYSVdPV21GQ1ZQalgKTHdBVjEzdTZwUWtNTWFqRHFQQS83bGR6OGFqWW05VlREZzgvcUdib2E2YW9OTzRHTExkeWlsaTY2R0xtSHBXawpCNi9KWjNKYUV2cHozOTQ4dk1pb0dDdXBjQnFFeGw4Z0hxcmdzeWpSOXVlcVM5bGU2Ni9nMWdEcVZtU0FVM3BQCndLa3dkUk1PaVFzeFNMOVRZL0lYYkNkVWVwc2xJQ2VHTEdqdjQvVUN0ZDlZVWhpSVJWOTdLc2dLRG4wQk8yOWMKVitXM0lDcW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wcVJDVWVHUk5UOWtVdQprbElEb1ltN3dLZG1TWnhPbEF4Skx5bkZwcnBSSzNSeVZ5a3QxeTJvandxOW5hSmpyUG1nM1ZBYXdUakZSbDN0CnQ2NHkyUlVqdHdlK3lqdUZLN3l5NkdwRnoySkFIVDYzblpZdHE5Y0F3NFJENjhJN0tGY3NZbGpLdHFwS1hoOEMKeGExQjRDVjhNclV3RnRPcnBxQ2xuTFBZWXNuZDhlM2xPM29oY1NEaTVJMUQ1Vmd5QkZVL05XcGdpMW1hNEt5WQowQUZ0QW9JQkFGZ1h0ZWM2VE1EVGVpRDFXQzRFK3E5aHNKZHBSamFwTGJqOGlTdFVyZVNmL2xIcFQrb1dYdUt3CnJnS2d6bm8vVjNxeEdKaFBWaFJJUW1Kb3U2M01LY1hxWXVwSlkxRTdjMmVhbU84SkpPZlpNTFFrWlN1MWlxSmIKZ3JITCt6YVAvTjRqVmkrWTJqbG81OEloYzBLNzVtak9rYjVBZ2ExOFhySnBlYlRHbFdnWFlxY05xUmZzbWhVago3VmMxQk9vVGwwb3pPU21JRmpyQUp3R0pNZjFuQzBuODI5Mks2WERyN0tDbDJXazN2OC9oVzNpRzJ6cW55aFBHCkl3czY0L0NLYU03OTdIc0R1ZXlBTU5vUVJXUHk5d2I3YXZqZlI2TDNGOWczS2l6c1pVbjFtUWcwc0JsQVRTU2QKVEN6SGxtdjZqQVFqY0RxVzdxQ3I0SHRFTXJBNjJGWT0KLS0tLS1FTkQgUFJJVkFURSBLRVktLS0tLQo=
---
# Cert issuer
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
  name: selfsigned-issuer
  namespace: cluster-sample-ns
spec:
  ca:
    secretName: harbor-test-ca
---
# Certificates of ingress
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
  name: sample-public-certificate
  namespace: cluster-sample-ns
spec:
  secretName: sample-public-certificate
  dnsNames:
    - core.harbor.domain
    - notary.harbor.domain
  issuerRef:
    name: selfsigned-issuer
    kind: Issuer
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: sample-harbor-registry
  namespace: cluster-sample-ns
spec:
  accessModes:
    - ReadWriteOnce
  volumeMode: Filesystem
  resources:
    requests:
      storage: 100Gi
---
# Full stack Harbor
apiVersion: goharbor.io/v1alpha3
kind: HarborCluster
metadata:
  name: harborcluster-sample
  namespace: cluster-sample-ns
spec:
  logLevel: debug
  imageSource:
    repository: ghcr.io/goharbor
  harborAdminPasswordRef: admin-core-secret
  externalURL: https://core.harbor.domain
  expose:
    core:
      ingress:
        host: core.harbor.domain
      tls:
        certificateRef: sample-public-certificate
    notary:
      ingress:
        host: notary.harbor.domain
      tls:
        certificateRef: sample-public-certificate
  internalTLS:
    enabled: true
  portal: {}
  registry:
    replicas: 1
    metrics:
      enabled: true
  core:
    replicas: 3
    tokenIssuer:
      name: selfsigned-issuer
      kind: Issuer
    metrics:
      enabled: false
  chartmuseum: {}
  exporter: {}
  trivy:
    skipUpdate: false
    storage: {}
  notary:
    migrationEnabled: true
  imageChartStorage:
    filesystem:
      registryPersistentVolume:
        claimName: sample-harbor-registry
  inClusterDatabase:
    kind: PostgresSQL
    postgresSqlSpec:
      storage: 20Gi
      replicas: 1
      resources:
        limits:
          cpu: 5000m
          memory: 2500Mi
        requests:
          cpu: 1000m
          memory: 2500Mi
  inClusterCache:
    kind: Redis
    redisSpec:
      server:
        replicas: 1
      sentinel:
        replicas: 1

Results

Result of minio as storage

Test Avg Min Med Max P90 P95 VUS Iterations
Pull 32.81s 876.88ms 31.19s 1m25s 1m6s 1m14s 200 400
Push 29.66s 15.09s 26.39s 55.47s 44.45s 45.47s 200 400

Result of filesystem as storage

Test Avg Min Med Max P90 P95 VUS Iterations
Pull 32.34s 838.94ms 27.81s 1m24s 1m6s 1m14s 200 400
Push 20.43s 10.62s 20.33s 35s 24.92s 28.18s 200 400