{"id":33856,"date":"2024-07-15T14:59:17","date_gmt":"2024-07-15T12:59:17","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/?p=33856"},"modified":"2024-07-15T14:59:20","modified_gmt":"2024-07-15T12:59:20","slug":"cloudnativepg-benchmarking","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/cloudnativepg-benchmarking\/","title":{"rendered":"CloudNativePG \u2013 Benchmarking"},"content":{"rendered":"\n<p>Now that we&#8217;ve configured our storage in the <a href=\"https:\/\/www.dbi-services.com\/blog\/cloudnativepg-storage\/\" target=\"_blank\" rel=\"noreferrer noopener\">last post<\/a>, it is time to benchmark the system. One popular tool when it comes to benchmarking PostgreSQL is <a href=\"https:\/\/www.postgresql.org\/docs\/16\/pgbench.html\" target=\"_blank\" rel=\"noreferrer noopener\">pgbench<\/a>. This can be used in our setup as well, and if you have installed the <a href=\"https:\/\/www.dbi-services.com\/blog\/cloudnativepg-the-kubectl-plugin\/\" target=\"_blank\" rel=\"noreferrer noopener\">CloudNativePG kubectl plugin<\/a> this is quite easy to use.<\/p>\n\n\n\n<p>Of course the cluster needs to be already deployed for this to work. For your reference here is the latest configuration we&#8217;ve used (you will also need to complete the <a href=\"https:\/\/www.dbi-services.com\/blog\/cloudnativepg-storage\/\" target=\"_blank\" rel=\"noreferrer noopener\">storage configuration<\/a> for this):<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: yaml; title: ; notranslate\" title=\"\">\napiVersion: postgresql.cnpg.io\/v1\nkind: Cluster\nmetadata:\n  name: my-pg-cluster\nspec:\n  instances: 3\n \n  bootstrap:\n    initdb:\n      database: db1\n      owner: db1\n      dataChecksums: true\n      walSegmentSize: 32\n      localeCollate: &#039;en_US.utf8&#039;\n      localeCType: &#039;en_US.utf8&#039;\n      postInitSQL:\n      - create user db2\n      - create database db2 with owner = db2\n  storage:\n    pvcTemplate:\n      accessModes:\n        - ReadWriteOnce\n      resources:\n        requests:\n          storage: 1Gi\n      storageClassName: openebs-lvmpv\n      volumeMode: Filesystem\n<\/pre><\/div>\n\n\n<p>Once the cluster is up and running:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; highlight: [1]; title: ; notranslate\" title=\"\">\nk8s@k8s1:~$ kubectl get cluster\nNAME            AGE   INSTANCES   READY   STATUS                     PRIMARY\nmy-pg-cluster   24m   3           3       Cluster in healthy state   my-pg-cluster-1\n<\/pre><\/div>\n\n\n<p>&#8230; we can ask the kubectl plugin to create a job definition with all the default values (the &#8220;&#8211;dry-run&#8221; switch is what you need if you want to have the definition instead of executing the job directly):<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; highlight: [1]; title: ; notranslate\" title=\"\">\nk8s@k8s1:~$ kubectl-cnpg pgbench my-pg-cluster --dry-run\napiVersion: batch\/v1\nkind: Job\nmetadata:\n  creationTimestamp: null\n  labels:\n    pbBenchJob: my-pg-cluster\n  name: my-pg-cluster-pgbench-499767\n  namespace: default\nspec:\n  template:\n    metadata:\n      creationTimestamp: null\n      labels:\n        pbBenchJob: my-pg-cluster\n    spec:\n      containers:\n      - command:\n        - pgbench\n        env:\n        - name: PGHOST\n          value: my-pg-cluster-rw\n        - name: PGDATABASE\n          value: app\n        - name: PGPORT\n          value: &quot;5432&quot;\n        - name: PGUSER\n          valueFrom:\n            secretKeyRef:\n              key: username\n              name: my-pg-cluster-app\n        - name: PGPASSWORD\n          valueFrom:\n            secretKeyRef:\n              key: password\n              name: my-pg-cluster-app\n        image: ghcr.io\/cloudnative-pg\/postgresql:16.3\n        imagePullPolicy: Always\n        name: pgbench\n        resources: {}\n      restartPolicy: Never\nstatus: {}\n<\/pre><\/div>\n\n\n<p>Using this template, we can easily create a modified template which initializes a standard pgbench schema:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: yaml; title: ; notranslate\" title=\"\">\napiVersion: batch\/v1\nkind: Job\nmetadata:\n  creationTimestamp: null\n  labels:\n    pbBenchJob: my-pg-cluster\n  name: initjob\n  namespace: default\nspec:\n  template:\n    metadata:\n      creationTimestamp: null\n      labels:\n        pbBenchJob: my-pg-cluster\n    spec:\n      containers:\n      - args:\n        - --initialize\n        - --scale\n        - &quot;10&quot;\n        - --user\n        - db1\n        command:\n        - pgbench\n        env:\n        - name: PGHOST\n          value: my-pg-cluster-rw\n        - name: PGDATABASE\n          value: db1\n        - name: PGPORT\n          value: &quot;5432&quot;\n        - name: PGUSER\n          valueFrom:\n            secretKeyRef:\n              key: username\n              name: my-pg-cluster-app\n        - name: PGPASSWORD\n          valueFrom:\n            secretKeyRef:\n              key: password\n              name: my-pg-cluster-app\n        image: ghcr.io\/cloudnative-pg\/postgresql:16.3\n        imagePullPolicy: Always\n        name: pgbench\n        resources: {}\n      restartPolicy: Never\nstatus: {}\n<\/pre><\/div>\n\n\n<p>Creating this job will result in 1000000 rows in the pgbench_accounts table:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; highlight: [1,3]; title: ; notranslate\" title=\"\">\nk8s@k8s1:~$ kubectl apply -f pgbench-init.yaml \njob.batch\/initjob created\nk8s@k8s1:~$ kubectl logs jobs\/initjob\ndropping old tables...\nNOTICE:  table &quot;pgbench_accounts&quot; does not exist, skipping\nNOTICE:  table &quot;pgbench_branches&quot; does not exist, skipping\nNOTICE:  table &quot;pgbench_history&quot; does not exist, skipping\nNOTICE:  table &quot;pgbench_tellers&quot; does not exist, skipping\ncreating tables...\ngenerating data (client-side)...\n100000 of 1000000 tuples (10%) done (elapsed 0.04 s, remaining 0.40 s)\n200000 of 1000000 tuples (20%) done (elapsed 0.17 s, remaining 0.67 s)\n300000 of 1000000 tuples (30%) done (elapsed 0.24 s, remaining 0.56 s)\n400000 of 1000000 tuples (40%) done (elapsed 0.92 s, remaining 1.38 s)\n500000 of 1000000 tuples (50%) done (elapsed 0.96 s, remaining 0.96 s)\n600000 of 1000000 tuples (60%) done (elapsed 1.09 s, remaining 0.73 s)\n700000 of 1000000 tuples (70%) done (elapsed 1.28 s, remaining 0.55 s)\n800000 of 1000000 tuples (80%) done (elapsed 1.85 s, remaining 0.46 s)\n900000 of 1000000 tuples (90%) done (elapsed 2.16 s, remaining 0.24 s)\n1000000 of 1000000 tuples (100%) done (elapsed 2.87 s, remaining 0.00 s)\nvacuuming...\ncreating primary keys...\ndone in 5.97 s (drop tables 0.00 s, create tables 0.20 s, client-side generate 3.87 s, vacuum 0.77 s, primary keys 1.12 s).\n<\/pre><\/div>\n\n\n<p>Once we have that in place, we can create another job definition which is running a pgbench benchmark against the initialized schema from above:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: yaml; title: ; notranslate\" title=\"\">\napiVersion: batch\/v1\nkind: Job\nmetadata:\n  creationTimestamp: null\n  labels:\n    pbBenchJob: my-pg-cluster\n  name: runjob\n  namespace: default\nspec:\n  template:\n    metadata:\n      creationTimestamp: null\n      labels:\n        pbBenchJob: my-pg-cluster\n    spec:\n      containers:\n      - args:\n        - --jobs\n        - &quot;2&quot;\n        - --progress\n        - &quot;1&quot;\n        - --time\n        - &quot;10&quot;\n        - --user\n        - db1\n        command:\n        - pgbench\n        env:\n        - name: PGHOST\n          value: my-pg-cluster-rw\n        - name: PGDATABASE\n          value: db1\n        - name: PGPORT\n          value: &quot;5432&quot;\n        - name: PGUSER\n          valueFrom:\n            secretKeyRef:\n              key: username\n              name: my-pg-cluster-app\n        - name: PGPASSWORD\n          valueFrom:\n            secretKeyRef:\n              key: password\n              name: my-pg-cluster-app\n        image: ghcr.io\/cloudnative-pg\/postgresql:16.3\n        imagePullPolicy: Always\n        name: pgbench\n        resources: {}\n      restartPolicy: Never\nstatus: {}\n<\/pre><\/div>\n\n\n<p>Apply this and then have a look at the numbers pgbench is reporting:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; highlight: [1,3]; title: ; notranslate\" title=\"\">\nk8s@k8s1:~$ kubectl apply -f pgbench-run.yaml \njob.batch\/runjob created\nk8s@k8s1:~$ kubectl logs jobs\/runjob\npgbench (16.3 (Debian 16.3-1.pgdg110+1))\nstarting vacuum...end.\nprogress: 1.0 s, 731.0 tps, lat 1.354 ms stddev 0.822, 0 failed\nprogress: 2.0 s, 902.0 tps, lat 1.108 ms stddev 0.299, 0 failed\nprogress: 3.0 s, 803.0 tps, lat 1.245 ms stddev 0.496, 0 failed\nprogress: 4.0 s, 586.0 tps, lat 1.706 ms stddev 4.838, 0 failed\nprogress: 5.0 s, 878.0 tps, lat 1.139 ms stddev 0.287, 0 failed\nprogress: 6.0 s, 851.9 tps, lat 1.172 ms stddev 0.423, 0 failed\nprogress: 7.0 s, 683.0 tps, lat 1.465 ms stddev 1.197, 0 failed\nprogress: 8.0 s, 911.0 tps, lat 1.097 ms stddev 0.967, 0 failed\nprogress: 9.0 s, 638.0 tps, lat 1.562 ms stddev 6.578, 0 failed\nprogress: 10.0 s, 277.0 tps, lat 3.620 ms stddev 8.508, 0 failed\ntransaction type: &lt;builtin: TPC-B (sort of)&gt;\nscaling factor: 10\nquery mode: simple\nnumber of clients: 1\nnumber of threads: 1\nmaximum number of tries: 1\nduration: 10 s\nnumber of transactions actually processed: 7262\nnumber of failed transactions: 0 (0.000%)\nlatency average = 1.375 ms\nlatency stddev = 3.013 ms\ninitial connection time = 9.886 ms\ntps = 726.884434 (without initial connection time)\n<\/pre><\/div>\n\n\n<p>Compare this against the numbers you get from other environments (virtual machines or bare metal) to get an idea about how well your Kubernetes deployment is performing. This should be your first driver for deciding if your setup is good enough for what you want to achieve.<\/p>\n\n\n\n<p>Another option which comes with the cnpg kubectl plugin is to run a <a href=\"https:\/\/fio.readthedocs.io\/en\/latest\/fio_doc.html\" target=\"_blank\" rel=\"noreferrer noopener\">fio<\/a> benchmark. In very much the same way as above, you can ask the plugin to create a template:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; highlight: [1]; title: ; notranslate\" title=\"\">\nk8s@k8s1:~$ kubectl cnpg fio fio -n default --storageClass openebs-lvmpv --pvcSize 1Gi --dry-run &gt; fio.yaml\n<\/pre><\/div>\n\n\n<p>&#8230; which gives you this definition (the result is a persistent volume claim, a config map which provides the configuration and a deployment, all with the default values):<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: yaml; title: ; notranslate\" title=\"\">\napiVersion: v1\nkind: PersistentVolumeClaim\nmetadata:\n  creationTimestamp: null\n  name: fio\n  namespace: default\nspec:\n  accessModes:\n  - ReadWriteOnce\n  resources:\n    requests:\n      storage: 1Gi\n  storageClassName: openebs-lvmpv\nstatus: {}\n---\napiVersion: v1\ndata:\n  job: |-\n    &#x5B;read]\n        direct=1\n        bs=8k\n        size=1G\n        time_based=1\n        runtime=60\n        ioengine=libaio\n        iodepth=32\n        end_fsync=1\n        log_avg_msec=1000\n        directory=\/data\n        rw=read\n        write_bw_log=read\n        write_lat_log=read\n        write_iops_log=read\nkind: ConfigMap\nmetadata:\n  creationTimestamp: null\n  name: fio\n  namespace: default\n---\napiVersion: apps\/v1\nkind: Deployment\nmetadata:\n  creationTimestamp: null\n  name: fio\n  namespace: default\nspec:\n  selector:\n    matchLabels:\n      app.kubernetes.io\/instance: fio\n      app.kubernetes.io\/name: fio\n  strategy: {}\n  template:\n    metadata:\n      creationTimestamp: null\n      labels:\n        app.kubernetes.io\/instance: fio\n        app.kubernetes.io\/name: fio\n    spec:\n      affinity:\n        podAntiAffinity:\n          requiredDuringSchedulingIgnoredDuringExecution:\n          - labelSelector:\n              matchExpressions:\n              - key: app\n                operator: In\n                values:\n                - fio\n            topologyKey: kubernetes.io\/hostname\n      containers:\n      - env:\n        - name: JOBFILES\n          value: \/job\/job.fio\n        - name: PLOTNAME\n          value: job\n        image: wallnerryan\/fiotools-aio:latest\n        name: fio\n        ports:\n        - containerPort: 8000\n        readinessProbe:\n          initialDelaySeconds: 60\n          periodSeconds: 10\n          tcpSocket:\n            port: 8000\n        resources:\n          requests:\n            cpu: &quot;1&quot;\n            memory: 100M\n        securityContext:\n          allowPrivilegeEscalation: false\n          capabilities:\n            drop:\n            - ALL\n          readOnlyRootFilesystem: true\n          runAsGroup: 10001\n          runAsNonRoot: true\n          runAsUser: 10001\n          seccompProfile:\n            type: RuntimeDefault\n        volumeMounts:\n        - mountPath: \/data\n          name: data\n        - mountPath: \/job\n          name: job\n        - mountPath: \/tmp\/fio-data\n          name: tmp\n      securityContext:\n        fsGroup: 10001\n      volumes:\n      - name: data\n        persistentVolumeClaim:\n          claimName: fio\n      - configMap:\n          items:\n          - key: job\n            path: job.fio\n          name: fio\n        name: job\n      - emptyDir: {}\n        name: tmp\nstatus: {}\n---\n<\/pre><\/div>\n\n\n<p>If you want to change fio parameters, then do it in the config map. Once you apply this and wait for a few minutes (run time is 60), the status should be this:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; highlight: [1]; title: ; notranslate\" title=\"\">\nk8s@k8s1:~$ kubectl get deployments\nNAME   READY   UP-TO-DATE   AVAILABLE   AGE\nfio    1\/1     1            1           2m18s\n<\/pre><\/div>\n\n\n<p>The results of the benchmark can be seen by creating a port forwarding and pointing a browser to <code>http:\/\/localhost:8000\/<\/code>.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; highlight: [1]; title: ; notranslate\" title=\"\">\nk8s@k8s1:~$ kubectl port-forward -n default deployment\/fio 8000\nForwarding from 127.0.0.1:8000 -&gt; 8000\nForwarding from &#x5B;::1]:8000 -&gt; 8000\n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"734\" height=\"650\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/07\/1.png\" alt=\"\" class=\"wp-image-33986\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/07\/1.png 734w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/07\/1-300x266.png 300w\" sizes=\"auto, (max-width: 734px) 100vw, 734px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"789\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/07\/2-1024x789.png\" alt=\"\" class=\"wp-image-33987\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/07\/2-1024x789.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/07\/2-300x231.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/07\/2-768x592.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/07\/2.png 1275w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>The same applies here: Compare that to the numbers you get from other environments and then decide if you are good enough.<\/p>\n\n\n\n<p>To delete the complete deployment use this command:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; highlight: [1]; title: ; notranslate\" title=\"\">\nk8s@k8s1:~kubectl cnpg fio fio --dry-run | kubectl delete -f - -\npersistentvolumeclaim &quot;fio&quot; deleted\nconfigmap &quot;fio&quot; deleted\ndeployment.apps &quot;fio&quot; deleted\n<\/pre><\/div>\n\n\n<p>In the next post we&#8217;ll look at how you can connect external applications to this PostgreSQL cluster.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Now that we&#8217;ve configured our storage in the last post, it is time to benchmark the system. One popular tool when it comes to benchmarking PostgreSQL is pgbench. This can be used in our setup as well, and if you have installed the CloudNativePG kubectl plugin this is quite easy to use. Of course the [&hellip;]<\/p>\n","protected":false},"author":29,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[955,229,198,1320],"tags":[77],"type_dbi":[],"class_list":["post-33856","post","type-post","status-publish","format-standard","hentry","category-cloud","category-database-administration-monitoring","category-database-management","category-devops","tag-postgresql"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>CloudNativePG \u2013 Benchmarking - dbi Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/cloudnativepg-benchmarking\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"CloudNativePG \u2013 Benchmarking\" \/>\n<meta property=\"og:description\" content=\"Now that we&#8217;ve configured our storage in the last post, it is time to benchmark the system. One popular tool when it comes to benchmarking PostgreSQL is pgbench. This can be used in our setup as well, and if you have installed the CloudNativePG kubectl plugin this is quite easy to use. Of course the [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/cloudnativepg-benchmarking\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2024-07-15T12:59:17+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-07-15T12:59:20+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/07\/1.png\" \/>\n<meta name=\"author\" content=\"Daniel Westermann\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@westermanndanie\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Daniel Westermann\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/cloudnativepg-benchmarking\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/cloudnativepg-benchmarking\\\/\"},\"author\":{\"name\":\"Daniel Westermann\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/8d08e9bd996a89bd75c0286cbabf3c66\"},\"headline\":\"CloudNativePG \u2013 Benchmarking\",\"datePublished\":\"2024-07-15T12:59:17+00:00\",\"dateModified\":\"2024-07-15T12:59:20+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/cloudnativepg-benchmarking\\\/\"},\"wordCount\":402,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/cloudnativepg-benchmarking\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2024\\\/07\\\/1.png\",\"keywords\":[\"PostgreSQL\"],\"articleSection\":[\"Cloud\",\"Database Administration &amp; Monitoring\",\"Database management\",\"DevOps\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/cloudnativepg-benchmarking\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/cloudnativepg-benchmarking\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/cloudnativepg-benchmarking\\\/\",\"name\":\"CloudNativePG \u2013 Benchmarking - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/cloudnativepg-benchmarking\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/cloudnativepg-benchmarking\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2024\\\/07\\\/1.png\",\"datePublished\":\"2024-07-15T12:59:17+00:00\",\"dateModified\":\"2024-07-15T12:59:20+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/8d08e9bd996a89bd75c0286cbabf3c66\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/cloudnativepg-benchmarking\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/cloudnativepg-benchmarking\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/cloudnativepg-benchmarking\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2024\\\/07\\\/1.png\",\"contentUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2024\\\/07\\\/1.png\",\"width\":734,\"height\":650},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/cloudnativepg-benchmarking\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"CloudNativePG \u2013 Benchmarking\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/8d08e9bd996a89bd75c0286cbabf3c66\",\"name\":\"Daniel Westermann\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/31350ceeecb1dd8986339a29bf040d4cd3cd087d410deccd8f55234466d6c317?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/31350ceeecb1dd8986339a29bf040d4cd3cd087d410deccd8f55234466d6c317?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/31350ceeecb1dd8986339a29bf040d4cd3cd087d410deccd8f55234466d6c317?s=96&d=mm&r=g\",\"caption\":\"Daniel Westermann\"},\"description\":\"Daniel Westermann is Principal Consultant and Technology Leader Open Infrastructure at dbi services. He has more than 15 years of experience in management, engineering and optimization of databases and infrastructures, especially on Oracle and PostgreSQL. Since the beginning of his career, he has specialized in Oracle Technologies and is Oracle Certified Professional 12c and Oracle Certified Expert RAC\\\/GridInfra. Over time, Daniel has become increasingly interested in open source technologies, becoming \u201cTechnology Leader Open Infrastructure\u201d and PostgreSQL expert. \u00a0Based on community or EnterpriseDB tools, he develops and installs complex high available solutions with PostgreSQL. He is also a certified PostgreSQL Plus 9.0 Professional and a Postgres Advanced Server 9.4 Professional. He is a regular speaker at PostgreSQL conferences in Switzerland and Europe. Today Daniel is also supporting our customers on AWS services such as AWS RDS, database migrations into the cloud, EC2 and automated infrastructure management with AWS SSM (System Manager). He is a certified AWS Solutions Architect Professional. Prior to dbi services, Daniel was Management System Engineer at LC SYSTEMS-Engineering AG in Basel. Before that, he worked as Oracle Developper &amp;\u00a0Project Manager at Delta Energy Solutions AG in Basel (today Powel AG). Daniel holds a diploma in Business Informatics (DHBW, Germany). His branch-related experience mainly covers the pharma industry, the financial sector, energy, lottery and telecommunications.\",\"sameAs\":[\"https:\\\/\\\/x.com\\\/westermanndanie\"],\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/author\\\/daniel-westermann\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"CloudNativePG \u2013 Benchmarking - dbi Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/cloudnativepg-benchmarking\/","og_locale":"en_US","og_type":"article","og_title":"CloudNativePG \u2013 Benchmarking","og_description":"Now that we&#8217;ve configured our storage in the last post, it is time to benchmark the system. One popular tool when it comes to benchmarking PostgreSQL is pgbench. This can be used in our setup as well, and if you have installed the CloudNativePG kubectl plugin this is quite easy to use. Of course the [&hellip;]","og_url":"https:\/\/www.dbi-services.com\/blog\/cloudnativepg-benchmarking\/","og_site_name":"dbi Blog","article_published_time":"2024-07-15T12:59:17+00:00","article_modified_time":"2024-07-15T12:59:20+00:00","og_image":[{"url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/07\/1.png","type":"","width":"","height":""}],"author":"Daniel Westermann","twitter_card":"summary_large_image","twitter_creator":"@westermanndanie","twitter_misc":{"Written by":"Daniel Westermann","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/cloudnativepg-benchmarking\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/cloudnativepg-benchmarking\/"},"author":{"name":"Daniel Westermann","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d08e9bd996a89bd75c0286cbabf3c66"},"headline":"CloudNativePG \u2013 Benchmarking","datePublished":"2024-07-15T12:59:17+00:00","dateModified":"2024-07-15T12:59:20+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/cloudnativepg-benchmarking\/"},"wordCount":402,"commentCount":0,"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/cloudnativepg-benchmarking\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/07\/1.png","keywords":["PostgreSQL"],"articleSection":["Cloud","Database Administration &amp; Monitoring","Database management","DevOps"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/cloudnativepg-benchmarking\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/cloudnativepg-benchmarking\/","url":"https:\/\/www.dbi-services.com\/blog\/cloudnativepg-benchmarking\/","name":"CloudNativePG \u2013 Benchmarking - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/cloudnativepg-benchmarking\/#primaryimage"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/cloudnativepg-benchmarking\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/07\/1.png","datePublished":"2024-07-15T12:59:17+00:00","dateModified":"2024-07-15T12:59:20+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d08e9bd996a89bd75c0286cbabf3c66"},"breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/cloudnativepg-benchmarking\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/cloudnativepg-benchmarking\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/cloudnativepg-benchmarking\/#primaryimage","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/07\/1.png","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/07\/1.png","width":734,"height":650},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/cloudnativepg-benchmarking\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"CloudNativePG \u2013 Benchmarking"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d08e9bd996a89bd75c0286cbabf3c66","name":"Daniel Westermann","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/31350ceeecb1dd8986339a29bf040d4cd3cd087d410deccd8f55234466d6c317?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/31350ceeecb1dd8986339a29bf040d4cd3cd087d410deccd8f55234466d6c317?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/31350ceeecb1dd8986339a29bf040d4cd3cd087d410deccd8f55234466d6c317?s=96&d=mm&r=g","caption":"Daniel Westermann"},"description":"Daniel Westermann is Principal Consultant and Technology Leader Open Infrastructure at dbi services. He has more than 15 years of experience in management, engineering and optimization of databases and infrastructures, especially on Oracle and PostgreSQL. Since the beginning of his career, he has specialized in Oracle Technologies and is Oracle Certified Professional 12c and Oracle Certified Expert RAC\/GridInfra. Over time, Daniel has become increasingly interested in open source technologies, becoming \u201cTechnology Leader Open Infrastructure\u201d and PostgreSQL expert. \u00a0Based on community or EnterpriseDB tools, he develops and installs complex high available solutions with PostgreSQL. He is also a certified PostgreSQL Plus 9.0 Professional and a Postgres Advanced Server 9.4 Professional. He is a regular speaker at PostgreSQL conferences in Switzerland and Europe. Today Daniel is also supporting our customers on AWS services such as AWS RDS, database migrations into the cloud, EC2 and automated infrastructure management with AWS SSM (System Manager). He is a certified AWS Solutions Architect Professional. Prior to dbi services, Daniel was Management System Engineer at LC SYSTEMS-Engineering AG in Basel. Before that, he worked as Oracle Developper &amp;\u00a0Project Manager at Delta Energy Solutions AG in Basel (today Powel AG). Daniel holds a diploma in Business Informatics (DHBW, Germany). His branch-related experience mainly covers the pharma industry, the financial sector, energy, lottery and telecommunications.","sameAs":["https:\/\/x.com\/westermanndanie"],"url":"https:\/\/www.dbi-services.com\/blog\/author\/daniel-westermann\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/33856","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/29"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=33856"}],"version-history":[{"count":10,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/33856\/revisions"}],"predecessor-version":[{"id":33989,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/33856\/revisions\/33989"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=33856"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=33856"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=33856"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=33856"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}