skip to main content
Quick Start: Progress DataDirect for ODBC for Apache Cassandra Driver for Windows : Tuning for Performance
  

Try DataDirect Drivers Now

Tuning for Performance

The connection options described in this section directly affect the performance of your driver. To tune for performance, configure your driver according to the recommended settings and your environment.

Application Using Threads

Purpose:
Determines whether the driver works with applications using multiple ODBC threads.
Performance Impact:
The driver coordinates concurrent database operations (operations from different threads) by acquiring locks. Although locking prevents errors in the driver, it also decreases performance. If your application does not make ODBC calls from different threads, the driver has no reason to coordinate operations.
Recommended Settings:
If your application is multi-threaded, enable (default) this option.
If your application is not multi-threaded, disable this option for improved performance.
GUI Tab:
Advanced

Fetch Size

Purpose:
Specifies the number of rows that the driver processes before returning data to the application when executing a Select. This value provides a suggestion to the driver as to the number of rows it should internally process before returning control to the application. The driver may fetch fewer rows to conserve memory when processing exceptionally wide rows.
Performance Impact:
Fetch Size and Native Fetch Size can be used to adjust the trade-off between throughput and response time. In general, setting larger values for Fetch Size and Native Fetch Size will improve throughput, but can reduce response time.
Recommended Settings:
Set Fetch Size to suit your environment. Smaller fetch sizes can improve the initial response time of the query. Larger fetch sizes improve overall fetch times at the cost of additional memory.
GUI Tab:
Advanced

JVM Arguments

Purpose:
Contains the arguments that are passed to the JVM that the driver is starting. The JVM Arguments connection option can be used to adjust the heap size of the JVM.
Performance Impact:
Increasing the maximum Java heap size with JVM Arguments increases the amount of data the driver accumulates in memory and reduces the need to write to disk. JVM Arguments can be used in conjunction with Result Memory Size to ensure that result sets fit easily within the JVM's free heap space. When result sets fit easily within the JVM's free heap space, performance can be improved and out of memory errors can be avoided.
Recommended Settings:
By default, the maximum size of an intermediate result set that the driver holds in memory is determined by a percentage of the maximum Java heap size. Testing has shown that the default behavior works in most scenarios. However, you may choose to make the following adjustments to suit your requirements.
*Use JVM Arguments to increase the maximum Java heap size and avoid the need to page to disk.
*In conjunction with the Result Memory Size connection option, use JVM Arguments to adjust the maximum Java heap size such that your result sets fit easily within the JVM's free heap space.
GUI Tab:
SQL Engine

Native Fetch Size

Purpose:
Specifies the number of rows of data the driver attempts to fetch from the native data source on each request submitted to the server.
Performance Impact:
Fetch Size and Native Fetch Size can be used to adjust the trade-off between throughput and response time. In general, setting larger values for Fetch Size and Native Fetch Size will improve throughput, but can reduce response time.
Recommended Settings:
Set Native Fetch Size to suit your environment. Smaller fetch sizes can improve the initial response time of the query. Larger fetch sizes improve overall fetch times at the cost of additional memory.
GUI Tab:
Advanced

Read Consistency

Purpose:
Specifies how many replica servers (replicas) must respond to a read request before returning data to the client application.
Performance Impact:
The Read Consistency connection option manages the trade-off between the consistency and availability of your data. Higher consistency requires more processing and therefore can slow response time.
Recommended Settings:
By default, Read Consistency is set to quorum and data is returned after a quorum of replicas has responded from any data center.
If your application requires higher consistency than the default, consider setting Read Consistency to all so that all replicas must respond before data is returned to the application.
If consistency is not a great concern and you want to increase the speed with which data is returned to an application, consider setting Read Consistency to one. This setting returns data from the closest replica set.
GUI Tab:
Advanced

Result Memory Size

Purpose:
Specifies the maximum size, in megabytes, of an intermediate result set that the driver holds in memory. When this threshold is reached, the driver writes a portion of the result set to disk in temporary files.
Performance Impact:
Increasing the value of Result Memory Size can improve performance by avoiding the need to page to disk. Result Memory Size can be used in conjunction with JVM Arguments to ensure that result sets fit easily within the JVM's free heap space. When result sets fit easily within the JVM's free heap space, performance can be improved and out of memory errors can be avoided.
Recommended Settings:
Testing has shown that the default setting of -1 works in most scenarios. When set to -1, the maximum size of an intermediate result set that the driver holds in memory is determined by a percentage of the maximum Java heap size. When this threshold is reached, the driver writes a portion of the result set to disk.
However, you may choose to make the following adjustments to suit your requirements.
*Increase the value of Result Memory Size to avoid the need to page to disk.
*Adjust the value of Result Memory Size and JVM Arguments such that your result sets fit easily within the JVM's free heap space.
GUI Tab:
Advanced

Write Consistency

Purpose:
Determines the number of replica servers (replicas) on which the write must succeed before returning an acknowledgment to the client application.
Performance Impact:
Higher consistency requires more processing, since the write must succeed on a greater number of replicas. Therefore, higher write consistency can slow response time.
Recommended Settings:
By default, Write Consistency is set to quorum. After the write succeeds on a quorum of replicas, an acknowledgment is returned to the client application.
If your application requires higher consistency than the default, consider setting Write Consistency to all so that the write must succeed across all replicas in the cluster.
If consistency is not a great concern and you want to decrease your applications response time, consider setting Write Consistency to one. With this setting, the write must succeed on at least one node.
GUI Tab:
Advanced