Skip to main content
Version: 3.1

operation-tune-performance

In its default configuration, Portworx attempts to provide good performance across a wide range of situations. However, you can improve your storage performance on your environment by configuring a number of settings and leveraging features Portworx offers. To get the most out of Portworx, follow the guidance provided in this article.

Configure the network data interface

note

If you've already installed Portworx, you can update the network.dataInterface value of the install spec and reapply it.

Enable hyperconvergence

Configure your cluster topology

Define a VolumePlacementStrategy

StatefulSets, distributed NoSQL databases, such as Cassandra, require PVCs to be distributed across the cluster. Use Affinity/Anti Affinity rules along with topology labels to define relationships between PVCs.

Adjust storage classes

To improve performance, adjust storage class parameters in the following ways:

  • Prioritize volume traffic by setting the priority_io: field to high

  • Choose the replication factor best suited to your high availability needs

    kind: StorageClass
    apiVersion: storage.k8s.io/v1beta1
    metadata:
    name: px-storage-class
    provisioner: pxd.portworx.com
    allowVolumeExpansion: true
    parameters:
    repl: "2"
    priority_io: "high"
    nodiscard: "true"

Modify Portworx resource consumption

By default, Portworx consumes as little CPU and memory resources as possible. You can potentially improve performance by allocating more resources, allowing Portworx to use more CPU threads and memory. Do this by modifying the spec used to install Portworx based on your cluster architecture.

Disaggregated architecture

In disaggregated deployments with dedicated storage nodes, enable higher resource consumption by specifying the rt_ops_conf_high runtime option:

apiVersion: core.libopenstorage.org/v1
kind: StorageCluster
metadata:
name: px-cluster
namespace: <px-namespace>
spec:
image: portworx/oci-monitor:3.1.6
...
runtimeOptions:
rt_opts_conf_high: "1"

Hyperconverged architecture

In a non-disaggregated/hyperconverged architecture, where applications are running on the same host as storage, set threads based on the number of cores that can be allocated to Portworx. For example, if your host has 16 cores:

  • num_threads=16 sets the total number of threads performing storage operations.
  • num_io_threads=12 sets the number of threads that can do IO operations out of the total num_threads. In general, IO threads should be 75% of total threads.
  • num_cpu_threads=16 sets the number threads that can do operations other than IO out of the total num_threads.

Configure these values as runtime options:

apiVersion: core.libopenstorage.org/v1
kind: StorageCluster
metadata:
name: px-cluster
namespace: <px-namespace>
spec:
image: portworx/oci-monitor:3.1.6
...
runtimeOptions:
rt_opts_conf_high: "1"
num_threads: "16"
num_io_threads: "12"
num_cpu_threads: "16"

To see more StorageCluster examples, visit the StorageCluster section of the documentation.